Basics
Respiration
EEG / EKG
SuperCollider3
Meditation
Documentation
Other Hacks
Last Updated 18-Feb 2005
.: Symbolic Links & SC3 :.
.: Using a startup file :.
Setting up your file structure correctly by using symbolic links and your startup.rtf file can help prevent you from erasing important files by accident when you update or reinstall SuperCollider source code. I've found it most useful to use these methods to link to folders that are located safely and soundly in a folder called 'scwork' in your '~username' folder.
I use symbolic links to remotely load my own classes into the 'DefaultLibary'. Symbolic links and aliases are basically the same, except that programs like SuperCollider are unable follow the alias to the correct folder. Instead you have to use a symbolic link which can only be made by typing a single command in the Terminal window, and which then shows up just like an alias on the desktop. Here's how to get your homemade class definitions and additions to correctly load when you startup or recompile SC3:
ln -s sourceFile targetFile
or as it looked when I did it...
ln -s /Users/aoverton/scwork/aoSC_library /Applications/Apps.Audio/SuperCollider3/build/SCClassLibrary/DefaultLibrary/
It's actually pretty important that you DON'T have an ending slash ( aoSC_library/ as opposed to aoSC_libary ) on your source file, and that you DO have one on your target directory. Keep this in mind if you're getting errors.
You could also use this method to store your Help files, sound files, etc...
Homemade SuperCollider plugins are different and can easily be loaded remotely by creating a 'startup.rtf' file and placing it in your '/Users/username/scwork/' directory. If in SC3 you hit Cmd-j on 'Main', you will see that there is a 'startup' function that automatically loads a file called 'startup.rtf' if one exists. The line looks like this:
"~/scwork/startup.rtf".loadPaths;
Simply create that file and place in the correct spot. If you want to automatically load your custom plugins, simply place the following code in startup.rtf:
//-- LOAD HOMEMADE PLUGINS --//
"SC_PLUGIN_PATH".setenv("~/scwork/aoSC_plugins/".standardizePath); // all plugins in this directory will be loaded
"echo \"Loading Plugins From '$SC_PLUGIN_PATH'\"".unixCmd;
Since SC3 doesn't have a Preferences menu enabled, you can use 'startup.rtf' to create certain default settings things up that you find yourself tweaking repeatedly, for instance the default font for new windows. Here's the code I use to set the default font for new windows AND to set the font for '.sc' files when they open:
// SET DEFAULT FONT TO VERDANA //
Document.initAction = { arg doc;var testForNewFile, testForSCFile, defaultFont;};
defaultFont = Font("Verdana", 10.5);
// Set default font for new windows -- not for already existing files (or else all formatting will be lost)
// ... path for new windows is Nil...
testForNewFile = { doc.path.isNil };
// Set Font and Syntax Colorize whenever opening a .sc file //
testForSCFile = { arg title; title.contains(".sc") };
case(// If NewFile, then set Default Font to Verdana //);
{ testForNewFile.value }, { doc.font_(defaultFont) }
// If opening a .sc file, Set Font to Verdana and syntax colorize for easier reading //
,{ testForSCFile.value(doc.title) }, { doc.font_(defaultFont); doc.syntaxColorize }
// Else, leave the file alone //
Check the 'Document' Help file for more window settings you might want to want to have set automatically. You can also set preferences for your default input and output setup (s.options.numInputBusChannels). Explore....