change poly~ upsampling factor dynamically in M4L

Alexis Baskind's icon

Hi,

I'd like to be able to change the upsampling factor inside a poly~ imbedded in a M4L device dynamically, i.e. allow the end user to do that while he's using the device. As far as I know, it's impossible to do that yet without recompiling the DSP chain, that is basically to switch off and on the audio. Is there's a way to do that in Live (i.e. to stop Live's audio engine and restart it, or to recompile the DSP chain in a M4L device only)? The only workaround I found yet is to do that through scripting in Max, for example by deleting and recreating a useless MSP object. But this is nasty, and it sounds nasty as well.

Any hope? Or (let's dream a little bit), any hope of a future ability to change the upsampling factor dynamically without recompiling the whole DSP chain? As it's possible to load patches dynamically in poly~ (or plugins in vst~), I guess it's theoretically not impossible.

Am I dreaming?

Alexis

stkr's icon

the very sad answer is no, there is no way at all of doing this in max for live. yet another of the limitations of m4l :-(

in fact in m4l poly~ can hardly do any of the things it can do in max. you cannot even load patches dynamically.

in max alone you get round this by nesting poly~s and dynamically using creation args. same way of changing fft sizes to pfft~ on the fly.

but no, cannot be done in live.

the workaround in live: simultaneously load multiple poly~s on instantiation with different resampling factors / whatever, and simply mute / unmute as needed. makes for a horrible patch but does work.

Wetterberg's icon

>in fact in m4l poly~ can hardly do any of the things it can do in max. you cannot even load patches dynamically.

waaat? That's so sad. That, and the only-stereo-out, are huge bottlenecks.

Alexis Baskind's icon

Thanks for the answers, this is what I thought. I imagine that allowing such local dynamic DSP recompilations in Live would need to modify Live's audio engine, and is not that easy. However that would be a huge improvement to allow that. A simple practical example would be to allow changing the oversampling factor dynamically on a synth to make a trade-off between anti-aliasing and efficiency.

Alexis

stkr's icon

agreed.

as i said though, you can just parallelise multiple poly~s for multiple resampling rates and then just turn them on and off as need. i have done this successfully in a commercial product, and testing with xcode/time profiler proved it works. it just adds a little load time to the device.

good luck.