making automatic sound file (to disc) recorder?
i want to make this patch wich automatically records samples out of battery to my hard-disc.
so i've got 64 samples in battery3 wich all have different effects per sample wich i want to bounce one by one automatically.
i want to select a folder for the next 64 samples (1 battery3 kit) wich i'm gonna record and from their on it should regulate its self until it recorded 64 samples.
i already have and idea how to trigger notes and how to let max wait until a sample is finished and only then trigger and record the next.
the problem is the following:
i need max to automatically open an audio file with a variable name dependent on how many samples are recorded by then (so an increasing "number".aiff from 1 to 64)
But this what i can't figure out.
i tried to send the message "open $1.aiff with an increasing number coming in the message box.
this doesn;t seem to work. even not in the help file where they demonstrate it with a .wav file. i get this error in my max-window:
sfrecrod-->can;t make file 1.aiff err-1.
i could specify one folder for the next 64 samples and let it do his things or i saving an audio file to disk something i can't automate (wich i can't imagine).
try sprintf %ld instead of the message box. Message boxes will add spaces in there.
sprintf open %ld_wave.aiff
sending in an int will replace the %ld thus:
sprintf open 5_wave.aiff
For auto-saving etc., you should be able to do whatever you want using varieties of and , among other objects perhaps.
When you're using the "bang when read/write completed" on buffer~ objects, or any object that reads/writes substantial files, put in a few seconds delay before starting the next thing, just to be sure the disk operation really is done. And be sure you have a "panic button" to get you out of any automated processes, lest you freeze things forever....simplest way may be to have a gate before the integer going into the . Have a key command to toggle the gate too, in case the mouse gets unresponsive.