Checking note-offs in a list of note-ons and note-offs

yns's icon

I have a list of note-ons and note-offs represented as symbols: ("60 100" "65 127" "65 0" "61 99" "65 0").

From this list I need to know wich note-ons in this list (notes with a velocity value higher then 0) did not receive a corresponding note-off (a note with a velocity value of 0). Those note-ons should be placed at the very end of this list in the order they occur in the first list.

Can't figure out how to make a system to do this nice and efficient, the system would also have to be capable of doing this within 10 milliseconds.

Any suggestions?

Luke Hall's icon

I'd probably look to [bag] which is pretty handy in situations like this.

Max Patch
Copy patch and select New From Clipboard in Max.

lh

Chris Muir's icon

Borax may help in cobbling together a system like this.

yns's icon

Thanks for the suggestions but I'm not there yet.

The first suggestion would be precisely what I need if it would output exactly the same list as inputted with the "cancelled" values removed.

I'm still trying to find a other solutions.

Tj Shredder's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This sounds a bit like standard poly stuff, maybe this is helpful: