Music Boxes and Counterpoint: Two Old Ways to Write Music

Punch your own tune for a paper-strip music box, then learn the rules that taught Mozart and Beethoven to write two voices together.
Long before music apps, people wrote music with holes in paper and with a few strict rules. Both still work, and both teach you something about how music fits together.
A tune made of holes
A small music box has a steel comb: a row of teeth, each tuned to one note. A paper strip with holes moves past the comb, and every hole plucks one tooth. Rows are notes, columns are time, so the strip is a picture of the tune.
In the Music box maker:
- Pick Twinkle, twinkle or start with a blank strip.
- Tap squares to punch or remove holes, then press Play.
- Copy the tune code to save it, and paste it back later.
- On the Paper strip tab, enter your own box's measurements and print the strip at actual size.
The Comb tab shows a neat bit of physics. A tooth is a tiny springy bar, and its pitch goes up with one over its length squared. So the tooth an octave higher, twice the frequency, is only about 71 % as long, not half.
Tip: leave a step between two holes on the same note. A real tooth needs a moment to settle before it can be plucked again.
Two voices that get along
In 1725 Johann Joseph Fux published Gradus ad Parnassum, a counterpoint textbook that Haydn, Mozart and Beethoven all studied. It starts with first species: a slow given tune, the cantus firmus, and one note of your own above each of its notes.
The rules sound strict, but each one has a reason:
- Use only consonances: unisons, 3rds, 5ths, 6ths and octaves.
- Begin on a perfect interval and end on an octave or unison.
- Never move in parallel 5ths or octaves: the two voices would blend into one and lose their independence.
- Avoid big awkward leaps and prefer steps.
The Counterpoint & harmony lab starts with Fux's own example and checks every note of yours. Change a note and press Check to see which rule you broke and why. A second tab names chords and their inversions: type E G C and it tells you that is C major with E in the bass.
Both tools are on the Tools list beside this post.