Buffer Triggering with auto replace and fade

soundslike's icon

Hey all, sorry for my silly title, not sure what to call it. I'm doing sound for a dance performance and I'm trying to write a patch that allows me to trigger audio files from one of two buffers. The idea is to use only 2 buffer objects to save resources, even though I'm going to trigger many sound files. While one buffer is playing, the other will replace it's contents automatically and wait until I press a key, which will switch the playing buffer and load the other. I want to include the ability for crossfades between the two, which is where I'm running into problems. I've managed to get the buffers to crossfade properly, but if I make the fade longer than the length of the buffer, everything goes wonky. I need to either find a logical way of dynamically changing the fade maximum so it isn't able to be longer than the buffer, or I need to change the way I'm approaching this patch. I'm using a lot of counter objects, and if they go out of sync with each other the whole patch falls apart. Any suggestions? I guess I could just use ableton haha but I've actually never used it and would rather do this in Max. I'm on Max 5 btw. Thanks!

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

ps. sorry this patch is so messy, work in progress :)

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

oops, here's the actual patch.

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

ok 3rd times a charm, sorry. Yes, I am a noob