Forums > MaxMSP

Stop audio files overlapping?

January 9, 2012 | 10:29 pm

I’ve got some sounds triggered by a random object but is there anyway of making it so when one plays it stops any others from playing?


January 9, 2012 | 10:31 pm

this part of the patch…

– Pasted Max Patch, click to expand. –

January 9, 2012 | 11:13 pm

I haven’t tested this but it should work in a clunky kind of way

– Pasted Max Patch, click to expand. –

edit actually this is clearer/neater also onebang inited

– Pasted Max Patch, click to expand. –

January 9, 2012 | 11:28 pm

Thanks for the response, but that doesn’t seem to be working.


January 9, 2012 | 11:29 pm

Oh didn’t see your second patch, I’ll try that


January 9, 2012 | 11:34 pm

Not doing what I need it to do, I want the audio file playing to stop when another one is triggered to play


January 9, 2012 | 11:40 pm

well that’s not so hard, just send a stop message to all your playback instances just before you send a play message to the one you want to play


January 10, 2012 | 12:12 am

I don’t understand what you mean, if I put a stop message before the sfplay it will interrupt the signal path from ’1′ and then it won’t play anything.


January 10, 2012 | 12:37 am

use separate patch cords (thats what theyre for).

but also you should really study the sfplay~ help file and you’ll see there’s a more elegant way of doing it by preloading cues and jumping to different cues by simply sending the assigned cue number


January 10, 2012 | 1:03 am

I’m still not completely sure what you’re talking about, is it possible to show me?


January 10, 2012 | 9:35 am

Hi
the Cycling74 elves have created an extensive support network, of which this forum is a small part. Right click on any object and open its helpfile, there you will find ‘common-use’ examples of the object’s application. Look at the ‘See Also…’ dialog too. This way one learns to extend, adapt, improvise and improve. It is a simple and fun way to learn Max.

It’s also common to presume that one’s own implementation or problem is unique and urgent and therefore only solvable via the forum. This is an error. The helpfiles are the quickest and friendliest method, plus one doesn’t get old irate people complaining.

;)
Brendan


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