mc.edge~ help needed
Hi all,
I am trying to use the voice index outlet of mc.edge~ in combination with a stored list of MIDI values. I have 50 channels of audio using mc, I want to get the voice number of any channel that has an onset event, send that voice index to zl.lookup, which then gives me a stored MIDI value for use in a poly~.
However mc.edge~ only seems to be able to output single values from the voice index at a time and not a list of simultaneously received values from an mc signal.
What other possibilities would I have to detect multichannel onset events and give me a list of voice values?
I am not sure I can combine single values into a list because the incoming information is too variable. Perhaps if we said 'if these multiple voice index numbers arrived within 2ms then make a list and output'?
Thanks in advance.
from edge~ help file

Great, thank you I will give this a spin.
I have a follow up question.
I now have my two lists which I need to combine and reformat for the poly~.
I have a MIDI value and a voice value.
42.643233 2
Need to reformat the lists like this,
42.643233, target 2,
I'm unsure to to achieve this.
When the patch is running the list length can vary from 1 MIDI value + 1 voice value ... to up to 50 of each.
I have attached a bit of code with the essential problem.
Thank you!
correct message would be target 2, 42.643233
because you first have to set target, then send a value.

you could also use coll with embedded note values

Thanks! I did not see that coll solution at first. I am constantly changing the MIDI values so I will stay with the structure I have now I think which is basically an mc.snapshot <> mc.makelist pair and zl.lookup.
Lastly, normally commas separate messages but they seem to be vital in the final list here for the poly~ to understand what is going on...
How to add commas into the formatting?

getting close. I think a prepend will do the trick
prepend ,
chiming in
you can use [sprintf} to get commas
might want to reconsider zl.len -> zl.group

Thanks. I tried using sprintf earlier but it didn't seem happy with lists. I think now there is a structure to iterate through the list in pairs then group values again before sending to the poly~ things will be happier.
not sure what you are doing- but I might use this later
I don't see why should you group messages at all ?
if you change midi values all the time, dump them into coll.
if you use full lists with 50 midi values , insert listfunnel 1
to store them into coll.
Can't be simpler.
OK I will try that out. Thanks.
Also Wil, how unlikely is it that you know Raphael Marsonet?! He is a good friend of mine from university in Sydney way back in the day.
Small world! I did quite a few performances with Raphael when he was in Korea!
PM me - wil.pertz@gmail.com
After thinking about it - (I do poly~ completely different) - I agree with SOURCE AUDIO
OK did a coll version and I agree it's nice and elegant.
The overall patch seems to be working well now.
Detecting onsets using mc.delta~ is being strange. I can worry about that next :)
Big thanks.

rememeber that example I posted triggered on phasor cycle, not audio onset

this is not optimal way :

this is all it needs:

Hi. Sorry i am a bit confused by the last message.
Confused ?
Can you describe what could I try to explain better ?
Is it about edge~ detecting or target message ?
OK I see what you mean now. I had not put a comma in the message and so it was not working.
target $1, $2

I think he means this :)

yep I did that. All is clear once again :)
Thank you both for all the assistance.