1 title:: Sclang Startup File
2 summary:: The sclang startup file
5 Once the class library is finished compiling the interpreter looks for a file at an operating system dependent path and if such a
6 file exists, executes any code within it (this happens within link::Classes/Main#-startup::). By creating a file in this location you can make user
7 specific customizations.
10 ## Linux || teletype::~/.config/SuperCollider/startup.scd::, according to the xdg base directory specification
11 ## OSX || teletype::~/Library/Application Support/SuperCollider/startup.scd::
12 ## Windows || teletype::C:\\SuperCollider\\startup.scd:: (or similar, depending on the location of the SuperCollider installation)
16 A common example would be to alter the options of the local and internal Servers:
18 // placing the following code in the file will cause these modifications to be made
19 // at startup (see also: ServerOptions)
21 Server.local.options.numOutputBusChannels = 4; // change number of input and output channels
22 Server.local.options.numInputBusChannels = 4;
23 Server.internal.options.numOutputBusChannels = 4;
24 Server.internal.options.numInputBusChannels = 4;
26 Server.local.options.device = "Built-in Audio"; // use a specific soundcard
27 Server.local.options.device = "MOTU Traveler";
28 Server.local.options.device = "TASCAM US-122";
29 Server.local.options.device = "Jack Router";
30 Server.local.options.device = nil; // use the system default soundcard
32 Server.local.options.blockSize = 128; // increase block size (default is 64)
33 Server.internal.options.blockSize = 128;
35 Server.local.options.sampleRate = 96000; // increase sampling rate (if your hardware supports it)
36 Server.internal.options.sampleRate = 96000;
37 Server.internal.options.sampleRate = nil; // use the currently selected samplerate of the soundcard
39 // change the standard archive path to a custom one:
40 Archive.archiveDir = "~/scwork".standardizePath;
42 // hook up jack ports to audio channels
43 "SC_JACK_DEFAULT_INPUTS".setenv("system");
44 "SC_JACK_DEFAULT_OUTPUTS".setenv("system");
47 Naturally the file must contain only valid SC expressions.