Forums > MaxMSP

Crossfade between two different audio files from a buffer?

October 9, 2012 | 9:04 pm

Hello,

I’ve been searching and searching and can’t manage to get this to work. I have a buffer with three audio files in it. If one is playing one of the others gets a bang, the one playing needs to crossfade with the new one. I have attempted to use the line~ object but to no avail. Any help is greatly appreciated. Patch is posted below.

thanks,
Dan

– Pasted Max Patch, click to expand. –

October 10, 2012 | 5:22 am

hey
you don’t have one buffer, you have one polybuffer which contains several buffers
you should have three different play~ objects if you want to read three sounds at the same time
something like that could work if you have short samples

– Pasted Max Patch, click to expand. –

you should definitely check out the help file of polybuffer under the tab "sampler"
and the help of poly~
best


October 10, 2012 | 7:34 am

Also, I don’t see the way you bang a second sound when one is playing. Is that what the [change] object is used to ?


October 10, 2012 | 7:42 am

Smart auto-crossfade system Florent !


October 10, 2012 | 1:38 pm

oh no it’s not smart at all… try it with long sounds and you’ll see what’s wrong with it!


October 10, 2012 | 3:49 pm

thanks guys! this really helps.


October 11, 2012 | 6:40 am

@Florent : I know that if you send a bang as soon as one sound is playing(which is what the original poster intends to do), you’re going to play it for 1000 ms, even if it’s shorter – so I would say this is more embarassing than with long samples considering Danscofi wants to crossfade between sounds. Is that what you mean ? Maybe a solution could be to delay the bang accroding to each sample duration ?


October 11, 2012 | 1:50 pm

no, the issue with my patcher was that I was sending [1, 0 500] to all the other-than the current line~ objects
one possible way to deal with that would be to keep track of the previous "player" played
something like that might work

– Pasted Max Patch, click to expand. –

October 31, 2012 | 7:30 pm

You don’t need to send (1, 0 500) to line~, (0 500) is sufficient, so if they are at 0, they remain to 0.

I tried and it seems to work

– Pasted Max Patch, click to expand. –

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