Smoothed Preset Interpolation with line envelope

slx's icon

Hi,

is there a way to smooth out the interpolation of presets especially if line and function is used as an envelope?

Thanks in advance,

Sebastian

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

TFL's icon

The problem here is that the function envelop is retriggered from start every time it changes during interpolation. You'll probably need another way to apply it, like evaluating the function by sending it a float instead of letting a [line~] playing the function, or storing it in a buffer and read your buffer as a modulation source.

Here is option 1:

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

Here is option 2 but poorly implemented:

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

I got option 1 idea from this thread.

slx's icon

hey TFL,

thank you. super nice ideas.

both are interesting and I will check them further out.

best,

sebastian

p.s. why is there a "change" object between the "toggle" and the "metro"?

TFL's icon

p.s. why is there a "change" object between the "toggle" and the "metro"?

The [toggle] being stored in [preset], it will continuously output 1s or 0s as you interpolate. The 1 will make the [metro] to restart and send a bang, which we don't want, so I filter out repetitions with [change]. Alternatively we could avoid storing that [preset] in [preset], or use @changemode 1 if you were using [pattrstorage] instead of [preset].

Actually I was wrong in my previous message, at least not very precise: I said "the function envelop is retriggered from start every time it changes during interpolation". Actually, it's that [toggle] sending ones that would cause the [metro] sending bangs and in turn triggering the function continuously.

slx's icon

oh. clean way. I set the metro with @active 1 in another patch but that did not stop the unwanted glitch.

thanks again.

mizu's icon

maybe stupid but exclude the toggle to metro from the preset ?

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

hth

mz

slx's icon

hi mizu (beautful name!),

not stupid at all. also the "@active 1" solves that. my original patch was a bit more complex than the posted one and I lost track what I already tried out.

best,

sebastian