Getting Started

Let’s make some beats! First, download and install Beats.

Next, you’ll need some *.wav sound files. Download this set of sounds sampled from an ancient Casio keyboard. Unzip that file to a folder.

Hello World Beat

Create a new file in the same folder as the drum sounds you just downloaded. Call it something like song.txt. Open it in a text editor and type the following. (Make sure to indent the lines properly).

Song:
  Flow:
    - Verse

Verse:
  - bass.wav:  X...X...X...X...

This is about the most minimal song you can create. To turn it into a *.wav file, run the following from the command line. (Make sure to run it from the same folder as where the song.txt file is located).

beats song.txt song.wav

If Beats ran successfully, it should print something like the following:

0:02 of audio written in 0.052459 seconds.

There should now be a file called song.wav in the current folder. Play it in whatever media player you like. It should sound like this:

Changing the Tempo

By default, your song will play at 120 beats per minute. You can also specify your own tempo in the song header. This will play faster:

Song:
  Tempo: 200
  Flow:
    - Verse

Verse:
  - bass.wav:  X...X...X...X...

And this will play more slowly:

Song:
  Tempo: 60
  Flow:
    - Verse

Verse:
  - bass.wav:  X...X...X...X...

Adding More Tracks

That four-on-the-floor bass rhythm is nice, so let’s build on top of it. To add a snare drum and a hi-hat, add two more lines to the Verse pattern:

Song:
  Tempo: 120
  Flow:
    - Verse

Verse:
  - bass.wav:       X...X...X...X...
  - snare.wav:      ....X.......X...
  - hh_closed.wav:  X.X.X.X.XX.XXXXX

Repeating Patterns

You can repeat patterns in the Flow. Add x4 to repeat the Verse pattern four times.

Song:
  Tempo: 120
  Flow:
    - Verse:  x4

Verse:
  - bass.wav:       X...X...X...X...
  - snare.wav:      ....X.......X...
  - hh_closed.wav:  X.X.X.X.XX.XXXXX

Adding a New Pattern

Now let’s add another pattern. Call it Chorus. Don’t forget to add it to the Flow. Notice the optional bar line used to separate the two measures in the new pattern.

Song:
  Tempo: 120
  Flow:
    - Verse:  x4
    - Chorus: x4

Verse:
  - bass.wav:         X...X...X...X...
  - snare.wav:        ....X.......X...
  - hh_closed.wav:    X.X.X.X.XX.XXXXX

Chorus:
  - bass.wav:         XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - snare.wav:        ....X.......X...|....X.......X...
  - hh_closed.wav:    XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - conga_low.wav:    X.....X.X..X....|X.X....XX.X.....
  - conga_high.wav:   ....X....X......|................
  - cowbell_high.wav: ................|..............X.

Adding a Kit

In the last example some of the sounds (bass.wav, snare.wav, hh_closed.wav) were used in two different patterns. If you later wanted to switch out the snare sound with a different sample, you’d have to update the sound file in both patterns.

A Kit section lets you give custom labels to sounds in your song. If you later decide to switch out a sound file, you only have to change it once, in the Kit. This also let’s you use a different name than the sound file name.

The patterns in the song below use both sounds that are defined in the Kit, as well as sounds that aren’t:

Song:
  Tempo: 120
  Kit:
    - bass:  bass.wav
    - snare: snare.wav
    - hihat: hh_closed.wav
  Flow:
    - Verse:  x4
    - Chorus: x4

Verse:
  - bass:             X...X...X...X...
  - snare:            ....X.......X...
  - hihat:            X.X.X.X.XX.XXXXX

Chorus:
  - bass:             XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - snare:            ....X.......X...|....X.......X...
  - hihat:            XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - conga_low.wav:    X.....X.X..X....|X.X....XX.X.....
  - conga_high.wav:   ....X....X......|................
  - cowbell_high.wav: ................|..............X.

Swing Beats

Beats lets you swing 8th notes (i.e. every two Xs or .s) or 16th notes (i.e. every X or .).

To do this, add a Swing entry to the song header. The value can either be 8 or 16.

Song:
  Tempo: 120
  Kit:
    - bass:  bass.wav
    - snare: snare.wav
    - hihat: hh_closed.wav
  Flow:
    - Verse:  x4
    - Chorus: x4
  Swing: 8

Verse:
  - bass:             X...X...X...X...
  - snare:            ....X.......X...
  - hihat:            X.X.X.X.XX.XXXXX

Chorus:
  - bass:             XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - snare:            ....X.......X...|....X.......X...
  - hihat:            XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - conga_low.wav:    X.....X.X..X....|X.X....XX.X.....
  - conga_high.wav:   ....X....X......|................
  - cowbell_high.wav: ................|..............X.

Here is the song above with swung 8th notes:

And with swung 16th notes:

Writing Each Track To a Separate Wave File

If you want to use your beat in music software such as Logic, GarageBand, etc., you might want to save each track as a separate *.wav file. This way you can independently mix the volume of each track, add effects to individual sounds, etc.

To do this, add the -s option when running Beats. For example:

beats -s song.txt song.wav

If you add this option when running Beats for the following song:

Song:
  Tempo: 120
  Kit:
    - bass:  bass.wav
    - snare: snare.wav
    - hihat: hh_closed.wav
  Flow:
    - Verse:  x4
    - Chorus: x4

Verse:
  - bass:             X...X...X...X...
  - snare:            ....X.......X...
  - hihat:            X.X.X.X.XX.XXXXX

Chorus:
  - bass:             XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - snare:            ....X.......X...|....X.......X...
  - hihat:            XXXXXXXXXXXXX...|XXXXXXXXXXXXX...
  - conga_low.wav:    X.....X.X..X....|X.X....XX.X.....
  - conga_high.wav:   ....X....X......|................
  - cowbell_high.wav: ................|..............X.

Beats will create the *.wav files below. Note how the bass tracks (for example) for the verse and chorus patterns are combined into one *.wav file.

© 2010-2020 Joel Strait