help!! poly~ gone rogue, voice won't shut off

    Nov 19 2015 | 11:49 pm
    EDIT December 4:
    SOLUTION! it seems it has to do with something wrong with the C74's "Max MIDI Sender/Receiver", which are M4L MIDI routing devices ( that I used to send MIDI to my patch. As soon as I replaced this MIDI router with the IRCOM's free M4L MIDI router ( the problem disappeared. This is a very unexpected solution, as I was monitoring MIDI input to my poly~ carefully (as in screenshot) and had no duplicate or missing notes. Why this very-upstream MIDI routing was causing the problem is a mystery. However, beware to all that use C74's M4L MIDI routing.
    THE PROBLEM: has plagued me for months, and is finally driving me completely insane. My poly~ is receiving MIDI notes from my keyboard. It's getting all the note on and note off messages. But every ~10-90 seconds when I'm playing, one of my poly~ voices just won't shut off. This happens under all conditions: even when I just play 1 note very slowly, eventually it'll stick.
    THE LEADS: The only way for me to get this rogue poly~ voice to shut off is by going inside of the poly, and manually banging a 0 into the adsr~ object. This is my best lead: I suspect the rogue poly~ voice is in "busy" mode, and won't accept data from outside of poly~ (but why would this include the "allnotesoff" message and the note-off message?). I can also get this voice to turn off by holding down more "voices" than the maximum I set for poly~
    I attached some screenshots. the screenshot from the Max window shows poly~ is definitely receiving all its MIDI on/off messages, through the shown (midinote $1 $2) message. Yet that second note in the print window never turned off!! Resending that (midinote 62 0) again didn't change anything. I had to open the offending poly~ window, and sent a (62 0) message from within.
    This is driving me nuts. Any help would be so appreciated.

    • Nov 20 2015 | 12:44 pm to try, download Micromegas.amxd and Micromegas MIDI Sender.amxd As a bonus for helping me out, you get my super-duper-neato granular sampler-looper :)
    • Nov 27 2015 | 9:39 am
      Bummed no one has offered advice or thoughts. I spent the afternoon trying to fix this. Added a lot to the original post and added screenshots. bump!
    • Nov 27 2015 | 4:10 pm
      I don't really understand poly~'s busy state: sending a gain signal above 0 to thispoly~ will put it in a busy state. This is standard procedure (and I copied this part of my patch from R Henke's Granulator). But if while the poly~ voice is outputting gain it can't receive a noteoff message from outside, how does it ever stop playing?! I must be missing something.
    • Nov 28 2015 | 3:14 am
      what i always say, those überfunctional things like adsr~ or automatic voice management in poly are producing more confusion than benefits.
      i bet that with "target 3, 62 0" this problem would not occur.
    • Nov 28 2015 | 6:39 am
      Thanks for your response Roman. I'm definitely mystified about the cause of this.
      Sending poly~ a message like "target 3, 62 0" assumes that I know which voice is stuck (3), and the MIDI number (62) ahead of time--but this problem equally effects all voices and MIDI numbers. Are you suggesting I do some sort of manual voice management in poly~?
    • Nov 28 2015 | 4:41 pm
      You have quite a big project. Just skimming over it , this place in [NoteIn] subpatcher looks suspicious:
    • Nov 28 2015 | 4:52 pm
      yes of course, i am talking about a scenarion where you also use "target" to start a note.
      doing the voice management outside the poly is the only way how to exactly know what what note events are still running and how to stop them.
    • Nov 28 2015 | 4:56 pm
      Thanks for giving it a look AK, I really appreciate it! edit: Fixed that MIDI processing issue with the hold/latch pedal. Didn't effect my rogue poly~ issue. Problem exists even when bypassing all MIDI processing. It seems it's something in my poly~.
      Roman, I'll see if I can do this. Might you have any example patches that do manual poly~ voice management that I can work from?
    • Nov 28 2015 | 9:40 pm
      in the screenshot AK posted you are banging the expression before the first value from the pack is even there. not sure if you really want this.
      re: examples there are many ways, i prefer to do it round robin style. in modern versions of max/msp you might want to optimize my [110.alloc] with the [cycle] object as routing machine.
    • Nov 28 2015 | 9:42 pm
    • Nov 28 2015 | 9:43 pm
      " File is empty. Please upload something more substantial."
      oh man ^^
    • Nov 28 2015 | 10:20 pm
      oh yeah I'm definitely busted with that pack/trigger timing issue ("My MIDI processing (especially that latch/hold pedal bit) does look a little fishy"...... uh yeah I could say that again). Fixed, didn't effect larger problem though.
      the examples are much appreciated, I'm going to check them out. My patch is already pretty sprawling so I'm a bit concerned about addressing this poly voice~ problem by doing more extensive patching, but I'd chop off my right pinky to solve this so I'm definitely gonna explore this. thanks again.
    • Dec 02 2015 | 9:50 pm
      Roman I checked out your manual poly~ patches, they seem straightforward and might help my problem, however I feel like if I took this route I'd be avoiding some fundamental problem with my patch, or some misunderstanding I have about how poly~ works. It really makes me uneasy. I'd prefer to make one last push at understanding what's wrong with my patch as it is before replacing the adsr~ voice management.
      Any other thoughts on my patch would be deeply appreciated.
    • Dec 04 2015 | 1:06 pm
      problem solved :))) see edit to first post. thanks AK and Roman for offering your thoughts and advice.
    • Dec 27 2018 | 8:34 am
      Hey there Igneous, I'm a MAX/MSP beginner and I've been having the EXACT SAME PROBLEM with my polyphonic synth, but I don't quite understand your solution... does this have anything to do with M4L? cuz I'm using Max 7 outside of Live, (as I said, I'm something of a noob.) and btw the link you posted for IRCAM's MIDI Router is busted. I'd appreciate it if you could explain to me what exactly did you do to solve this issue...
      P.S. I do realize it's been quite a long time since you've had this issue, but it would mean a lot to me if you could help me out.