Stories of music and computation intertwine more than you might think. This course explores musical fundamentals from the perspective of math and code, rather than from instruments and sheet music. No musical background required. This course is accessible to new coders, too — you can have a complete experience just playing with the projects and thinking about the basic ideas of music, but experienced students will enjoy editing and creating their own code-based instruments and pieces.
Tone.js
library is the main driver of the projects, though these projects only scratch the surface of what Tone
can do. Use p5.js
to add a visual feedback layer to the musical projects. Music naturally encodes lots of mathematics — that mathematics forms a bridge to code-ideas.The basics of sound waves: pitch, envelope, and wave shape.
Tone
represents and lets you control synths.Tone
to p5
— that is, hook up visual feedback to the audio elements.Synths.
)Rhythm and sampling in a drum machine.
sounds
array) will automatically adjust the number of rows of the drum machine.for
loops that track booleans.setInterval()
as the code-engine of rhythmic timing.Howeler.js.
) Load in other sound files as practice.Harmony, tuning, and chords.
A template with code chunks to inspire your own custom digital instrument.
Tone.js
and follow your ears and imagination!