which notes are currently played? object

jazzpa's icon

Hi,
anybody knows, if there is an object, that tells me , which midi notes are currently played? i imagine something similar to the midiflush object, that gives me the number currently played after receiving a bang. but the midiflush-object jus does it once if i then play an additional note it "flushes" just the additional note. i instead want a complete list with all currently played notes.
i could do something like this in c++, but im not that familiar in writing externals in c++ and its probably a little too much work for such a simple function.
if somebody knows such an object or has an idea how to build an abstraction or found a relating topic in the forum, plaese help me.

spectro's icon

Try [borax]

jazzpa's icon

thanks for quick answer. didn't know the borax-objet. quite useful thing. but it doesn't do what i need. i see how many notes are being played, but not which notes. a bang tells me which notes, but only once, just like midiflush. i actually need a list of notes being played, evrytime, some notes are changed. not necessarily all notes are changed. and then im getting trouble with borax.

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

maybe you have to go custom here... maybe the below will get you started. one issue with the patch right now is that it will always show you at least one note. even if there is none. I guess you can get around that easily enough with borax... anyway, it's just a quick mockup that hopefully will you get going.

jazzpa's icon

wow, great patch. it does exactly, what i was looking for. the one last note is not that big problem. i guess i should get into the zl-object. mighty little thing ;)
thanks alot

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

A similar approach, still using borax:

MIB's icon

@Chris: nice. I knew there was a better way with borax ;)

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

How about good ol' bag?

Chris Muir's icon

Nice. I always forget about bag.

jazzpa's icon

nice. never heard of bag. this is pretty intuitive. just what i wanted. and i still find basic objects that im not familiar with. the coll is just what i needed. i knew it was a little too much work to write an c++ external just because of vector possibilities ;) but even with coll my trials would have been a little messy. thanks ev'ryone for the great patches. saved me a lot of work.