Forums > MaxMSP

How do I get a list of currently held midi notes?


Oct 07 2012 | 12:17 am

Title pretty much explains it. I’ve tried rigging the poly object and routing it so that it makes a list and zl.filters out any notes that are at less than 1 velocity, but this has too many problems and isn’t worth posting here.

This is what I want it to do: any time the object gets a midi note or set of midi notes, send it to the output as a list. Order doesn’t matter. The list’s size has to be the same as the number of notes currently held down. Velocity is disregarded, but it’s probably useful for deciding when the notes are going to be on the list.

Oct 07 2012 | 12:55 am

The [borax] object may be useful for this.

Oct 07 2012 | 2:11 am

I don’t think Borax will do the job here, it can’t easily give you a list of held notes and it cant deal with different midi channels.

Here are two examples one for collecting held note numbers and one for collecting held note number and midi channel which is really useful if you are using a controller which outputs multiple channels simultaneously. Don’t think I’ve ever used the bag object before or since this.

-- Pasted Max Patch, click to expand. --

Oct 07 2012 | 2:34 am

dang, I was just putting the finishing touches on my rig using borax as you posted that! That setup you pasted is more attractive than mine though, and it will definitely be useful when I make the inevitable jump to multiple channels. Thank you very much.

Oct 07 2012 | 3:05 am

No worries, the multiple midi channel one is a bit hackish but it works fine. A more elegant solution would be to use Java or Java script.

I think I forgot to add a bang to the bag object in my first example, i’m sure you’ve worked it out but just bang it when you need the held notes out.

Oct 07 2012 | 7:39 am

I haven’t looked at leafcutter’s approach so this may be redundant and or inefficient:


-- Pasted Max Patch, click to expand. --

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP