File: StartupFile.schelp

package info (click to toggle)
supercollider 1%3A3.13.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 80,292 kB
  • sloc: cpp: 476,363; lisp: 84,680; ansic: 77,685; sh: 25,509; python: 7,909; makefile: 3,440; perl: 1,964; javascript: 974; xml: 826; java: 677; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (47 lines) | stat: -rw-r--r-- 2,149 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
title:: Sclang Startup File
summary:: The sclang startup file
categories:: Language

Once the class library is finished compiling the interpreter looks for a file at code::Platform.userConfigDir +/+ "startup.scd":: and if such a
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
specific customizations.

definitionList::
## Linux   || teletype::~/.config/SuperCollider/startup.scd::, according to the xdg base directory specification
## macOS   || teletype::~/Library/Application Support/SuperCollider/startup.scd::
## Windows || teletype::C:\\SuperCollider\\startup.scd:: (or similar, depending on the location of the SuperCollider installation)
::


A common example would be to alter the options of the local and internal Servers:
code::
// placing the following code in the file will cause these modifications to be made
// at startup (see also: ServerOptions)

Server.local.options.numOutputBusChannels = 4;	// change number of input and output channels
Server.local.options.numInputBusChannels = 4;
Server.internal.options.numOutputBusChannels = 4;
Server.internal.options.numInputBusChannels = 4;

Server.local.options.device = "Built-in Audio";	// use a specific soundcard
Server.local.options.device = "MOTU Traveler";
Server.local.options.device = "TASCAM US-122";
Server.local.options.device = "Jack Router";
Server.local.options.device = nil;				// use the system default soundcard

Server.local.options.blockSize = 128; // increase block size (default is 64)
Server.internal.options.blockSize = 128;

Server.local.options.sampleRate = 96000; // increase sampling rate (if your hardware supports it)
Server.internal.options.sampleRate = 96000;
Server.internal.options.sampleRate = nil;	// use the currently selected samplerate of the soundcard

// change the standard archive path to a custom one:
Archive.archiveDir = "~/scwork".standardizePath;

// hook up jack ports to audio channels
"SC_JACK_DEFAULT_INPUTS".setenv("system");
"SC_JACK_DEFAULT_OUTPUTS".setenv("system");

::
Naturally the file must contain only valid SC expressions.