Songwriting and computer programming

Writing a song is a lot like writing a computer program. They both require clever management of loops and control flow. The simplest sheet music reads as a straightforward top-to-bottom list of instructions. You start on measure one and read through to the end sequentially. That’s fine unless the music is very repetitive, which most …

Be brave, go ahead and divide by zero

When you learned division in school, the teacher probably brushed off the issue of dividing by zero in one sentence: you can’t do it, moving on. You might feel like you got shortchanged by that explanation. Why not? What happens when you divide by zero?

Learning music theory with Auto-Tune

Auto-Tune makes producing music easier. It can also make understanding music theory easier. The way you dial up different keys and scales doesn’t just guide your ear, it also guides your eye. Your voice can produce a smooth continuum of pitches. To sing, you eliminate most of those possibilities, vibrating your mouth and throat only …

How transistors think

The parts of the computer that do the “thinking” are mostly made of little electronic switches called transistors. If you connect two wires to a transistor, you can use the voltage on one wire to control the voltage on the other. What’s especially handy for engineering purposes is that the presence or absence of a …

Tuning the quantum guitar

Music is really just orderly vibrations: in the air, in instrument bodies, in speaker cones, in tiny hairs in your inner ear, in electromagnetic fields in wires, in patterns of neurons firing in your brain. If you understand the math behind these vibrations, it can help you understand how music works. Surprisingly, it can also …

Robot counting for humans

When you delve behind the scenes with the internet, you immediately come face-to-face with a lot of threatening computer gibberish. The most menacing codes are the ones that stand for colors, random-seeming strings of letters and numbers like #99CC66 or #4F102A. Sometimes you see colors described verbally: “black”, “white”, “blue”, etc. That’s fine for simple …

Digital audio is just long lists of numbers

How do you get sound in and out of a computer? There are two steps. You have to turn the sound into electricity, and then you have to turn the electricity into numbers. Turning sound into electricity At the physical level, a sound is a rhythmic vibration of air molecules. Your ears can detect subtle …