My best guess is that you might be using an old version of SC where this wasn’t working.
With the current in-development version, I can’t reproduce the problem:
s.dumpOSC(1);
Pbind(\degree, Pseries(0, 1, 2), \dur, 0.5).record("~/test0307.wav".standardizePath, numChannels: 2, server: s, headerFormat: "WAV", sampleFormat: "int16");
// preparing for recording includes this server message
// format is specified correctly
[ "/b_write", 0, "/home/dlm/test0307.wav", "WAV", "int16", 0, 0, 1, 0 ]
s.dumpOSC(0);
f = SoundFile.openRead("~/test0307.wav".standardizePath);
f.dump;
Instance of SoundFile { (0x5625a8186e28, gc=F0, fmt=00, flg=00, set=03)
instance variables [7]
fileptr : RawPointer 0x5625a3069f70
headerFormat : "WAV"
sampleFormat : "int16"
numFrames : Integer 76864
numChannels : Integer 2
sampleRate : Integer 44100
path : "/home/dlm/test0307.wav"
}
f.close;
I do see a recent change to the Recorder class, which could relate to the file format. That was introduced into SC 3.11.2 but I’m pretty sure it isn’t in 3.11.1.
So, if you’re using 3.11.1 or before, it could be an SC bug.
BTW another possible workaround: Audacity doesn’t complain if the recorded format doesn’t match the file extension (I tested this). That is, it looks like the logic for the other tools you mentioned is “this file is named .wav; therefore it must be wav; oh look, the file header isn’t wav; therefore the entire file is garbage and I’m refusing to do anything” (which is fantastically user-friendly process design, right? wonderful use of developer hours, to make it harder for the user… ) Audacity’s logic is, “eh, filename, whatever, this is an AIFF header, so I’ll open it that way.” Then you could export from Audacity.
hjh