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

Igneous Rock's icon

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 (https://www.ableton.com/en/packs/max-7-pitch-and-time-machines/#?item_type=free) 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 (http://forumnet.ircam.fr/fr/produit/ircamax-collection/notesendreceive/) 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.

Screen-Shot-2015-11-27-at-3.31.00-PM.png
png
Screen-Shot-2015-11-27-at-3.31.06-PM.png
png
Screen-Shot-2015-11-27-at-3.34.51-PM.png
png
Igneous Rock's icon

https://github.com/jarenofcalifornia/Micromegas
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 :)

Igneous Rock's icon

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!

Igneous Rock's icon

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.

Screen-Shot-2015-11-27-at-4.07.38-PM.png
png
Screen-Shot-2015-11-27-at-4.07.10-PM.png
png
Roman Thilenius's icon

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.

Igneous Rock's icon

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~?

ak's icon

You have quite a big project. Just skimming over it , this place in [NoteIn] subpatcher looks suspicious:

Zrzut-ekranu-2015-11-28-o-17.11.09.png
png
Roman Thilenius's icon

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.

Igneous Rock's icon

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?

Roman Thilenius's icon

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.

110.alloc_.zip
zip
110.alloc-slave.zip
zip
110.target.zip
zip
110.targets.zip
zip
Roman Thilenius's icon
Roman Thilenius's icon

"110.precede-x.zip: File is empty. Please upload something more substantial."

oh man ^^

110.precede-x.zip
zip
Igneous Rock's icon

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.

Igneous Rock's icon

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.

Igneous Rock's icon

problem solved :))) see edit to first post. thanks AK and Roman for offering your thoughts and advice.

Mehrun Rezakhani's icon

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...

thanks.

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.