Limit polyphony

Hello, I own Bome MIDI TP and bomebox and would like a little help from a kind soul!
Is it possible to limit the the amount of notes going to a certain output?
Some plug-ins on my iPad seem to be getting overwhelmed when I play to many notes while using the sustain pedal and I would like to limit the amount of notes going to the iPad to say 16 notes, maybe by dropping the oldest notes or something like that. Any help would be greatly appreciated!!

Yes, it could be done yet it will take a bit of planning to design such a solution which would be beyond the free support offered here. I can provide a recommended strategy, however.

  1. Every time a note-on is received, you use a global variable to increment the note count. You also put the note number into a different global variable indicating it is being played. You set up 16 global variables for notes that are currently being played.

  2. Every time a note-off is received, you decrement the note count and lookup which note variable is being used and set that variable to -1 (indicating that the variable is unused or not being played.

  3. Before assigning a note to a global variable at note-on, you look up the next unused global variable (variable =-1) and store the note there.

  1. You track the order of notes played in another 16 global variables as they come in (0-15) and map those variable names to the note variables as described in step 1. As new notes are played, you would need to update these variables to determine on a note-on, which of the 16 notes to drop (note-off) if the note count is greater than 16. If the count is greater than 16, you find the oldest note and send note-off for that, send the note-off and then replace the global variable with the new note and mark it as the newest note.

Anyway, that is the general strategy and as as you can see, it can be quite complex. I’ve done similar projects to this in the past and they took me several hours and I’ve been doing this for some time. The time it takes is primarily why this is beyond the scope of free support.

There may be other strategies that would be simpler but as of yet, I have not found one. Essentially the idea is a FIFO (first in first out) list with a size of 16. Every time a new note is played it is added and played. If the size is 16 then we send note-off and take the first note off of the list replacing it with the new note at the front.

Since MT Pro only has one variable type (signed integer), we have to use these to build our data structures and wrap code around them to control their behavior.

Keeping global variable names consistent can help.

For instance for note list, I would probably use g0-gf and for the note order I would use h0-hf and for the global count I would use maybe i0

I hope this steers you in the right direction!

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz