Snorkle
Snorkle is a compilation of Ruby Audio libraries with examples. It is currently OSX X specific, but most or all of the libraries are available on Linux. It was created by Noah Thorp to go along with his talk “Making Music With Ruby: Patterns, Context, Fun” at RubyConf 2009 and to make it easier for rubyists to explore methods of working on music and audio projects.
You can follow Noah’s adventures on his blog and on Twitter. Also, if you are in the Bay Area you should checkout the Bay Area Computer Music Technology Group
Libraries and Examples
Examples are in the /examples folder.
Snorkle makes use of lots of libraries from various sources. Some of the libraries are referenced as gems (e.g. Bloopsaphone), some require explicit installation (e.g. Lilypad, Chuck) , and some are installed as git submodules (e.g. Opaz-plugdk, Chuckr). For now just follow the install instructions – it’s high on the priorities list to simplify the install – patches for installation would be excitedly accepted :-)
Install snorkle by doing the following:
$ git clone git@github.com:aquabu/snorkle.git
$ cd snorkle/lib/submodules/chuckr # compile/install chuck binary for chuckr
$ rake chuck:setup env=osx
Note: Braid is now used to manage submodules instead of requiring you to init them with git.
To Be Fixed
- There are a lot of libraries here. There should be an installation script for all of them.
- lib/samples has some very large wav files. smaller files for demonstrating the irbivore with chuckr sampler would be better.
Chuck
Non-Real Time Audio Rendering Using Chuck Example
Use lib/simple_render.ck to render non-realtime audio or realtime audio with command line arguments to Chuck.
- You can call chuck from the command line non-realtime using the -s (silent) flag.
- Call this file directly using: chuck -s simple_render.ck:‘filename.wav’:‘80 2’:‘65 2’:‘67 2’
- Command line simple_render arguments are a series of strings seperated by “:”. They consist of a MIDI note number followed by a duration in seconds. ‘60 2’ would be a middle C lasting for 2 seconds.
Chuckr
A ruby wrapper for chuck shreds. To install you will need to go to lib/submodules/chuckr and run:
rake chuck:setup env=osx # compile/install chuck binary (osx|osx-ppc|linux-oss|linux-jack|linux-alsa)
Scruby
Scruby is a SuperCollider client written in ruby by Macario Ortega. Install the gem and watch it compile:
sudo gem install maca-scruby
Lilypond
download or install as a port on mac with:
sudo port install lilypond
Bloopsaphone
Bloopsaphone is a great little Ruby library written by _Why The Lucky Stiff and friends for playing Chip Tunes.
OSX
Installing Bloopsaphone onbloopsaphone – Why The Lucky Stiff
sudo port install portaudio
sudo gem install why-bloopsaphone
Snorkle Primer
These pdfs and web references are well worth reading in support of your ruby audio endeavors or interfacing with non-ruby libraries:
- Chuck Manual
- Super Collider PDF This tutorial is also available from SuperCollider help, but this is a PDF version.
- Toplap live coding wiki
- Open Sound Control specification
Some Related Projects Worth Checking Out That Are Not Included In Snorkle
- opaz-plugdk library for bulding jVSTwRapper plugins with Ruby – Thibaut Barr�re
- ruck is a ruby re-implementation of chuck by Tom Lieber. Primarily non-real time.
- core_audio – Jeremy Voorhis
- keykit – Tim Thompson