recording with [buffer~], saving to hard disk, then replaying

thesprucegoose's icon

I'm curious if this is possible... I haven't seen anything like it in my forum searching or the [buffer~] help file.

I'd like to record, lets say, 5 seconds of audio, then save it to a folder on my hard drive.

I'd also like to have a [buffer~] play back those files randomly from the hard disk.

My concern is that the files will continue to add to the database and I can't automatically create a [buffer~] for each one manually. I'm assuming I will need two [buffer~]s to do what I want properly.

Anyway, any information I can gather while I work on this would be good, grand, and wonderful.

Many thanks as always,

Francois Weber's icon

May be [sfrecord~] is a way for you ?

jayrope's icon

Francois, how would you automate the sfrecord~ing then? i assume, there should be some automatic opening of a file save dialog, automatically put a generated sequential name in there, save and start recording for 5 secs. - and then all over. is that possible at all in max? scripting again?
i had read a thread about this a while ago, but can't find it anymore.
jrp

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

Luke Hall's icon

you can specify a filename using the "open" message to [sfrecord~] so you can bypass the save as dialog completely. I'm not sure how to specify a certain path though, in the reference it says it saves to the default volume, but I'm not sure how to change this from within max. This means you can use [sprintf] and perhaps [counter] to generate unique names. You can also use the "record" message to specify an amount of time to record for.

lh

Tj Shredder's icon
thesprucegoose's icon

So then according to Phijel's patch (thank you very much by the way) I would have to run that counter out through an outlet and into an inlet to another patch to get it to play back?

I'm trying to get the files it saves to play at a random order. It doesn't matter so much if they repeat in order, just that they are randomized.