Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A command-line drum machine, written in Ruby

tree: 7b18185fc8

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 sounds
Octocat-spinner-32 test
Octocat-spinner-32 web
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 beats.gemspec
Octocat-spinner-32 example_song.txt

BEATS Drum Machine

BEATS is a command-line drum machine written in pure Ruby. Feed it a song notated in YAML, and it will produce a precision-milled *.wav file of impeccable timing and feel. Here's an example song:

  Tempo: 120
    - Verse:   x2
    - Chorus:  x4
    - Verse:   x2
    - Chorus:  x4
    - bass:       sounds/bass.wav
    - snare:      sounds/snare.wav
    - hh_closed:  sounds/hh_closed.wav
    - agogo:      sounds/agogo_high.wav

  - bass:             X...X...X...X...
  - snare:            ..............X.
  - hh_closed:        X.XXX.XXX.X.X.X.
  - agogo:            ..............XX

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

And here's what it sounds like after getting the BEATS treatment. What a glorious groove!

Current Status

The latest stable version of BEATS is 1.2.0, released on July 12, 2010. It brings significant performance and architectural improvements. It also contains a few bug fixes. For more info, see

Development for 1.2.1 is underway on the trunk. This is a minor release which will add a few small features:

  • You can use the | character to represent bar lines in a track rhythm. This is optional, but often makes longer rhythms easier to read.
  • The "Structure" section of the song header is now called "Flow".
  • A pattern can contain multiple tracks that use the same sound. Previously, BEATS would pick one of those tracks as the 'winner', and the other tracks wouldn't be played.
  • Bug fix: A better error message is displayed if a sound file is in an unsupported format (such as MP3), or is not even a sound file.


To install the latest stable version (1.2.0) from, run the following from the command line:

sudo gem install beats

You can then run BEATS from the command-line using the beats command.

BEATS is not very useful unless you have some sounds to use with it. You can download some example sounds from


BEATS runs from the command-line. Run beats -h to see the available options. For more detailed instructions, visit on the BEATS Wiki.

The BEATS wiki also has a Getting Started tutorial which shows how to create an example beat from scratch.

Found a Bug? Have a Suggestion? Want to Contribute?

Contact me (Joel Strait) by sending a GitHub message.


BEATS is released under the MIT license.

Something went wrong with that request. Please try again.