Skip to content

knewter/ex_midilib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExMidilib

This is a port of midilib from inside the BashoBanjo to Elixir. I learned after finishing it that it was written by Jim Menard. His original is here

He also ported it to Elixir, I learned later, and his has tests (which are obviously a good thing). His version can be found here.

To see the midi file reading working, from inside iex -S mix:

ExMidilib.Midifile.read('midi/mario.mid')

It can also generate .au files of a given midi note, intensity, and duration. This was ported from the BashoBanjo vnode lib. You can use it like so:

ExMidilib.AuGenerator.generate(120, 0.5, 1)

To hear it play a midifile it's read (by reading the midi data, generating PCM files on the fly, and piping those into paplay), run this:

ExMidilib.MidiPlayer.play('midi/mario.mid')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages