aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2019-03-02 13:49:49 +0100
committerDavid Runge <dave@sleepmap.de>2019-03-02 13:49:49 +0100
commit2332acc8bdf18a1e5a654926422357028e1e614e (patch)
treefdd98cb72c0eb0eabbd80ba47f0b4abd52d9b390
parent1bdbdf4308a07e7908b2d63b9d1686eb69827cc1 (diff)
downloaddotfiles-2332acc8bdf18a1e5a654926422357028e1e614e.tar.gz
dotfiles-2332acc8bdf18a1e5a654926422357028e1e614e.tar.bz2
dotfiles-2332acc8bdf18a1e5a654926422357028e1e614e.tar.xz
dotfiles-2332acc8bdf18a1e5a654926422357028e1e614e.zip
.config/SuperCollider/startup.scd: Fix ffado-test use. Do not initialize MIDI automatically (better to do that per project for now). Adding potential synthdefs.scd.
-rw-r--r--.config/SuperCollider/startup.scd59
1 files changed, 31 insertions, 28 deletions
diff --git a/.config/SuperCollider/startup.scd b/.config/SuperCollider/startup.scd
index 5815eaa..98d571e 100644
--- a/.config/SuperCollider/startup.scd
+++ b/.config/SuperCollider/startup.scd
@@ -1,28 +1,29 @@
if(PathName("/dev/fw1").isFile, {
-// if(("which ffado-test").systemCmd == 0, {
-// ~ffadoDevice = ("ffado-test ListDevices |tail -1").unixCmdGetStdOut;
-// ~ffadoDevice.asArray.postln;
-// });
- ~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, 8, 1),
- \spdif->Array.series(2, 10, 1)
- ])
- ]);
- "SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm");
- "SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm");
+ if(("command -v ffado-test > /dev/null").systemCmd == 0, {
+ ~ffadoDevice = ("ffado-test ListDevices 2>&1|tail -1").unixCmdGetStdOut;
+ if(~ffadoDevice.contains("Fireface 800"), {
+ ~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, 8, 1),
+ \spdif->Array.series(2, 10, 1)
+ ])
+ ]);
+ "SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm");
+ "SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm");
+ });
+ });
},{
if(("which aplay > /dev/null").systemCmd == 0, {
~alsaDevices = ("aplay -l").unixCmdGetStdOut;
@@ -93,9 +94,11 @@ if(PathName("/dev/fw1").isFile, {
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;
+//postln("Initializing and connecting MIDI devices.");
+//MIDIClient.init;
+//MIDIIn.connectAll;
//TODO: use Quarks interface to install/update needed Quarks instead of symlinking.
-
+if (File.exists(Platform.userConfigDir++"/synthdefs.scd"), {
+ File.readAllString(Platform.userConfigDir++"/synthdefs.scd").interpret;
+});