Wrong notes and syntax errors: The joy of improv in music and code
What can thinking like musicians teach us about game-making?
When I first began to learn the programming language Ruby on Rails from a friend of mine, he taught me by way of mimicry. My friend would tell me a phrase that would spit out a particular number or word; I would re-type the phrase and it would behave just the way he promised.
It reminded me a lot of learning musical scales as a child; I could copy my friend’s code, but I didn’t understand why the code did what it did, exactly, or how to use it in an original way. And yet, after only an hour or of my echoing my friend’s code back at him, he said, "okay, now just play around!"
My heart skipped a beat. "What do you mean, play around? Play around with what?"
"You know," he said. "Make up some code based on what you learned!"
Once I got over that initial burst of fear, I realized that playing around with code was the best part—just as it had been the best part of music, for me.
My mother can read music for the piano as easily as other people can touch-type. She can look at a brand-new piece of music and play it note for note on the first try. Her playing is so emotive that once when she accompanied my singing at a school talent show, a piano student in the audience approached my music teacher not to commend my voice, but rather my mother's performance. "I want to learn how to play piano like that," she gushed, paying no mind at all to whatever forgettable '90s pop hit I had attempted.
I, too, wanted to learn how to play like that. Some of my earliest memories are of scrambling onto the piano bench and plunking out my own tunes. I didn't yet know the official chord constructions, but I learned which notes "sounded good" on my own. I couldn't read music, so I made up my own songs or mimicked songs that I heard. My musician parents praised my "good ear," excited by their daughter's budding talent.
But when my piano lessons began, I couldn't seem to learn how to read music.
I had three different piano teachers over the course of elementary school and middle school, and I didn't get on well with any of them. I wanted to learn harder pieces than they would give me, but I couldn't read music well enough to move past beginner-level songbooks. At home, my mother and I struggled through my assigned pieces measure by measure; me biting back frustration, her swallowing disappointment.
The part of coding I enjoy less often revolve around small, frustrating details, like the way one misplaced digit can cause anything from an ugly error message to a complete program breakdown. I spent about an hour recently tearing my hair out as I trying to find the source of a broken macro in a game I'm making until I finally found the mistake: I had omitted a single letter, and misspelled “cycling” as “cyling.”
People have often told me that because of this unforgiving precision, writing code is very different than other forms of composition like writing music. Music can’t give you an error message, they say. Ha! These people did not learn how to play music in the house where I grew up.
In order to force me to learn how to read the notes correctly, my mother would stand behind me as I played through a piece. As soon as I missed a note or flubbed a rhythm, she would halt my execution—just as a computer does with a bad piece of code—with a soft "no." I would try again. Still wrong. "No." I would grow more infuriated with each mistake, each "no." It would always be some small error that I had missed, a sharp, a flat, a key change gone unnoticed. A syntax error.
When my mother wasn't home, I would "practice" for hours. My father didn't know how my assigned pieces went. I would open my music folder and write a song from scratch that sounded more or less like Mozart or Bach. He would tell my mother, when she came home, that I had played all afternoon and that it sounded beautiful. But she knew my trick. She'd remind me that I had a lesson to prepare for, and I would return, grim-faced, to the painstaking, teeth-pulling slowness of recreating Mozart.
Classical piano is not just about recreating pieces exactly as written. There is an art to dynamic changes and style and tone and performance. Playing Mozart well takes great skill. But it just wasn’t a skill that I wanted to learn, at least not past a certain point. I didn’t just want to iterate upon someone else’s patterns; I wanted to write my own program, build my own patterns. Even if they were not very good. Not at first, anyway.
At age 12, I quit my piano lessons. At 13, I joined a rock band.
I've been told that most of the creative quandaries in music composition cannot be applied to game-making. There is limited jazz in writing code; you cannot put two phrases next to one another that do not "go" together. There are some rules that must be followed or else the code won't compile. You cannot be experimental or dissonant when you are writing code—not like with music, or so I keep hearing. After all, a song cannot be broken. A song cannot fail to load, they say. A song cannot crash.
Game developers have a history of distancing themselves from a tradition of artistry, and instead associating themselves with the utilitarian work of architects and software developers. I often hear developers downplay the artistic elements of their games, hand-waving their work as little more than organizing numbers in spreadsheets or fine-tuning the textures on a tree in a single area.
How must these utilitarian game developers think that other art is made? How accessible and romantic and unplanned do they imagine the creation of sculpture and dance and painting to be? Do they think it's that easy to knit a picture on a sweater? I can promise you, that can't be done without a design. A plan. A system.Even the kinds of music that often characterized as the most impromptu or improvisational—jazz, punk, experimental—often have their own distinct sets of rules, and the ways they seem slapdash, dissonant or spontaneous happen very much by design.
Creating art and music is not just about the glamorous act of being inspired and pouring out your soul. It, too, is rife with the thoroughly unromantic grind of production and editing and refinement and polishing. The grueling march of notating, measure by measure, every single note that every instrument must perform, and at what time, and in what way. The rote memorization required for performance. The expectation of acknowledging an existing "canon," even if only to rebuke and subvert it. And even when the code loads or the right notes get played, all art can fail, in its own way. That's exactly why creation is terrifying.
But that shouldn't stop us from moving past iteration into the world of improvisation. Learning music as I did as a child—echoing, mimicking, and repeating upon the established patterns of our predecessors—can be valuable, but I’ve found it’s a lot more interesting in both music and code to play some original notes, even some “wrong” notes and see if they sound “right” to me.
Listen to the wonderful outsider musician Daniel Johnston, who died last week, cover The Beach Boys’ “God Only Knows.” The cover was included on the 2006 compilation “Do It Again: A Tribute to Pet Sounds.” (via r/ObscureMedia)
Johnny Cash died September 12, 2003, age 71.
Pussy Riot uploaded its latest video to YouTube, called “1937.” The description included the lyrics: Comrade Major, your torture is skillful I continue to insult your feelings with a shocker in the temple in my head empty tasty my life crunches sad 1-9-3-7 I myself I myself eat 1-9-3-7 I am afraid I am afraid […]
Breaking into the big leagues as a project manager isn’t done overnight, but there are principles that anyone can learn, and they’re applicable to nearly any business. No matter what your field, if there are multiple teams working toward a common goal, you’re going to need a roadmap. The Project Management Professional Certification Training Suite […]
On the one hand, nostalgia is “a corruption of the historical impulse,” according to William Gibson. On the other hand, “Super Mario Bros.” will never not be cool. Luckily, there’s a way to satisfy that retro gaming while still keeping an eye on the future: The GameShell Kit. This thing is simultaneously the last handheld […]
The field of data analytics can get intimidating, even for business professionals who constantly rely on it. But at its heart, its purpose is to simplify. To take mounds of information and distill their insights into a single clear picture. Currently, the go-to software for painting that picture is Tableau. And if you want to […]