Finding the music in computer science and functional programming

Written by Emily Zhang
Published: 2016-10-23 (last updated: 2016-10-23)

I’m Emily Zhang, a Masters student at MIT in the Computer Science department and a student volunteer at ICFP 2016 in Nara, Japan. Despite my innocuous sounding name and title, I’m actually quite a strange fit for the conference. Here’s my story of how I ended up at ICFP and a little bit about what I got out of it. Hopefully my meandering path and disenchantment with the status quo (web development in this case) will resonate with another student early on in their career.

I did my undergraduate at MIT studying Computer Science and Music Theory. I tried my best to be excited about web programming (where all the money and thus campus recruiting presence was), but eventually became very frustrated and bored with the field,. I thought it meant I was a bad computer scientist if I didn’t find joy and solace in web development, especially if many of my peers around me did. I graduated and signed a job offer with a nontechnical company, swearing off “computer science” and “programming”.

At the last minute, I applied for the Masters of Engineering program to continue working on my undergraduate research in computational musicology. I worked and continue to work with Myke Cuthbert on building tools for his music21 library. I made a pact to myself that I would make a concerted effort to explore the areas of CS that weren’t web development.

That’s how I became a crypto and security kind of gal.

Then in one of my security classes we learned about Symbolic and Concolic execution (can you begin to put the pieces of how I ended up at ICFP yet?), and I was hooked. I thought it was beautiful. I thought the design wasn’t ad hoc and overly specific to a single application. Around this time, I also learned of a friend’s research with Adam Chlipala in his PL&SE group at MIT CSAIL.

The following semester I took Adam Chlipala’s Coq class, 6.887. I threw myself into the deep end there, coming from a background with little theoretical and mathematical formalism, but I enjoyed myself and I had FUN. I started toying with the ideas of how I might introduce grammars and verification of musical structures into my graduate research and thesis. Ideas had structures that were beautiful and pleasing. This is what I had been missing by chasing lucrative tech internships, making buttons the perfect shade of blue.

At ICFP, I attended most of the FARM talks and workshops. Two demos that stood out to me were Chris Ford’s Klangmeister and Tom Murphy’s Vivid Synth, two functional livecoding synthesizers.

Klangmeister is simple synthesizer that runs in your browser (no need to install anything!). There are some simple functional paradigms that make it extremely easy to manipulate and loop sounds and thus create rhythms and melodies. I thought this demo was particularly cool because of how light-weight it is. Part of my work in musicology is to help make music accessible to everyone, and I thought that Klangmeister does a great a job of that. No need to learn how circuits work before making music! For musician-programmers who have had to both learn music theory and also how to code, Klangmeister might seem like a magic black box. When Chris demoed Klangmeister, I felt for the first time during ICFP that feeling you get when you look at/hear a particularly nice piece of art. It was a really nice reminder of how applicable and tangible the paradigms of functional programming are. Functional programmers aren’t just a bunch of people who sit on theoretically high horses reasoning about type theory.

Unfortunately, I didn’t get to see Tom’s demo of Vivid Synth. Fortunately, I did get to talk to him beforehand about it and the role of functional reactive programming in livecoding concerts. Vivid Synth is a Haskell interface to SuperCollider, a popular and powerful platform for audio synthesis and algorithmic composition (think the embodiment of musician-programmers). It’s especially good for livecoding synthesis, which you can imagine needs to be reactive and stable.

Basically, Tom puts on livecoding concerts where he make music by writing Haskell code.

This was another warming reminder of the wonderful properties and abilities of functional programming. I came to ICFP with a huge bag o’ past experiences, most of which never really had to do with functional programming. Throughout the course of ICFP, I was able to string together my favorite parts of my past experiences (music theory, coding, formal structure, etc.) and find people and projects that embodied all of them. My discovery of this and my interactions with people of the community who had already discovered this and acted upon it were the fulfilling and enjoyable parts of ICFP.

I was able to find this niche thanks to the generous support of SV and PLMW programs. I encourage any student who has a splattering of interests and disenchantment with the status quo of CS to seek out places and projects that combine their interests, maybe it’ll even be at the next ICFP :)