Forums > MaxMSP

crossfade loops

January 21, 2012 | 10:50 am

I want to crossfade loops and wondered how you guys do this.
So far I figured out how to do ducking, but I would like a crossfade instead.
Because, of course, it’s smoother.
And I have found a way to do it, but it isn’t a fancy way.

So yeah, anyone?


January 21, 2012 | 11:31 am

I suppose it depends on what your definition of ‘fancy’ is….

– Pasted Max Patch, click to expand. –

Brendan


January 23, 2012 | 3:14 pm

Actually I meant the patch below.
I searched the forums a bit more thoroughly and found something that helped.

– Pasted Max Patch, click to expand. –

January 23, 2012 | 3:57 pm

nice one


January 23, 2012 | 4:17 pm

and here’s a ‘reductive’ version using [trapezoid~] -> [sinx~] for crossfade time. Pretty much does exactly what the crossfade buffer does, but easier for a n00b like me to understand!

Brendan

– Pasted Max Patch, click to expand. –

January 23, 2012 | 4:59 pm


January 23, 2012 | 5:07 pm


January 23, 2012 | 5:27 pm

edit:

[trapezoid~ 0.1 0.9] –>

[*~ 1.5] –>

[sinx~]

– Pasted Max Patch, click to expand. –

January 23, 2012 | 5:34 pm

I see.

But actually, I think trapezoid doesn’t make a crossfade.
In my first example you see one player fades out and the other fades in.
I don’t see the same thing with the trapezoid example.


January 23, 2012 | 6:35 pm

Are you sure?

– Pasted Max Patch, click to expand. –

January 23, 2012 | 7:37 pm

Yeah, I’m sure.
The trick is the phasor goes from 0 to 2 in this case.
When the phasor’s value is bigger than 0 it triggers a fade-in
and when its value is bigger than 1 it triggers a fade-out.
So unfortunately trapezoid~ won’t work, I guess.
Which is a shame, because to me it looked a lot cleaner.

– Pasted Max Patch, click to expand. –

January 23, 2012 | 9:08 pm

Sorry Dave
I have to put my hands up – the [cycle~] phase inlet wraparound theory is a bit beyond me I’m afraid, but I take your point.

Best
Brendan


January 23, 2012 | 11:09 pm

Well,
The phasor going into [cycle~] is going from 0 to 1, so it doesn’t have to wrap around.
However the phasor going into [play~] is going from 0 to 2.
This way we can read the buffer from 0-1100ms.
And when one [play] reaches a 1000ms, the other [play~] starts at 0ms.

– Pasted Max Patch, click to expand. –

Viewing 13 posts - 1 through 13 (of 13 total)