The Pyknon music library can generate MIDI files.
It is by Pedro Kroger.
Sample code to generate a small MIDI sound file:
from pyknon.genmidi import Midi from pyknon.music import NoteSeq notes1 = NoteSeq("D4 F#8 A Bb4") midi = Midi(1, tempo=90) midi.seq_notes(notes1, track=0) midi.write("demo.mid")
I've not worked with MIDI, but earlier on I had written some music related programs in Python as well as other languages. Good fun.
- Vasudev Ram - Dancing Bison Enterprises
No comments:
Post a Comment