Forums > MaxMSP

Sound File Playback Question

Aug 02 2008 | 5:54 am

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.

Aug 02 2008 | 6:04 am

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. —
Aug 02 2008 | 6:28 am

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.

Aug 02 2008 | 7:01 am

ah never mind its all good, thanks a lot raja

Aug 02 2008 | 7:04 am

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.

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

Forums > MaxMSP