Using sfplay~ to play a sequence of sound files

mateomrqz's icon

Hello,

I successfully made a time lapse sound recorder that records 1 second of sound every 20 seconds.
The second part of my patch will require playback of the files once recorded.

I'm avoiding loading them into the buffer for efficiency --

The files are named:

1.aiff
2.aiff
3.aiff
4.aiff
...etc!

How can I achieve this? I've been trying to use a (counter) -- (sprintf open %s.aif) --- (sfplay~)
but no luck!

The files are located in the same folder --

mateomrqz's icon

this is patch idea

3528.BASICPLAYER.maxpat
Max Patch
Peter McCulloch's icon

Are they in your search path? Check the Max window to see if Max isn't finding them (you'll see a "can't find file blahblah.aif" message).

You could also use the full path to the files in your sprintf message.

sleeplesswaves's icon

@mateomrqz

I have a bunch of other stuff going on in the patch @ the post link below, but the core elements of what you want are there too. Maybe you can hack pieces of what I have together into something useable.

The patch is at the top.

Good luck!