Tag Archives: TinyMusicJS

Part 2: How I Built TinyMusicJS


via How I Built TinyMusic.js (part 2) — Medium.

In yesterday’s post, I wrote about the Note class in TinyMusic, and covered some of the basic music theory behind it. Today, I’ll cover the Sequenceclass and discuss some Web Audio API basics like audio contexts, oscillators, and scheduling.

If you didn’t read part 1, you really should go back and do that, because this post references a lot of stuff from it.

Part 1: How I Built TinyMusicJS


via How I Built TinyMusic.js (part 1) — Medium.

About a year ago, a few co-workers and I decided that we’d all participate injs13k. If you’re not familiar, js13k is a game competition where each entry has to be smaller than 13 KB.

Being a musician, it felt important that my game would have music. After looking around a bit, I wasn’t able to find any libraries that really did what I wanted without totally blowing the 13 KB budget. So I decided to make my own.

This post is the first of two parts. In it, I’ll explain the Note class in TinyMusic. We’ll dig in to a little bit of light music theory and math.

In part two, I’ll cover the Sequence class, and talk about the Web Audio API.