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.
I’m a little late to the party as I’ve just discovered the fantastic world of YouTuber Pickitup’s ska covers! K.K. Slider himself would be impressed by his ska-jazz cover of the Animal Crossing: New Horizons theme. Now, if that’s not your thing, Pickitup’s got a huge catalog of other ska/[insert music genre here] covers on […]
In 1981, The Go-Go’s blew up with “We Got the Beat” and “Our Lips Our Sealed,” two tracks from their IRS records debut Beauty and the Beat that hit number one on the Billboard charts and went double platinum. What many don’t realize though is that the band, who notably wrote and played all their […]
Chiptune musician @atarimae_400 learned that the jingles played at some Japanese railway stations sound similar to the tones generated by a certain model of pocket calculator. So @atarimae_400 performed some of the melodies on his own adding machines. As Kraftwerk sang, “I’m the operator with my pocket calculator.”
When revved-up kids used to dribble a basketball through the kitchen or practice their footwork with a soccer ball in front of the television, exasperated parents would often just send ‘em outside to play. But these days, sending kids out might not be the best course of action. Despite all the changes, many budding young […]
No programming skills? No design experience? GameGuru can still help create some bonkers video games
When you sit down to play a new AAA video game like The Last of Us 2, you probably assume it was created by gaming experts with insane levels of artistic and technical talent. And…you’d be right. Top developers are craftsmen of the highest order, pouring literally thousands of man-hours into creating the greatest gaming […]
Python is fueling some of tech’s coolest innovations and these videos and ebooks can get you up to speed
Earlier this year, we learned that Python had finally accomplished a feat other programming languages had failed for decades, to surpass Java as the second most-used coding language in the world. For its versatility and ease of use alone, its ascent among programmers isn’t hugely surprising. Then when you factor in its key role in […]