Hello, new user here.
I created a SynthDef that plays some sounds, when I hit the record button I get this message and no file is written inside the default path
→ localhost
Preparing recording on ‘localhost’
FAILURE IN SERVER /b_write failed
Recording channels [ 0, 1 ] …
path: ‘C:\Users\anton\OneDrive\Documenti\SuperCollider\Recordings\SC_240522_142004.wav’
Recording Stopped: (SC_240522_142004.wav)
→ localhost
Why is it trying to record to OneDrive? That has to be the problem.
Sam
hey thank you for your answer, how can I change the path?
prko
4
To know the current recording path:
Platform.recordingsDir
To change the recording path e.g.:
thisProcess.platform.recordingsDir = "~/Downloads".standardizePath
// or
thisProcess.platform.recordingsDir_("~/Downloads".standardizePath)
Thank you.
Unfortunatelly changing directory made no difference same error
prko
6
Could you test the following code block?
(
s.waitForBoot{
var title, file, duration;
title = "configured3";
//file = thisProcess.nowExecutingPath.dirname +/+ title ++ ".wav";
// <- only works after saving this code block in an SCD file.
file = Platform.recordingsDir +/+ title ++ ".wav";
duration = 4;
SynthDef(\alarm2, { |out = 0, freq = 440|
var signal, filter, env;
env = Env.perc(0.01, 0.25).kr;
signal = BrownNoise.ar * env;
filter = { |source, freq = 440, bwr = 0.001, amp = 1|
Resonz.ar(source, freq, bwr, amp)
};
signal = filter.(signal, freq, 0.001, 9);
FreeSelf.kr(TDelay.kr(env, 3));
signal = filter.(signal, freq, 0.5);
OffsetOut.ar(out, signal)
}
).add;
s.sync;
Pbind(
\instrument, \alarm2,
\freq, Pseq([2, 5, 10] + 83).midicps,
\dur, Pseq([0.2, 0.2, 3])
).record(file, "wav", "float", 1, duration);
duration.wait;
file.dirname.openOS;
Platform.case(
\linux, { ("audacity" + file.quote).unixCmd },
\osx, { ("open -a Audacity" + file.quote).unixCmd; },
\windows, { ("start" + "".quote
+ "C:/Program Files (x86)/audacity/Audacity.exe".quote
+ file.quote).unixCmd; }
)
}
)
Wow It worked!
Can you explain me how can I do that without always copying this code?
Thank you so much
under File, find Open startup file, then adjust the file path to what makes sense for your computer
for example, I have this in mine.
// adjust default recording folder
thisProcess.platform.recordingsDir = "E:/SC-recordings";
prko
9
The following way I already mentioned
or the way @stwbass mentioned should work:
However, you wrote that you had no success with the way I mentioned. So I think @stwbass’ method might not work for you.
Could you attach a demo video? On Windows, you could take a screenshot as a video using Win+G or other tools.
prko
10
@Sam_Pluta @Antongiulio_Giardino
On Windows 11, I have just tested recording in SC using the OneDrive path and it works fine:
-
Evaluating Platform.recordingsDir
returns:
→ C:\Users\pyoun\OneDrive\Documents\SuperCollider\Recordings
-
Selecting ‘Start recording’ from the Server status bar returns:
→ localhost
Preparing recording on ‘localhost’
Recording channels [ 0, 1 ] …
path: ‘C:\Users\pyoun\OneDrive\Documents\SuperCollider\Recordings\SC_240605_125439.wav’
-
Evaluating x = {SinOsc.ar*0.1}.play
returns:
→ Synth(‘temp__1’ : 1001)
-
Evaluating x.free
returns:
→ Synth(‘temp__1’ : 1001)
-
Selecting ‘Recording: 00:00:30’ from the Server status bar returns:
Recording Stopped: (SC_240605_125439.wav)
→ localhost
-
Evaluating Platform.recordingsDir.openOS
returns:
→ C:\Users\pyoun\OneDrive\Documents\SuperCollider\Recordings
-
I can find the file SC_240605_125439.wav and this file works fine!