Welcome to %s forums

BrainModular Users Forum

Login Register

'Get number of current voices' from midi input notes

I need help on a Patch
Post Reply
lytz1
Member
Posts: 123
Contact:

Unread post by lytz1 » 09 Jan 2019, 21:09

And once again, hi there.. ;)

I am sorry, have another one here where I could use some help.

There might be already a script or module for that outthere
or another workadound. If so please point me there.

On midi input: I need to get number of voices that are played
as a simple integer data number, so when a three note chord is played,
I get a 3 as result. I need that number to dynamically set the size of several arrays.

I couldn't find anything yet that does that but this seems to be so basic that
I might have overlooked something.

Any ideas?

Thanks,
tL.

lytz1
Member
Posts: 123
Contact:

Unread post by lytz1 » 09 Jan 2019, 21:28

Ok, I've found the first workaround:

Midi In (code1) -> Array Queue (Gets reset on Note Off) -> Get Size Arr = Actual number of voices played right now.

It's a bit shaky and not ideal but might work for now.
If anyone has a better idea, please let me know...

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 09 Jan 2019, 21:36

if thtas siùmple track of currently received notes, you can use midi get message module, it will split datas on outputs, and if there are chord of 3 notes on youll see ann array of 3 144,144,144 on the msg.
so can use =144 to create an array that will look here like 1,1,1. a sum array out of that give you 3 notes on currently received. (144 beeing not on code)
if say messages receive where 144,128,144, would return you 2.
if need to track over time which note have been on/off, that quite more complex. not sur a script exist currently..

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests