TheLongRunSmoke / midiutil

It's a pure Python MIDI library.
Other
2 stars 0 forks source link

can't add 14-bit controller events #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The documentation would make it seem like you can specify any number for 
"param1" in midi.addControllerEvent.

Attempting to add a controller event with paramValue > 255 results in the 
following error:

File "/Library/Python/2.7/site-packages/midiutil/MidiFile.py", line 540, in 
writeEventsToStream
    self.MIDIdata = self.MIDIdata + struct.pack('>B',event.paramerter1)
struct.error: ubyte format requires 0 <= number <= 255

Would be great if we could either extend the lib to support 14-bit messages 
like Pan and Pitch-Wheel. Or maybe there's another way to specify these 
messages and I'm missing something ...

Original issue reported on code.google.com by georgebr...@google.com on 14 Dec 2013 at 5:04

TheLongRunSmoke commented 9 years ago

14-bit controller events is rarely used. Implementation not planned.

TheLongRunSmoke commented 7 years ago

Reup. 14-bit events can be useful.