turning channels off with mc.voiceallocator

vojko v's icon

I don't think I quite get the mc.voiceallocator.
I want to save CPU and turn off computing for mc channels that are zero in gain, so I plugged in the mc.*~ into the mc.voiceallocator expecting that only some of the channels would be off, but they are all off. And when I unplug mc.*~ from mc.voiceallocator they are all back on.
What am I doing wrong?

here's the compressed code

Max Patch
Copy patch and select New From Clipboard in Max.

and a pic

jg's icon

I found something similar, and I've tried a ton of different solutions: connecting an mc audio signal to voiceallocator produced baffling results unless I was reproducing precisely the sorts of things to be found in the documentation (which is quite poor around this subject in general, especially if you're not thinking in terms of easily quantifiable things like MIDI notes). It doesn't appear necessary to do it anyway - see attached patch. I used 'release' messages to turn voices off, and channels that have been released stop calculation in all of the pertinent objects. CPU use goes down as expected too.

John

Max Patch
Copy patch and select New From Clipboard in Max.

vojko v's icon

I have failed to apply the logic that works for your case on to mine. Are you maybe able to do that?

I'm starting to think that voiceallocator really isn't made for these situations and that we need a new mc object for this, one that simply turns off computing for the audio channel that is sending a zero into it and then turns it back on when it is sending a non zero

jg's icon

The easiest way to apply what I've done is to put my patch at the very end of your signal chain. Feed your mc audio into the final mc.*~ in my patch (and the output of that into an mc.stereo and then mc.ezdac~) . It'll zero the output of unwanted channels, which in turn will shut down calculation in the same channels in any mc object in the same patcher. What you're asking for - a way to turn off computing for the audio channel that's sending 0 - is exactly what my thing achieves.

On the other hand, it'd be nice if any of the kind denizens of the forums here who use mc a lot can suggest a better way to do it! My solution feels a little hacky, tbh...

vojko v's icon

sorry to bother you some more but I failed totally. Here, I connected all you said and it doesn't work at all, take a quick look if you have time

Max Patch
Copy patch and select New From Clipboard in Max.

Jaky's icon

I am pretty happy in using mc.poly, it is a very powerful combination of mc and poly and handles signal management and resources pretty well and in a simple way