Fading out between cues

slinky's icon
cue file draft 1.maxpat
Max Patch

Hello!

I want each audio file to fade out when pressing the next cue e.g. when I press cue 2, I want cue 1 to fade out. I made each file significantly longer than needed to liberate the performers (and some have some rather abrupt endings and therefore click). How do I do this? I have attached the patch above. I have already faded in the starts of the audio files, therefore I do not need a fade in. I am using a midi pedal to trigger cues, which is the midi value at the top.

Thanks :)

TFL's icon

Here is the most straightforward way I could think of regarding your current patch. Fade outs are 1000ms long, and I also added fade ins of 100ms since I needed a way to get the volume back to 1 when a given file is playing, and it was really not much to add.

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

BUT, I would also say it is probably not the best way to do what you want. Assuming you want the next file to start playing while the previous one is fading out, you really just need two players, not one per file:

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

Wil's icon

Look at playlist help file about dict

Good practice to learn about playlist the way you already have

using [get durationms] to create delay

you can easily overlap fadeout/fadein of next file

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

//

and if you want to get really savvy, you only ever need 2 of these players

repopulate the one that isn't playing with the next file at moment fade out ends

Source Audio's icon

You should anyway tailor audio files to end without artifacts.

that way they don't need to be "significntly" longer then needed,

and end smoothly if one does not trigger anything.

you need 2 players.

I made this for someone else asking same question a while ago ...

maybe it can fit for what you need

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

slinky's icon

Thank you so much!