Closed Robotition closed 6 months ago
Thanks for reporting. I think the root cause is we're interpreting pitch-bend wrongly: the high_nibble == 0xE0
block appears to get the MSB and LSB switched around, and pitch_bend()
ran off of the LSB (which was actually the MSB), and this worked only if the actual LSB was 0, which it will be if the MIDI was generated by a music program slurring to another note (like the ones I used for testing), but if someone comes along with a synth that has a super-accurate analogue pitch-bend sensor it could add bits to the other byte and throw us off. That would result in just a wrong note (not a crash) if it weren't for the pitch-bend range being set so high: the wrong data made us try to pitch-bend by thousands of octaves, which would take us way above the Planck frequency i.e. even the Big Bang couldn't provide enough energy to play that note.
Replacing stream.pitch_bend(channel, value)
with stream.pitch_bend(channel, data[1])
should fix it; I'll get a patch in later.
Also, I think the MIDI Registered Parameter Numbers (RPNs) are controllers 100 and 101, not 64 and 65, so continuous_controller
seems wrong there as well but I'll double check.
This is the output I get from playing this MIDI file: