diff options
Diffstat (limited to '.config/SuperCollider')
5 files changed, 20 insertions, 37 deletions
diff --git a/.config/SuperCollider/startup.scd b/.config/SuperCollider/startup.scd index 9d905a2..0c12dc3 100644 --- a/.config/SuperCollider/startup.scd +++ b/.config/SuperCollider/startup.scd @@ -1,23 +1,28 @@ -Server.local.options.numOutputBusChannels = 2; -Server.local.options.numInputBusChannels = 2; -Server.local.options.sampleRate = 48000.0; - if(PathName("/dev/fw1").isFile, { - load(Platform.userConfigDir++"/startupfiles/rme_fireface800.scd"); -}); -if(("aplay -l |grep Babyface > /dev/null".systemCmd) == 0, { - load(Platform.userConfigDir++"/startupfiles/rme_babyface.scd"); -}); -if(("aplay -l |grep XUSB > /dev/null".systemCmd) == 0, { - load(Platform.userConfigDir++"/startupfiles/behringer_xusb.scd"); +// if(("which ffado-test").systemCmd == 0, { +// ~ffadoDevice = ("ffado-test ListDevices |tail -1").unixCmdGetStdOut; +// ~ffadoDevice.asArray.postln; +// }); + ~audioInterfaceOptions = ['RME Fireface 800', 28, 28]; + "SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm"); + "SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm"); +},{ + if(("which aplay").systemCmd == 0, { + ~alsaDevices = ("aplay -l").unixCmdGetStdOut; + ~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]}; + }); }); -if(("aplay -l |grep 'Scarlett 18i20' > /dev/null".systemCmd) == 0, { - load(Platform.userConfigDir++"/startupfiles/focusrite_scarlett18i20.scd"); -}); -postln("Loaded settings for: "++Server.local.options.device); +~audioInterface = ~audioInterfaceOptions[0]; +Server.local.options.numOutputBusChannels = ~audioInterfaceOptions[1]; +Server.local.options.numInputBusChannels = ~audioInterfaceOptions[2]; +postln("Loaded settings for: "++~audioInterface); postln("Initializing and connecting MIDI devices."); MIDIClient.init; MIDIIn.connectAll; //TODO: load all quarks from ~/git/audio automatically, don't use symlinks + diff --git a/.config/SuperCollider/startupfiles/behringer_xusb.scd b/.config/SuperCollider/startupfiles/behringer_xusb.scd deleted file mode 100644 index fce30ef..0000000 --- a/.config/SuperCollider/startupfiles/behringer_xusb.scd +++ /dev/null @@ -1,5 +0,0 @@ -Server.local.options.numOutputBusChannels = 32; -Server.local.options.numInputBusChannels = 32; -Server.local.options.blockSize = 128; // default: 64 -Server.local.options.device = "Behringer XUSB"; - diff --git a/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd b/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd deleted file mode 100644 index d8c9060..0000000 --- a/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd +++ /dev/null @@ -1,4 +0,0 @@ -Server.local.options.numOutputBusChannels = 20; -Server.local.options.numInputBusChannels = 18; -Server.local.options.blockSize = 128; // default: 64 -Server.local.options.device = "Focusrite Scarlett 18i20"; diff --git a/.config/SuperCollider/startupfiles/rme_babyface.scd b/.config/SuperCollider/startupfiles/rme_babyface.scd deleted file mode 100644 index f778262..0000000 --- a/.config/SuperCollider/startupfiles/rme_babyface.scd +++ /dev/null @@ -1,5 +0,0 @@ -Server.local.options.numOutputBusChannels = 12; -Server.local.options.numInputBusChannels = 10; -Server.local.options.blockSize = 128; // default: 64 -Server.local.options.device = "RME Babyface"; - diff --git a/.config/SuperCollider/startupfiles/rme_fireface800.scd b/.config/SuperCollider/startupfiles/rme_fireface800.scd deleted file mode 100644 index fbf1390..0000000 --- a/.config/SuperCollider/startupfiles/rme_fireface800.scd +++ /dev/null @@ -1,8 +0,0 @@ -Server.local.options.numOutputBusChannels = 28; -Server.local.options.numInputBusChannels = 28; -Server.local.options.blockSize = 128; // default: 64 -Server.local.options.device = "RME Fireface 800"; - -"SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm"); -"SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm"); - |