aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/SuperCollider/startup.scd72
1 files changed, 62 insertions, 10 deletions
diff --git a/.config/SuperCollider/startup.scd b/.config/SuperCollider/startup.scd
index 0c12dc3..14f934d 100644
--- a/.config/SuperCollider/startup.scd
+++ b/.config/SuperCollider/startup.scd
@@ -3,23 +3,75 @@ if(PathName("/dev/fw1").isFile, {
// ~ffadoDevice = ("ffado-test ListDevices |tail -1").unixCmdGetStdOut;
// ~ffadoDevice.asArray.postln;
// });
- ~audioInterfaceOptions = ['RME Fireface 800', 28, 28];
+ ~audioInterfaceOptions = Dictionary.with(*[
+ \name->'RME Fireface 800',
+ \numInputs->28,
+ \numOutputs->28,
+ \inputs->Dictionary.with(*[
+ \adat1->Array.series(8, 12, 1),
+ \adat2->Array.series(8, 20, 1),
+ \analog->Array.series(10, 0, 1),
+ \spdif->Array.series(2, 8, 1)
+ ]),
+ \outputs->Dictionary.with(*[
+ \adat1->Array.series(8, 12, 1),
+ \adat2->Array.series(8, 20, 1),
+ \analog->Array.series(8, 0, 1),
+ \headphones1->Array.series(2, 10, 1),
+ \spdif->Array.series(2, 8, 1)
+ ])
+ ]);
"SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm");
"SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm");
},{
- if(("which aplay").systemCmd == 0, {
+ if(("which aplay > /dev/null").systemCmd == 0, {
~alsaDevices = ("aplay -l").unixCmdGetStdOut;
+ // case defining name, number of input and output channels and a Dictionary
+ // holding Symbols for accessing groups of inputs and outputs by name
~audioInterfaceOptions = case
- {~alsaDevices.contains("Babyface")}{['RME Babyface', 12, 10]}
- {~alsaDevices.contains("XUSB")}{['Behringer XUSB', 32, 32]}
- {~alsaDevices.contains("Scarlett 18i20")}{['Focusrite Scarlett 18i20', 20, 18]};
+ {
+ ~alsaDevices.contains("Babyface")
+ }{
+ ['RME Babyface', 12, 10]
+ }
+ {
+ ~alsaDevices.contains("XUSB")
+ }{
+ ['Behringer XUSB', 32, 32]
+ }
+ {
+ ~alsaDevices.contains("Scarlett 18i20")
+ }{
+ ['Focusrite Scarlett 18i20', 20, 18]
+ }
+ {
+ ~alsaDevices.contains("Fireface UFX ")
+ }{
+ Dictionary.with(*[
+ \name->'RME Fireface UFX',
+ \numInputs->22,
+ \numOutputs->22,
+ \inputs->Dictionary.with(*[
+ \adat1->Array.series(8, 14, 1),
+ \adat2->Array.series(8, 0, 1),
+ \analog->Array.series(12, 0, 1),
+ \spdif->Array.series(2, 12, 1)
+ ]),
+ \outputs->Dictionary.with(*[
+ \adat1->Array.series(8, 14, 1),
+ \adat2->Array.series(8, 0, 1),
+ \analog->Array.series(8, 0, 1),
+ \headphones1->Array.series(2, 8, 1),
+ \headphones2->Array.series(2, 10, 1),
+ \spdif->Array.series(2, 12, 1)
+ ])
+ ])
+ };
});
});
-~audioInterface = ~audioInterfaceOptions[0];
-Server.local.options.numOutputBusChannels = ~audioInterfaceOptions[1];
-Server.local.options.numInputBusChannels = ~audioInterfaceOptions[2];
-postln("Loaded settings for: "++~audioInterface);
-
+Server.local.options.numInputBusChannels = ~audioInterfaceOptions.at(\numInputs);
+Server.local.options.numOutputBusChannels = ~audioInterfaceOptions.at(\numOutputs);
+postln("Loaded settings for: "++~audioInterfaceOptions.at(\name));
postln("Initializing and connecting MIDI devices.");
MIDIClient.init;
MIDIIn.connectAll;