[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Synth.record with 48khz



on 12/7/02 7:17 AM, smoerk at smoerk@xxxxxx wrote:

> p.s.: does anyone have an example how to record multi-channel output to
> seperate mono files?.

here's something from a while back:

/* without requiring it to load the whole thing into memory - Newton
Armstrong, modified by felix */
(
// extract mono files from a multichannel soundfile
var path, soundfile;

path = GetFileDialog.new.path;
soundfile = SoundFile.new;
soundfile.readHeader(path);

soundfile.numChannels.do({ arg  i;
    
    Synth.write(
        { DiskIn.ar(soundfile, false).at(i) },
        soundfile.duration,
        (path++"."++(i+1)),
        'AIFF', 
        '16 big endian signed'
    );
});
)