Be Your Own Beethoven

During the summer of 1995, I attended Duquesne University’s (now defunct) Multicultural Computer Academy. In-between classes on Pascal and HTML, I got my first introduction to electronic music. I really liked the idea of ‘coding’ music, and spent a whole day writing a program in Basic that played Für Elise through my 486’s built-in speaker.

At some point during that exercise it clicked for me — code and composition are the same thing: a set of instructions executed in a specific order.

Later, I got into hip-hop and learned about sampling & drum machines. Instead of writing music note by note, producers were creating tracks bottom up, using discrete building blocks sampled from other artists. It was like playing with musical Legos!

If you think you’ve got what it takes to be the next Pharrell or Rick Rubin, check out Beats from Joel Strait, a command-line drum machine written in Ruby. It let’s you ‘code’ a track using samples & loops like cymbal crashes and drum kicks.

Beats accepts YAML input, outputs WAV files, and is BYO samples/drum kit. Here’s what the below input sounds like [drum samples are from an Alesis HR-16A]:

<audio src= controls=”controls” </audio>

``` Song: Tempo: 100 Flow: - Verse: x4

Kit: - bass: Alesis_HR16A_01.wav - clap: Alesis_HR16A_17.wav - hihat: Alesis_HR16A_16.wav - tom: Alesis_HR16A_56.wav - snare: Alesis_HR16A_39.wav

Verse: - bass: |X..XX…X..XX…| - clap: |..X………..XX| - hihat: |..X…X…X…X.| - tom: |X……X…….X| - snare: |………..XX…| ```

Join the discussion

2017 Neal Shyam