Will Hurt wrote:
Hi
Ive been using midipy in my blender3d python scripts on windowsXP, now
im trying to run them from ubuntu and i cant find the midipy.py module
compiled for linux anywhere.
Is it possible to complie it under linux and how would i go about doing
it --or--
Is there another module which does the same thing available for linux[ie
i can get raw midi data in as a list] and thats why no-ones bothered to
compile midipy under linux?
Thanks
Will
The MIDI IO module I use pyPortMidi, supposedly supports Linux, but I
have only ever used it on Windows.
The links in the Python Cheese Shop seem broken, so here's the site address:
http://alumni.media.mit.edu/~harrison/code.html
The C library it is based on is here:
http://www.cs.cmu.edu/~music/portmusic/
There doesn't seem to be any documentation for pyPortMidi, so you will
need to read the comments in the portmidi.h from the original C library
and the test.py file included in the distribution.
http://www.cs.cmu.edu/~music/portmusic/portmidi/portmidi.h
The Read() method of the input stream object returns a list of events,
each event consists of 4 bytes of data and a timestamp. Each event
contains a single MIDI message (not all of the 4 bytes will be used for
most messages). Sysex commands are broken up into 4 byte pieces and
returned as multiple events, one for each 4 bytes.
Format is like this:
[[[byte0,byte1,byte2,byte3],time],...]
Not sure if it uses lists or tuples, since I use it mainly for output
and I don't have MIDI input on this machine to test it...
Hope this helps.
--
Jesse Hager
email = [EMAIL PROTECTED].decode(rot13)
--
http://mail.python.org/mailman/listinfo/python-list