snorkle icon indicating copy to clipboard operation
snorkle copied to clipboard

Explore Ruby Audio through examples using libraries from various authors

h1. 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":http://www.aquabu.com and on "Twitter":http://www.twitter.com/aquabu. Also, if you are in the Bay Area you should checkout the "Bay Area Computer Music Technology Group":http://www.barcmut.org

h1. 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 [email protected]: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.

h2. 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.

h2. Chuck

h3. 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.

h2. 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)

h2. Scruby

"Scruby":http://github.com/maca/scruby is a SuperCollider client written in ruby by Macario Ortega. Install the gem and watch it compile: sudo gem install maca-scruby

h2. Lilypond

"download":http://lilypond.org/web/install/ or install as a port on mac with: sudo port install lilypond

h2. Bloopsaphone

Bloopsaphone is a great little Ruby library written by _Why The Lucky Stiff and friends for playing Chip Tunes.

h3. Installing Bloopsaphone on OSX

"bloopsaphone":http://github.com/whymirror/bloopsaphone - Why The Lucky Stiff

sudo port install portaudio sudo gem install why-bloopsaphone

h1. 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":http://chuck.cs.princeton.edu/release/files/chuck_manual.pdf
  • "Super Collider PDF (Compiled by Noah from the supercollider help files by Scott Wilson)":http://aquabu.com/assets/2009/11/19/getting_started_with_sc.pdf This tutorial is also available from SuperCollider help, but this is a PDF version.
  • "Toplap live coding wiki":http://www.toplap.org/index.php/Main_Page
  • "Open Sound Control specification":http://opensoundcontrol.org/spec-1_0

h1. Some Related Projects Worth Checking Out That Are Not Included In Snorkle

  • "opaz-plugdk":http://github.com/thbar/opaz-plugdk library for bulding jVSTwRapper plugins with Ruby - Thibaut Barrre
  • "ruck":http://github.com/alltom/ruck is a ruby re-implementation of chuck by Tom Lieber. Primarily non-real time.
  • "core_audio":http://github.com/jvoorhis/core_audio - Jeremy Voorhis
  • "keykit":http://nosuch.com/keykit/ - Tim Thompson