How I Built TinyMusic.js (part 2)

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 Sequence class and discuss some Web Audio API basics like audio contexts, oscillators, and scheduling. If you didn’t read part 1, you…

How I Built TinyMusic.js (part 1)

About a year ago, a few co-workers and I decided that we'd all participate in js13k. 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…

Why Your Team Should Be Using Pull Requests

I have a pretty serious fear of public speaking. I start yawning a lot. My heart rate becomes elevated. I'm pretty sure my face turns red. It's gotten a lot better with age – but still, it's not great. Anyway. About two years ago, while I was working at Aereo, I…

[object Object] Things You Didn’t Know About valueOf

Okay, fine. That title is horrible. But we’re all competing with BuzzFeed for readers now, and I needed something catchy, so here we are. Right, then. So, what is Object#valueOf and why should you care? More or less, it's a method that JavaScript calls automatically any time it…

Currying in JavaScript

I've been thinking a lot lately about functional programming, and I thought it might be kind of fun to walk through the process of writing a curry function. For the uninitiated, currying refers to the process of taking a function with n arguments and transforming it into n functions that…