Introducing BEATS: A Ruby Drum Machine

February 13, 2010

Today it’s time to take the wraps off a project I’ve been working on recently: BEATS, a drum machine written in Ruby, that uses text files.

BEATS runs from the command line. Feed it a YAML text file specifying the song as input, and it produces a Wave file containing a performance of the song as output. Here’s an example song:

Song:
  Tempo: 120
  Structure:
    - Verse:   x2
    - Chorus:  x4
    - Verse:   x2
    - Chorus:  x4

Verse:
  - bass.wav:       X...X...X...X...
  - snare.wav:      ..............X.
  - hh_closed.wav:  X.XXX.XXX.X.X.X.
  - agogo_high.wav: ..............XX

Chorus:
  - bass.wav:       X...X...XX..X...
  - snare.wav:      ....X.......X...
  - hh_closed.wav:  X.XXX.XXX.XX..X.
  - tom4.wav:       ...........X....
  - tom2.wav:       ..............X.

And here is what BEATS produces, using sounds sampled from a vintage Casio keyboard.

Pros and Cons

A few things I like about BEATS:

And what I don’t like so much:

Great! I Want It!

For more info, including installation and usage instructions, visit the official, 100%-authorized BEATS website: http://beatsdrummachine.com.