In order to render a pattern to disk, I’m building a filename for the recording:
~file=PathName(PathName.tmp++"test.aiff"); // KO
~file=PathName(PathName.tmp++"test.aiff").nextName; // KO
~file=PathName(thisProcess.platform.recordingsDir+/+"test_"++SystemClock.seconds.asInteger++".aiff"); // with a kind of timestamp // KO
~file=PathName(PathName.tmp++"test").nextName; // OK
p=Pbind(
\dur, 0.2,//Pwhite(5,8),
\freq, Prand([33,35,37,38],inf).midicps,
\amp, Pseq([0.8,Pwhite(0.1,0.4,7)],inf)
).record(server: s, clock: t,quant:4, path: ~file, dur: 4 );
)
Only the basic filenames without extension are valid:
PathName(PathName.tmp++"test").nextName
All the other ones throw an error on the record
call:
ERROR: Message ‘standardizePath’ not understood.
RECEIVER: PathName(C:\Users\xyz\AppData\Local\SuperCollider\test.aiff)
Why ?
PS: How to retrieve the current timestamp of the system ? I found SystemClock.seconds
but it isn’t a timestamp.