Skip to content
Permalink
Browse files

Make sure to select a floppy drive from the number of channels free

  • Loading branch information
ferrybig committed Dec 20, 2019
1 parent 698c4a2 commit 6f89b5f60e024acc3c8ed4b53f7f7119dad79872
@@ -156,7 +156,7 @@ private int nextRoundRobinSubAddress(Integer numberOfChannels) {
int incomingNote = (int)localBindings.get("n"); // NOTE: Could be leftover binding from previously handled message! Confirm this event is a NOTE_ON or NOTE_OFF event!
if (((int)localBindings.get("midiCommand")) == ShortMessage.NOTE_ON) {
// If this is a note on event, increment the sub address to the next available
nextOpenRoundRobinSubAddress = nextOpenRoundRobinSubAddress%8+1;
nextOpenRoundRobinSubAddress = nextOpenRoundRobinSubAddress%numberOfChannels+1;
// Set the note in the map so we know what to turn off the next time we get a note off event
currentNotes.put(nextOpenRoundRobinSubAddress, incomingNote);
return nextOpenRoundRobinSubAddress;

0 comments on commit 6f89b5f

Please sign in to comment.
You can’t perform that action at this time.