Sound File Playback Question

Aug 2, 2008 at 5:54am

Sound File Playback Question

Ok so I have a simple question here. I want to be able to load up a patch and have three sounds playback one after another when it receives a bang. Basically just like sflist~ but I can’t stream off disk so I have to use buffer. I thought I could use 3 grooves and 3 buffers and once the first sound finishes playing through the buffer then a bang outputs from the right outlet and I could use that to trigger the next sound but I guess I am wrong. If anyone could help me and point me in the right direction I would appreciate it very much.

#39100
Aug 2, 2008 at 6:04am

You could do this with play~ pretty easily. Take a look at the patch below.(you can also do this with groove~, wave~,etc. just set it up to refer to different buffers upon reaching end of each playback).

Hope it helps:

– Pasted Max Patch, click to expand. –
#137219
Aug 2, 2008 at 6:28am

Hey thanks for the reply but I need the sounds to be able to play the entire duration and always be able to start and stop with sample accuracy even when dynamically changing sounds out. I tried using waveform then send it message 0 -1 0 -1 so it selects the entire duration then having the second to last outlet output the duration time in ms and have that control a metro to change between the three sounds receiving the order from a coll but for strange reason the two of the sounds where about 200 ms and another was 1000 but it would never let the 1000ms play all way through it kept registering it as 200 ms. If that makes sense. Any other suggestions? Thanks again.

#137220
Aug 2, 2008 at 7:01am

ah never mind its all good, thanks a lot raja

#137221
Aug 2, 2008 at 7:04am

Ok, (i was about to mention to try using the “replace” message for buffer~(this will automatically resize the buffer~; (instead of “read”)) and then simply refer your playback object to different buffers, also using info~ object attached to the right-outlet of a buffer~ can give you the replaced soundfiles length immediately upon replacement, etc.) but… hopefully you’ve got everything settled.

#137222

You must be logged in to reply to this topic.