DhrBaksteen / ArduinoOPL2

Arduino library for use with the OPL2 board (YM3812) and OPL3Duo (YMF262)
MIT License
198 stars 39 forks source link

Unexpected behavior if MIDI channel > 16 #34

Closed DhrBaksteen closed 5 years ago

DhrBaksteen commented 5 years ago

When a MIDI device uses a channel greater than 16 it will cause random instrument settings and volumes due to the sketch not checking channel bounds.

This has been seen when there are multiple USB MIDI devices connected.

https://github.com/DhrBaksteen/ArduinoOPL2/blob/24c819959e5dd2c20cb3e380eca9e626b2ff9446/examples/Teensy/TeensyMidi/TeensyMidi.ino#L125

DhrBaksteen commented 5 years ago

This one should now be fixed