February 13, 2010
Today it’s time to take the wraps off a project I’ve been working on recently: BEATS, a command-line drum machine written in Ruby.
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.
A few things I like about BEATS:
-s option. This is important if you want to use the drum tracks in a program such as Logic or Garageband and mix each track separately.And what I don’t like so much:
For more info, including installation and usage instructions, visit the official, 100%-authorized BEATS website: http://beatsdrummachine.com.