diff options
-rw-r--r-- | .config/SuperCollider/startup.scd | 59 |
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; +}); |