Posted on

Table of Contents

background

I was inspired by the contents of this blog post and so to help myself investigate the concept a little more I've decided to make a lil beat-maker. THAT BLOG POST IS THE ONLY DOCUMENTATION FOR THE NOTATION IT DESCRIBES IVE BEEN ABLE TO FIND please email me if you know more (you can click the lil mail icon for my email address)

My approach is also partially shaped by my experience in folk dancing with my unorthodox instructor. He had some out-there and not entirely true ideas about the history of the dances he taught. But, more importantly, he had an elegantly mechanical way of describing the dances.

dances were split into 4-tuples of actions where each of the elements were performed on the beat. We could then talk about wether these tuples were odd or even by defining even tuples as ones where we end with our weight on the same foot we started with. Our instructor defined a step as a movement that switched which foot was supporting our weight. For example, while a stomp expressed the beat, it kept our weight on the non-stomping foot that was already holding our weight and so didn't count as a step. This led him to define a hora as a 4-tuple in which one or more of the beats are not steps; with a 3-hora being 3 steps and one non-step and a 2 hora 2 steps and so on. A cha-cha on the other hand is a 4-tuple where one or more of the elements is doubled such that there are two steps in rapid succession for one beat.

the beat maker

input some beat sets to here the pulser play it! our beat code consists of sets of tokens enclosed where all other characters are ignored. our meaningful symbols consist of:

  • , beat note 1
  • . beat note 2 for emphasized beats
  • : a cha-cha beat
  • ? an unplayed beat

if you change the text you will need to pause and play for changes to take effect. All non-beat characters are ignored.


some thoughts on making this lil toy

I used Tone.js to do all the sound. Its a little synth tool built on top of Web Audio API.

It's composed of

  • a scheduling clock called the transport
  • instrument objects
  • sequence objects

Sequence objects are provided with an instrument object and an array of notes. When the scheduler emits a start signal the sequence object will use its instrument to play through its array of notes. until the transport emits its pause signal.

I gotta say I wish the documentation was either more verbose or more well indexed bc it was pretty difficult to get a mental map of the api together. Total info-shock trying to learn how to use the tool, particularly since I don't know anything about music terminology. I only have a partial gross-scale map at the moment. For example, Tone.js implements its one time units which I haven't found much explanation for in the documentation.

Adding the unplayed beat option was wicked annoying since Tone.js won't let you take a normal beat and turn some aspect of it down all the way to zero to make it silent.

Instead I had to keep track of time for each note manually and then increment the time by the necessary amount. If you inspect the code you'll see some bits that feel more bodgy than I'm generally comfortable with. However, I started a version 2 with the goals of being more powerful and well written which I should hopefully have done by end of month.