From c2d0fa50a8c7b021c9c85b6c839004d8c417b6db Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 1 Jan 2014 22:35:36 +0100 Subject: Adding Supercollider startup files --- .config/SuperCollider/sc_ide_conf.yaml | 79 +++++++++++++++++ .config/SuperCollider/sclang_conf.yaml | 5 ++ .config/SuperCollider/startupfiles/shared.scd | 5 ++ .config/SuperCollider/startupfiles/startupMotu.scd | 14 ++++ .../SuperCollider/startupfiles/startupSystem.scd | 15 ++++ .../startupfiles/startup_example_customize.scd | 98 ++++++++++++++++++++++ .../startupfiles/startup_example_simpleJIT.scd | 54 ++++++++++++ 7 files changed, 270 insertions(+) create mode 100644 .config/SuperCollider/sc_ide_conf.yaml create mode 100644 .config/SuperCollider/sclang_conf.yaml create mode 100644 .config/SuperCollider/startupfiles/shared.scd create mode 100644 .config/SuperCollider/startupfiles/startupMotu.scd create mode 100644 .config/SuperCollider/startupfiles/startupSystem.scd create mode 100644 .config/SuperCollider/startupfiles/startup_example_customize.scd create mode 100644 .config/SuperCollider/startupfiles/startup_example_simpleJIT.scd (limited to '.config/SuperCollider') diff --git a/.config/SuperCollider/sc_ide_conf.yaml b/.config/SuperCollider/sc_ide_conf.yaml new file mode 100644 index 0000000..b15ee2b --- /dev/null +++ b/.config/SuperCollider/sc_ide_conf.yaml @@ -0,0 +1,79 @@ +IDE: + editor: + blinkDuration: 600 + colors: + evaluatedCode: !textFormat + color: "#000000" + background: "#f8a200" + lineNumbers: !textFormat + {} + matchingBrackets: !textFormat + color: "#ff0000" + bold: true + mismatchedBrackets: !textFormat + color: "#ffffff" + background: "#960000" + searchResult: !textFormat + color: "#7a7a7a" + background: "#36475a" + selection: !textFormat + {} + text: !textFormat + {} + font: + antialias: 2 + family: DejaVu Sans Mono + size: 10 + highlighting: + built-in: !textFormat + color: "#3333bf" + char: !textFormat + color: "#007300" + class: !textFormat + color: "#0000d2" + comment: !textFormat + color: "#bf0000" + env-var: !textFormat + color: "#8c4614" + keyword: !textFormat + color: "#0000e6" + bold: true + number: !textFormat + color: "#980099" + primitive: !textFormat + color: "#3333bf" + string: !textFormat + color: "#5f5f5f" + symbol: !textFormat + color: "#007300" + indentWidth: 4 + lineWrap: true + spaceIndent: false + stepForwardEvaluation: false + interpreter: + autoStart: true + runtimeDir: "" + mainWindow: + detached: !QVariantMap + documents-dock: "" + help-dock: "" + post-dock: "" + geometry: AdnQywABAAAAAAAAAAAAAAAABP8AAAMIAAAAAAAAAC0AAAN/AAADTAAAAAACAA== + state: AAAA/wAAAAD9AAAAAgAAAAAAAAAAAAAAAPwCAAAAAfsAAAAcAGQAbwBjAHUAbQBlAG4AdABzAC0AZABvAGMAawAAAAAA/////wAAAGMA////AAAAAQAAAlsAAAK//AIAAAAC+wAAABIAaABlAGwAcAAtAGQAbwBjAGsBAAAAFQAAAhIAAABMAP////sAAAASAHAAbwBzAHQALQBkAG8AYwBrAQAAAigAAACsAAAATAD///8AAAKkAAACvwAAAAEAAAACAAAAAQAAAAL8AAAAAA== + postWindow: + lineWrap: false + scrollback: 1000 + recentDocuments: !QVariantList + - /home/dave/.config/SuperCollider/startup.scd + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/scoreTick.scd + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/scoreTest.scd + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/HabitSynth.sc + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/HabitScheduler.sc + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/habits + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/habit.scd + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/Habit.sc + - /home/dave/Dropbox/tu-berlin/courses/SE Time and space perceptions in sound installations/habits/HabitTimer.sc + shortcuts: + editor-document-next: Alt+K + editor-document-previous: Alt+J + startWithSession: last \ No newline at end of file diff --git a/.config/SuperCollider/sclang_conf.yaml b/.config/SuperCollider/sclang_conf.yaml new file mode 100644 index 0000000..dcf7a25 --- /dev/null +++ b/.config/SuperCollider/sclang_conf.yaml @@ -0,0 +1,5 @@ +includePaths: + [] +excludePaths: + [] +postInlineWarnings: false \ No newline at end of file diff --git a/.config/SuperCollider/startupfiles/shared.scd b/.config/SuperCollider/startupfiles/shared.scd new file mode 100644 index 0000000..6f6cfc3 --- /dev/null +++ b/.config/SuperCollider/startupfiles/shared.scd @@ -0,0 +1,5 @@ +// change the standard archive path to a custom one: +"Applying shared system settings.".postln; +MP3.lamepath = "/usr/bin/lame"; +MP3.oggdecpath = "/usr/bin/oggdec"; +Archive.archiveDir = "~/Dropbox/software/SuperCollider".standardizePath; diff --git a/.config/SuperCollider/startupfiles/startupMotu.scd b/.config/SuperCollider/startupfiles/startupMotu.scd new file mode 100644 index 0000000..c3626f7 --- /dev/null +++ b/.config/SuperCollider/startupfiles/startupMotu.scd @@ -0,0 +1,14 @@ +Server.local.options.numOutputBusChannels = 8; // change number of input and output channels +Server.local.options.numInputBusChannels = 0;//8; +//Server.local.options.device = "MOTU Traveler"; +//Server.local.options.device = "firewire_pcm"; +//Server.local.options.device = nil; // use the system default soundcard +Server.local.options.blockSize = 128; //256; // increase block size (default is 64) +Server.local.options.sampleRate = 48000; //96000; // increase sampling rate (if your hardware supports it) +Server.local.options.memSize = 6291456;//2097152; // 1048576; +//Server.local.options.maxNodes = 65536; +//Server.local.options.maxSynthDefs = 16384; + +// hook up jack ports to audio channels +"SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm:dev0_cap_Analog1_in,firewire_pcm:dev0_cap_Analog2_in,firewire_pcm:dev0_cap_Analog3_in,firewire_pcm:dev0_cap_Analog4_in,firewire_pcm:dev0_cap_Analog5_in,firewire_pcm:dev0_cap_Analog6_in,firewire_pcm:dev0_cap_Analog7_in,firewire_pcm:dev0_cap_Analog8_in"); +"SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm:dev0_pbk_Analog1_out,firewire_pcm:dev0_pbk_Analog2_out,firewire_pcm:dev0_pbk_Analog3_out,firewire_pcm:dev0_pbk_Analog4_out,firewire_pcm:dev0_pbk_Analog5_out,firewire_pcm:dev0_pbk_Analog6_out,firewire_pcm:dev0_pbk_Analog7_out,firewire_pcm:dev0_pbk_Analog8_out"); diff --git a/.config/SuperCollider/startupfiles/startupSystem.scd b/.config/SuperCollider/startupfiles/startupSystem.scd new file mode 100644 index 0000000..474c732 --- /dev/null +++ b/.config/SuperCollider/startupfiles/startupSystem.scd @@ -0,0 +1,15 @@ +load("/home/dave/.config/SuperCollider/startupfiles/shared.scd"); +"Starting with internal system settings.".postln; +Server.local.options.sampleRate = 48000.0; +Server.local.options.blockSize = 128; +Server.local.options.numOutputBusChannels = 4; +Server.local.options.numInputBusChannels = 2; +Server.local.options.maxNodes = 65536; +Server.local.options.memSize = 2097152; // 1048576 +Server.local.options.maxSynthDefs = 16384; + +// hook up jack ports to audio channels +//"SC_JACK_DEFAULT_INPUTS".setenv("system:capture_1,system:capture_2"); +"SC_JACK_DEFAULT_INPUTS".setenv("system"); +//"SC_JACK_DEFAULT_OUTPUTS".setenv("system:playback_1,system:playback_2,system:playback_3,system:playback_4"); +"SC_JACK_DEFAULT_OUTPUTS".setenv("system"); diff --git a/.config/SuperCollider/startupfiles/startup_example_customize.scd b/.config/SuperCollider/startupfiles/startup_example_customize.scd new file mode 100644 index 0000000..6bd342e --- /dev/null +++ b/.config/SuperCollider/startupfiles/startup_example_customize.scd @@ -0,0 +1,98 @@ +"startup example - customising Menus.".postln; + + // choose which server to use, + // e.g. for teaching, take internal, so scope works +Server.default = s = Server.internal; +{ try { Server.local.window.close } }.defer(0.5); + +s.options + .numAudioBusChannels_(1024) // lots of busses for JITLib + .zeroConf_(false) // don't wait for zeroconf when booting server +// .device_() // maybe set a specific device ? +// .numInputBusChannels_() // with a specific number of ins +// .numOutputBusChannels() // ... and outs - default is 8. + .memSize_(8192 * 32) // memSize is in kB, so 8 * 32 = 256 MB for soundfiles, buffers + + ; + + + // JIT preparation +q = q ? (); // make a global dictionary for everything +p = ProxySpace.push(s); // make a proxyspace and push it. +q.numChans = 8; // number of channels of audio setup + + //text editor tweaks & Library Menu +Platform.case(\osx, { + // put the post window where you prefer + Document.listener.bounds_(Rect(Window.screenBounds.width - 400, 2, 400, 300)); Document.listener.background_(Color.blue(0.2, 0.9)); // and color it. // .alwaysOnTop_(true); + Document.listener.stringColor_(Color(1, 0.62, 0)); + Document.postColor_(Document.listener.stringColor); + + + SkipJack.verbose = false; // reduce info posting + + + // put things in the Library menu: + // Custom Menu Items - OSX only - configure here + CocoaMenuItem.add(["server meter"],{ Server.default.meter }); + CocoaMenuItem.add(["server window"],{ Server.default.window }); + CocoaMenuItem.add(["scope Ins"],{ q.scope = s.scope(q.numChans, index: s.options.numOutputBusChannels, zoom: 9) }); + CocoaMenuItem.add(["scope Outs"],{ q.scope = s.scope(q.numChans, index: 0, zoom: 9) }); + CocoaMenuItem.add(["FreqScope"],{ q.fscope = FreqScope.new }); + + // an 8 chan test sound + CocoaMenuItem.add(["TestSound8"],{ + p[\zztest] = { BPF.ar(Dust.ar(5 ! q.numChans, 50), { exprand(200, 2010) } ! q.numChans, 0.05) + * GrayNoise.ar(0.1, 1) }; + p[\zztest].playN(vol: 0.25); + }); + + CocoaMenuItem.add(["places", "recordings"],{ unixCmd("open" + quote(thisProcess.platform.recordingsDir)) }); + CocoaMenuItem.add(["places", "~/scwork"],{ unixCmd("open ~/scwork") }); + CocoaMenuItem.add(["places", "supportDirs"],{ + unixCmd("open " ++ Platform.userAppSupportDir.asCompileString); + unixCmd("open " ++ Platform.systemAppSupportDir.asCompileString); + }); + CocoaMenuItem.add(["places", "extensionDirs"],{ + unixCmd("open " ++ Platform.userExtensionDir.asCompileString); + unixCmd("open " ++ Platform.systemExtensionDir.asCompileString); + }); + + CocoaMenuItem.add(["quarks", "Quarks.find"], { Window("find in Quarks folder dialog ...").front }); + CocoaMenuItem.add(["quarks", "Quarks.listInstalled"], { + var str = "/**** All currently installed quarks: ****/\n"; + Quarks.installed.do { |quark| + str = str + ("\t" ++ quark.name.asCompileString ++ ".include;\n"); + }; + Document("All currently installed quarks", str); + }); + CocoaMenuItem.add(["quarks", "Quarks.gui"], { Quarks.gui; }); + CocoaMenuItem.add(["quarks", "Quarks.update"], { Quarks.checkoutAll; }); +}); + + // now really start the server, then load setup in doWhenBooted +Task { + 0.5.wait; + s.quit; // sometimes the server must be quit first, + 1.wait; // and waiting between steps can be helpful. + // tell me the new server configuration when booting: + s.boot; // now boot. + s.sync; // wait for doWhenBooted before continuing + + 1.wait; + // do whatever else belongs to setup: e.g. load some buffers, +// q.bufs = "~/scwork/XYZ/sounds/*".pathMatch.do { |path| Buffer.read(s, path) }; +// s.sync; // wit till buffers are there + + // load some code files, wait between loads +// 1.wait; +// "~/scwork/XYZ/patches/*.rtf".pathMatch.collect { |path| +// path.load; 0.5.wait; +// }; + + // s.scope(q.numChans, zoom: 9); + + "startup example with custom Menus done.".postln; + +}.play(AppClock); + diff --git a/.config/SuperCollider/startupfiles/startup_example_simpleJIT.scd b/.config/SuperCollider/startupfiles/startup_example_simpleJIT.scd new file mode 100644 index 0000000..92664e0 --- /dev/null +++ b/.config/SuperCollider/startupfiles/startup_example_simpleJIT.scd @@ -0,0 +1,54 @@ + +"simple JIT startup example.".postln; + + // choose which server to use, + // e.g. for teaching, take internal, so scope works +Server.default = s = Server.internal; +{ try { Server.local.window.close } }.defer(0.5); + +s.options + .numAudioBusChannels_(1024) + .zeroConf_(false) // don't wait for zeroconf when booting server + .memSize_(8192 * 32) // memSize is in kB, so 8 * 32 = 256 MB for soundfiles, buffers + +// // keep several combinations of audio devices + numChannels +// .device_("MicLineOut") // an aggregate device +// .hardwareBufferSize_(512) // 512 is default +// .numInputBusChannels_(8) // 8 is default +// .numOutputBusChannels_(8) // 8 is default + + // comment out unused devices. +// .device_("Fireface 400") +// .hardwareBufferSize_(128) +// .numInputBusChannels_(18) +// .numOutputBusChannels_(18) +; + + +q = q ? (); // make a global dictionary for everything + +p = Ndef.dictFor(s); // make a proxyspace for Ndefs on the default server +p.push(s); // and push it - so Ndef(\asd) === ~asd now. + +s.quit; // in case the server is still running, quit it. + + // decide what should happen after server has booted: +s.doWhenBooted({ + 1.wait; + "server is booted - do further setup here...".postln; + // make some JIT guis: + try { q.pxmix.win.close }; q.pxmix = ProxyMixer(p, 16); + try { q.tdg.win.close }; q.tdg = TdefAllGui(16); q.tdg.moveTo(210, 600); + try { q.pdg.win.close }; q.pdg = PdefAllGui(16); q.pdg.moveTo(420, 600); + + 1.wait; + + Env.perc.test; // and play a test sound if you like + "simple JIT setup done.".postln; +}); + +Task({ + 1.wait; // wait till quit has happened - make longer if needed. + s.boot; // boot again +}).play(AppClock); + -- cgit v1.2.3-54-g00ecf