Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PA 1: Tone Matrix šŸŽ¶

Adapted from Keith Schwarz’s Tone Matrix assignment, inspired by AndrĆ© Michel’s Tone Matrix tool.

Learning objectives¶

In this assignment, you’ll build a digital musical instrument called a Tone Matrix that you play through a visual interface. The Tone Matrix is a square grid of lights, each of which starts out turned off. You turn lights on and off by clicking on cells in the grid.

Each light in the grid stands for a musical note at a specific point in time. Lights further to the left are played before lights further to the right. The row of a light sets which note is played: lights toward the bottom of the grid have a lower pitch than lights toward the top. All the lights on one row play the same note at different moments. And if several lights in the same column are on, they all play together when that column’s turn comes around.

Here’s a video of this in action:

We’ll get there in two parts. In Part 1, we’ll build the sound generation logic as a single plucked ā€œstring instrumentā€ you can hear. In Part 2, we’ll build the grid that arranges those strings and notes.