MIDIOut: Index Out of Range error #4652
Labels
bug
Issues that relate to unexpected/unwanted behavior. Don't use for PRs.
comp: sclang
sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
The
_SendMIDIOut
primitive throws an Index Out of Range error when addressing an output port whose index is equal to or greater than the number of input ports. I believe this is because the method checksoutputIndex >= gNumMIDIInPorts
when it instead should checkgNumMIDIOutPorts
:supercollider/lang/LangPrimSource/SC_CoreMIDI.cpp
Line 765 in f806ace
Environment
Steps to reproduce
Expected vs. actual behavior
Expected: touch MIDI device.
Actual:
ERROR: Primitive '_SendMIDIOut' failed. Index out of range.
Removing the first MIDI device (the BCR2000) and re-initializing MIDI allows the same code to be run without error.
The text was updated successfully, but these errors were encountered: