Multichannel files recording // How to read the file?

Hi everyone ,

I’m recording the output of a “song” that I need to keep on separate tracks for later editing.

When I try to open the file in Audacity, it only reads the first few seconds.
The audio file is 24GB… even though it’s only about 30 minutes

the code I use to record audio is

(

var chnls = 117;
Server.local.options.memSize_(2.pow(20));
Server.default.options.outDevice_("Built-in Output");
Server.default.options.numOutputBusChannels = chnls;
s.recChannels = chnls;
s.options.sampleRate = 44100;
s.recSampleFormat = "int24";
s.reboot;
)
s.meter;
s.plotTree;

s.record // start rec
s.stopRecording; //  stop rec close the file

Do you have any experience in this regard?

Should I have more then 24 GB of RAM to open it?!?!?

Do you have in mind a way to open the file with the separate tracks in a daw?

I just tried with a shorter recording and actually there aren’t problems, it seems…
But I need long recording around 30 minutes (44100) 24bit

Thanks

You try to record 117 channels, so

117 * 24bit * 44100 samples/sec = 123832800 bits/sec ≈ 120 Mbit/s ≈ 1 GB/min

Looking at wikipedia article about wav it says

The WAV format is limited to files that are less than 4 GiB, because of its use of a 32-bit unsigned integer to record the file size header.

You can check out all available recording formats on documentation of SoundFile | SuperCollider 3.13.0 Help (section headerFormat) which also mention this

Please note that WAV file support is limited to 4GB. For output of multiple channels or very long recordings we suggest to use RF64, W64, or CAF (on macOS).

For managing large audio files with many channels I found Reaper immensely useful - it can be downloaded for free at reaper.fm and provides great routing functionality.

I hope this helps you.

1 Like

Yes. You need w64 or Caf. Reaper deals with w64, so that is a good way to play back those files and explode to multiple mono. I have used this setting in NRT with success:

score.recordNRT(
	outputFilePath: outFileName,
	sampleRate: sf.sampleRate,
	headerFormat: "w64",
	sampleFormat: "int32",
	options: server.options,
	duration: dur,
	action: {postf("done! % seconds \n", (Main.elapsedTime-time))}
);

Should easily translate to what you need.

1 Like

I think you can record caf or w64 directly from SC. libsndfile supports a number of different formats. Before you start recording execute>

s.recHeaderFormat = "CAF"

or

s.recHeaderFormat = "W64"

… at least for me both formats created audio recordings that I could open in Audacity.

1 Like