Crossfade between two different audio files from a buffer?

Oct 9, 2012 at 9:04pm

Crossfade between two different audio files from a buffer?


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.


– Pasted Max Patch, click to expand. –
Oct 10, 2012 at 5:22am

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~

Oct 10, 2012 at 7:34am

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 ?

Oct 10, 2012 at 7:42am

Smart auto-crossfade system Florent !

Oct 10, 2012 at 1:38pm

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

Oct 10, 2012 at 3:49pm

thanks guys! this really helps.

Oct 11, 2012 at 6:40am

@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 ?

Oct 11, 2012 at 1:50pm

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. –
Oct 31, 2012 at 7:30pm

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. –

You must be logged in to reply to this topic.