M4L Midi on devices won't turn off.

Caligula Cuddles's icon

I've been dealing with an odd issue with midi notes in some devices "hanging" indefinitely. I have a an instrument chain in Ableton with a few devices (two Ableton devices and two M4L devices) which receive on/off messages relative to when they're activated in a chain. For whatever reason, eventually I'll find that which I switch the chain to a new instrument, the new instrument is generating sound that won't stop apropos of nothing, but it doesn't seem to do that if the device is in its own track.

I was just setting thing in a new project up, so I didn't have a midi controller hooked up or a midi clip going when I first started having the problem, so there wasn't anything triggering a note, and when I turned on my Push 2, it wasn't truncating the active note, either.; it kept droning. I tried turning the device off and on again (natch), and I even tried inserting a midi flush device, but that didn't do anything either. Is there some way to make sure all midi messages are inactive before switching to a device in a chain?

Help pls/thx.

Mark's icon

i'm not sure if i understood much.
what is actually triggering the midi in the first place? an m4L device? if yes, then the problem probably lies somewhere in there. what type of device is it, an m4L midi effect?

Caligula Cuddles's icon

It's an M4L instrument. I I kept getting the problem last night when I was setting up a template in Ableton. It's legitimately hard to explain because I don't know what was generating the midi signal. I tried a few more times last night with a midi controller set up, and I wasn't getting the ghost note, so that's better, but I'm still having a problem with notes notes getting stuck. Here's what happened last night when I had midi controller hooked up to begin with:

I was playing a note in instrument A and switched the Ableton instrument chain to instrument B. No issues so far. Then I went back to instrument A, the note I was playing before in instrument A was going from when I was playing before I switched to instrument B, but again it won't turn off. I'm assuming there's something weird going in the poly~ and it's not releasing the note.

Is there a way to have poly~ turn off all notes if the instrument is turned off? Some kind of message that can be sent automatically when the device is turned off that kills the midi notes? M4L instruments can take up a lot of CPU, but I can't deal with that droning if I need to toggle the instruments on and off.

Mark's icon

sorry but i haven't worked with poly~since years, i don't even remember how it works.
the only thing i could suggest would be to use midiflush, but you said you already tried that.
i've noticed on these forums that some people use [offer] instead of midiflush. i haven't checked this object out yet, but perhaps it may help you find a solution to your problem.
there should be some topics on these forums regarding this object if you find it's of any use to you.

also , perhaps it isn't related to your problem but it's good to know that transitioning to and from Edit Mode may cause an M4L device to mix up data. if it's a midi device for example and you exit edit mode while a midi note is active, the note may not be flushed and then it will be hung possibly because the [flush] has reset it's "list" while going into performance mode.

Caligula Cuddles's icon

Okay, I think I may have figured something out.
The midi seems to get stuck after a M4L device is turned off, and one it's turned back on, you can't flush the old midi info. However, using the live.thisdevice seems to be able to send the flush when it's turned off, remedying the held note.
So cool. That's good. But adding the live.thisdevice object is giving me two odd console messages all of the sudden:
freeing sero signal?
/ • doesn't understand "#1"

Far as I can tell, the former is usually a weird DSP thing, but I can't see how two objects could create that kind of trouble.
The latter... what does that even mean?

[Edit: putting a toggle in front of the if then object seemed to fix it I think.]