Crossfading between more than two sound sources

warp1's icon

I can't believe I'm actually asking this - it seems like such a ridiculously simple problem, but does anyone have a simple, elegant way to transition between sound sources when there is a choice of three or more possible files? I have 3 line objects hooked up to gain sliders and when one is selected it ramps up from 0 to 127 while the other 2 ramp from 127 to 0. The problem is that when the other two sliders are told to ramp down, if they are already at 0 (which can be the case since only one track will be selected at any given time), they jump up to 127 and then ramp down, which is obviously not the behaviour I want as it creates a spike.

I've tried sending the gain slider value as a variable $1 into the line message, but that creates a stack overflow. I've also tried some gating where if the gain slider is already at 0 it does not allow the ramp message through, but that doesn't work either.

This should be a REALLY simple Max 101 thing to do, and logically it is a trivial thing, but I just can't seem to create a way to do it easily. Any advice gratefully appreciated!

brendan mccloskey's icon

Hi
Can you try to solve it with just 2 sliders first perhaps?

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

This patch is just back-of-the-napkin stuff and is therefore not elegant. But it is simple.

Brendan

brendan mccloskey's icon

. . . . I do recall a similar request recently, with a more elegant solution. But you'll have to search yourself I'm afraid as it is now cocktail hour . . . .

goodparleyandorfing's icon
Max Patch
Copy patch and select New From Clipboard in Max.

One way

goodparleyandorfing's icon

I should have written that you'll have to mess with that a bit to get it to do what you want: it is a quadpanner

warp1's icon

OMG. Decode. Goddamit, never did come across this object before. Thank you so much!!!! Exactly what is needed.

brendan mccloskey's icon

(prefab, or roll-your-own? The next big debate possibly. But also the main reason Max is so cool).

Wetterberg's icon

bondo is a genericised trademark. It's used generically for that general type of putty.

"Uzi" always made me laugh, tbh. That, and the weird portmanteaus of "poltocar"," and the like.

Roman Thilenius's icon

for the last 20 quadpanner request i alwayys posted my buffer based solution.

this time i wont, but suggest the search function instead.

warp1's icon

Thanks - I've always thought there was a better solution than panning for this kind of functionality - turns out 'decode' does exactly what I need. Thanks anyway!