From 2332acc8bdf18a1e5a654926422357028e1e614e Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 2 Mar 2019 13:49:49 +0100 Subject: .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. --- .config/SuperCollider/startup.scd | 59 ++++++++++++++++++++------------------- 1 file 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; +}); -- cgit v1.2.3-70-g09d2