poly~ and sfplay~ - Targeting inactive voices

    Jan 08 2013 | 6:10 am
    So I'm making a sequencer with poly~ objects with sfplay~ inside. I can't wrap my head around how one is supposed to tell it to target an inactive voice when the bang is sent into the poly~.
    It's a very simple patch at the moment. bangs sent to poly~ send a 1 to sfplay~ inside. The target message is what confuses me. What's the correct way to have it only target inactive voices? I'm playing around with gating thispoly~ output to separate outlets to announce the most recent active and most recent freed voices.
    I used zl filter and sort once to make a monophonic synth that kept a list of all notes being held down, which I could probably repurpose within this patch. The free voices list would get sorted numerically each time, and the first value would be used and filtered from the list. I'm reasonably confident this would work for me. However I sort of feel like I'm just approaching it from the wrong direction altogether and like the correct answer is more simple.
    Thank you!

    • Jan 08 2013 | 4:04 pm
      If you must use target messages, you can do something like what you describe with the busymap message, and then fiddle that list. what you probably want to use, however, is the 'note' message to the poly~, together with flagging busy instances (using thispoly~). Have a look at MSP tutorial 21, and the poly~ & thispoly~ references.