… when you could as well just get involved in some FOSS projects. And people thank you for your work by sending you presents
.
A big “Thank you!!” goes out to Karl G. who was so kind and decided to give me those two books from my amazon wishlist!!
I'll be having lots of fun in the upcoming weeks!
Releted Articles:
I've been playing a lot with SuperCollider lately. In case you haven't heard of supercollider yet:
SuperCollider is an environment and programming language for real time audio synthesis and algorithmic composition. It provides an interpreted object-oriented language which functions as a network client to a state of the art, realtime sound synthesis server.
Without going into to much detail about SuperCollider there's one thing which was bugging me, namely the built-in editor you get with the OSX distribution. If you're used to vim, working with a different editor is generally quite a pain. On Linux you have the choice between integrating SuperCollider into gedit, emacs, or vim via plugins and all of those are decent editors compared to this:
Luckily, it has been reported that scvim also works on OSX. However, I wasn't able to find any docs about the installation process, so I thought I share the way I got it working.
Obviously you'll need to install vim and SuperCollider
.
Download the latest scvim
archive. The scvim page mentions that you'll need scons and unhtml
for the installation but we'll do a manual install (the scon script doesn't quite
work on OSX anyway) and we also don't install unhtml, which is needed to
generate the help docs, because this is the only thing I haven't got working so
far.
After unpacking the scvim archive we move the vim relevant files into
our ~/.vim folder (create it you don't have one already).
Inside the scvim directory:
$> mkdir ~/.vim
$> cp -a {ftplugin,syntax,indent} ~/.vim
$> cp scvimrc ~/.vim
Then copy the pipe script in the scvim/bin/ directory to your ~/bin
(create it if necesarry) and make it executable.
$> mkdir ~/bin $> cp -a bin/sclangpipe_app.sh ~/bin $> chmod +x ~/bin/sclangpipe_app.sh
In order to make sure that scvim finds the sclang executable of
SuperCollider we just symlink it into our ~/bin directory.
$> cd ~/bin $> ln -s /Applications/SuperCollider/sclang .
Then we have to copy the SCVim.sc SupperCollider class into our extentions
directory (I had to create it too).
$> mkdir ~/Library/Application\ Support/SuperCollider/Extentions $> cp scclasses/SCVim.sc ~/Library/Application\ Support/SuperCollider/Extentions
SCVim comes with a start script which I've slightly modified to make it working with MacVim. I also stripped out the the whole vimrc testing because I'm using only one scvimrc anyway.
#!/bin/sh vim=/Applications/MacVim-7_2-stable-1_2/mvim #parse ops while getopts "gh" opt; do case $opt in h ) echo "supercollider in vim" echo "usage:\nscvim [-h] [-g]" echo "\t -h prints this help" exit 0;; esac done exec $vim --cmd "source ~/.vim/scvimrc" -c "set filetype=supercollider | runtime ftplugin/supercollider.vim | SClangStart" $@
And as the last step we have to make sure that ~/bin is in our $PATH.
Therefore just edit your ~/.bashrc, creat it if necessary and insert the following.
export PATH=~/bin:$PATH
Source it afterwards, or open a new terminal.
$> source ~/.bashrc
That's it if we now run scvim MacVim should start as well as the
SuperCollider interpreter. To get an idea what commands you can use just check
the scvimrc. For a quick test just start scvim enter the following,
select it in Vims visual mode and run <`/`>:call SClang_send() on both
lines. The server should boot and then play a sine wave at 440Hz.
s.boot; { SinOsc.ar(440, 0, 0.5) }.play;
I'm thinking about remapping the whole keys though, the whole <Fn> key
mappings don't seem to work that well here
.
That's it, I hope this might be of help to someone else who's looking for a way to run scvim on OSX. If someone found a way to make the SuperCollider help working with SCVim please let me know
.
Related Articles:
Yesterday I thought it would be a good idea to automatically mirror my github repositories, just in case sth. goes bad
. So I hacked togeter the following little bash script. It uses the github API to fetch the repository information, and the ever-handy xmlstarlet to extract the needed data. It also keeps track of remote branches, but it contains no error logic atm., so use it at your own risk (as a daily cronjob for example). The rest is pretty selfexplanatory, just set your username, API token and backup directory in the script, make it executable and you're done. Comments for possible improvements are of course welcome!
#!/bin/bash # github mirror script # @author Michael Klier <chi@chimeric.de> login=USERNAME token=APITOKEN backup_dir=BACKUPDIR api_url=http://github.com/api/v2/xml repos="$(wget --quiet --post-data="login=${login}&token=${token}" -O - ${api_url}/repos/show/${login} | xmlstarlet sel -T -t -m '//repository' -v name -o ' ')" [[ ! -d ${backup_dir} ]] && mkdir -p ${backup_dir} cd ${backup_dir} for repo in $repos; do branches="$(wget --quiet --post-data="login=${login}&token=${token}" -O - ${api_url}/repos/show/${login}/${repo}/branches | xmlstarlet sel -T -t -m '//branches/*' -v 'name()' -o ' ')" if [ ! -d ${repo} ]; then git clone -o github git@github.com:${login}/${repo}.git ${repo} fi cd ${repo} for branch in $branches; do git branch --track ${branch} github/${branch} 2>/dev/null git pull github ${branch} done cd ${backup_dir} done # vim:ts=4:sw=4:et:enc=utf-8:
Related Articles:
I thought, while am at it, I could also share one of the outcomes of what I use to kill my evenings at home currently, namely improvising on top of self played acoustic guitar loops which are getting mangled in GleechLab.
Yes, there are some noticeable mouse clicks, I removed the tea slurping from the very beginning though and I also sprinkled some wrong notes every now an then to make it less lame
.
Attention, this is again very repetitive and thus maybe boring
.
Download: chizm_tuesday-masada.mp3
Today I was in the mood for another GleechLab session. I'm a big Jazzanova fan, especially when they're featuring Clara Hill and her amazing voice. The following was made using a vocal track of the song “No Use” which I found on one of the singles I own.
Attention: long, repetitive, experimental track ahead. Enjoy (or not
).
Download: chizm_clara.mp3