I want to talk to you about one thing and just one thing only, and this has to do with when people ask me, what do you do? To which I usually respond, I do computer music.
Now, a number of people just stop talking to me right then and there, and the rest who are left usually have this blank look in their eye, as if to say, what does that mean? And I feel like I'm actually depriving them of information by telling them this, at which point I usually panic and spit out the first thing that comes to my mind, which is, I have no idea what I'm doing. Which is true. That's usually followed by a second thought, which is, whatever it is that I'm doing, I love it. And today, I want to, well, share with you something I love, and also why.
And I think we'll begin with just this question: What is computer music? And I'm going to try to do my best to provide a definition, maybe by telling you a story that goes through some of the stuff I've been working on.
And the first thing, I think, in our story is going to be something called ChucK. Now, ChucK is a programming language for music, and it's open-source, it's freely available, and I like to think that it crashes equally well on all modern operating systems. And instead of telling you more about it, I'm just going to give you a demo. By the way, I'm just going to nerd out for just a few minutes here, so I would say, don't freak out. In fact, I would invite all of you to join me in just geeking out. If you've never written a line of code before in your life, do not worry. I'll bet you'll be able to come along on this.
First thing I'm going to do is to make a sine wave oscillator, and we're going to called the sine wave generator "Ge." And then we're going to connect "Ge" to the DAC. Now this is kind of the abstraction for the sound output on my computer. Okay? So I've connected myself into the speaker. Next, I'm going to say my frequency is 440 hertz, and I'm going to let time advance by two seconds through this operation. All right, so if I were to play this — (Tone) — you would hear a sine wave at 440 hertz for two seconds. Okay, great. Now I'm going to copy and paste this, and then just change some of these numbers, 220.5, 440 I shall leave it as that, and .5 and 880. By doubling the frequency, we're actually going up in successive octaves, and then we have this sequence — (Tones) — of tones. Okay, great, now I can imagine creating all kinds of really horrible single sine wave pieces of music with this, but I'm going to do something that computers are really good at, which is repetition. I'm going to put this all in a while loop, and you actually don't need to indent, but this is purely for aesthetic reasons. It's good practice. And when we do this — (Tones) — that's going to go on for a while. In fact, it's probably not going to stop until this computer disintegrates. And I can't really empirically prove that to you, but I hope you'll believe me when I say that. Next, I'm going to replace this 220 by math.random2f. I'm going to generate a random number between 30 and 1,000 and send that to the frequency of me. And I'm going to do this every half a second. (Tones) Let's do this every 200 milliseconds. (Tones) One hundred. (Tones) All right. At this point, we've reached something that I would like to think of as the canonical computer music. This is, to me, the sound that mainframes are supposed to be making when they're thinking really hard. It's this sound, it's like, the square root of five million.
So is this computer music? Yeah, I guess by definition, it's kind of computer music. It's probably not the kind of music you would listen to cruising down the highway, but it's a foundation of computer-generated music, and using ChucK, we've actually been building instruments in the Stanford Laptop Orchestra, based right here at Stanford Center for Computer Research in Music and Acoustics.
Now the Laptop Orchestra is an ensemble of laptops, humans and special hemispherical speaker arrays. Now the reason we have these is so that for the instruments that we create out of the laptop, we want the sound to come out of somewhere near the instrument and the performer, kind of much like a traditional, acoustic instrument. Like, if I were to play a violin here, the sound would naturally not come out of the P.A. system, but from the artifact itself. So these speakers are meant to emulate that. In fact, I'm going to show you how we actually built them. The first step is to go to IKEA and buy a salad bowl. This is an 11-inch Blanda Matt. That's the actual name, and I actually use one of these to make salad at home as well, I kid you not. And the first step is you turn it upside down, and then you drill holes in them, six holes per hemi, and then make a base plate, put car speaker drivers in them along with amplifiers in the enclosure, and you put that all together and you have these hemispherical speaker arrays. Add people, add laptops, you have a laptop orchestra.
And what might a laptop orchestra sound like? Well, let me give you a demonstration of about 200 instruments we've created so far for the Laptop Orchestra. And what I'm going to do is actually come over to this thing. This thing I have in front of me actually used to be a commodity gaming controller called a Gametrak. This thing actually has a glove you can put on your hands. It's tethered to the base, and this will track the position of your hands in real time. It was originally designed as a golfing controller to detect the motion of your swing. That turned out to be a rather large commercial non-success, at which point they slashed prices to 10 dollars, at which point computer music researchers said, "This is awesome! We can prototype instruments out of this."
So let me show you one instrument we've created, one of many, and this instrument is called "Twilight," and it's meant to go with this metaphor of pulling a sound out of the ground. So let me see if this will work.
And put it back. And then if you go to the left, right, it sounds like an elephant in pain.
This is a slightly metallic sound. Turn it just a bit.
(Music) It's like a hovering car.
This third one is a ratchet-like interaction, so let me turn it up.
So it's a slightly different interaction.
The fourth one is a drone.
(Music) And finally, let's see, this is a totally different interaction, and I think you have to imagine that there's this giant invisible drum sitting right here on stage, and I'm going to bang it. (Drum) (Laughter) So there we go, so that's one of many instruments in the Laptop Orchestra.
And when you put that together, you get something that sounds like this.
Okay, and so, I think from the experience of building a lot of instruments for the Laptop Orchestra, and I think from the curiosity of wondering, what if we took these hopefully expressive instruments and we brought it to a lot of people, plus then a healthy bout of insanity — put those three things together — led to me actually co-founding a startup company in 2008 called Smule.
Now Smule's mission is to create expressive, mobile music things, and one of the first musical instruments we created is called Ocarina. And I'm going to just demo this for you real quick. So Ocarina — (Music) — is based on this ancient flute-like instrument called the ocarina, and this one is the four-hole English pendant configuration, and you're literally blowing into the microphone to make the sound. And there's actually a little ChucK script running in here that's detecting the strength of your blowing and also synthesizing the sound. (Music) And vibrato is mapped to the accelerometer, so you can get — (Music) All right. So let me play a little ditty for you, a little Bach. And here, you'll hear a little accompaniment with the melody. The accompaniment actually follows the melody, not the other way around.
And this was designed to let you take your time and figure out where your expressive space is, and you can just hang out here for a while, for a really dramatic effect, if you want, and whenever you're ready —
And on these longer notes, I'm going to use more vibrato towards the end of the notes to give it a little bit more of an expressive quality.
Huh, that's a nice chord to end this excerpt on.
So I think a good question to ask about Ocarina is, is this a toy or it an instrument? Maybe it's both, but for me, I think the more important question is, is it expressive? And at the same time, I think creating these types of instruments asks a question about the role of technology, and its place for how we make music. Apparently, for example, not that long ago, like only a hundred years ago — that's not that long in the course of human history — families back then used to make music together as a common form of entertainment. I don't think that's really happening that much anymore. You know, this is before radio, before recording. In the last hundred years, with all this technology, we now have more access to music as listeners and consumers, but somehow, I think we're making less music than ever before. I'm not sure why that would be. Maybe it's because it's too easy just to hit play. And while listening to music is wonderful, there's a special joy to making music that's all its own. And I think that's one part of the goal of why I do what I do is kind of to take us back to the past a little bit. Right?
Now, if that's one goal, the other goal is to look to the future and think about what kind of new musical things can we make that we don't perhaps yet have names for that's enabled by technology, but ultimately might change the way that humans make music. And I'll just give you one example here, and this is Ocarina's other feature. This is a globe, and here you're actually listening to other users of Ocarina blow into their iPhones to play something. This is "G.I.R." from Texas, "R.I.K." I don't know why it's these three-letter names today, Los Angeles. They're all playing pretty, somewhat minimal music here.
And the idea with this is that, well, technology should not be foregrounded here, and — (Laughter) — we've actually opened this up. The first thought is that, hey, you know there's somebody somewhere out there playing some music, and this is a small but I think important human connection to make that perhaps the technology affords.
As a final example, and perhaps my favorite example, is that in the wake of the 2011 earthquake and tsunami disaster in Japan, a woman reached out in one of our singing apps to try to get people to join in to sing with her on a version of "Lean on Me." Now, in these apps, there's this thing that allows any user to add their voice to an existing performance by any other user or group of users, so in some sense, she's created this kind of global ad hoc corral of strangers, and within weeks, thousands of people joined in on this, and you can kind of see people coming from all around the world and all these lines converging on the origin where the first rendition of the song was sung, and that's in Tokyo. And this is what it sounds like when there's 1,000 people. This is 1,000 voices.
(Recording) ♪ Sometimes in our lives ♪
♪ We all have pain, we all have sorrow ♪
♪ But if we are wise ♪
♪ We know that there's always tomorrow ♪
♪ Lean on me ♪
♪ When you're not strong ♪
♪ And I'll be your friend ♪
♪ I'll help you carry on ♪
♪ For it won't be long ♪
♪ Till I'm gonna need ♪
♪ Somebody to lean on ♪
♪ Just lean on — ♪
Is this computer music?
Was that computer music? Yeah, I guess so; it's something that you really couldn't have done without computers. But at the same time, it's also just human, and I think what I've essentially answered so far is maybe why I do the stuff that I do, and let's just finally return to the first question: What is computer music? And I think that the catch here is that, at least to me, computer music isn't really about computers. It is about people. It's about how we can use technology to change the way we think and do and make music, and maybe even add to how we can connect with each other through music.
And with that, I want to say, this is computer music, and thank you for listening.
Ge Wang makes computer music, but it isn't all about coded bleeps and blips. With the Stanford Laptop Orchestra, he creates new instruments out of unexpected materials—like an Ikea bowl—that allow musicians to play music that's both beautiful and expressive.
Both a musician and a computer scientist, Ge Wang turns ordinary MacBooks and iPhones into complex instruments.
Both a musician and a computer scientist, Ge Wang turns ordinary MacBooks and iPhones into complex instruments.