Saturday, January 19, 2013

Pyknon music library for Python

By Vasudev Ram

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 import NoteSeq

notes1 = NoteSeq("D4 F#8 A Bb4")
midi = Midi(1, tempo=90)
midi.seq_notes(notes1, track=0)

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: