Separate Configs per Project

When working with a lot of different projects with a lot of different settings, it can be useful (and even wise) to maintain different configurations for the different projects. When working in the SuperCollider IDE this can be done in the depths of some dialog, but for the hardened geek that enjoys a good terminal session more than anything else, one has to get creative. Luckily the gods of cyberspace have seen fit to bestow upon us the blessings of bash scripting, and this little snippet will take care of everything for us in one bold stroke:

#!/bin/bash

LOCAL_CONF=./sclang_conf.yaml
USER_CONF=$HOME/.config/SuperCollider
if [ -f $LOCAL_CONF ]
then
    cp $LOCAL_CONF $USER_CONF
fi
$EDITOR init.scd

Save this somewhere in your $PATH, alias it to something easy, like vsc, and off you go! Make sure you have a file named sclang_conf.yaml in the top-level of the project, issue the command, and your editor of choice will open the init.scd file, creating it if it doesn’t exist.