0:00:00.927,0:00:03.108 I want to talk to you about one thing 0:00:03.108,0:00:04.864 and just one thing only, 0:00:04.864,0:00:08.620 and this has to do with when people ask me, 0:00:08.620,0:00:11.867 what do you do? 0:00:11.867,0:00:13.767 To which I usually respond, 0:00:13.767,0:00:16.907 I do computer music. 0:00:16.907,0:00:18.852 Now, a number of people 0:00:18.852,0:00:21.089 just stop talking to me right then and there, 0:00:21.089,0:00:23.502 and the rest who are left usually have 0:00:23.502,0:00:25.750 this blank look in their eye, 0:00:25.750,0:00:27.919 as if to say, what does that mean? 0:00:27.919,0:00:30.137 And I feel like I'm actually depriving them 0:00:30.137,0:00:33.342 of information by telling them this, 0:00:33.342,0:00:35.070 at which point I usually panic 0:00:35.070,0:00:36.660 and spit out the first thing that comes to my mind, 0:00:36.660,0:00:40.442 which is, I have no idea what I'm doing. 0:00:40.442,0:00:42.054 Which is true. 0:00:42.054,0:00:44.910 That's usually followed by a second thought, 0:00:44.910,0:00:48.210 which is, whatever it is that I'm doing, 0:00:48.210,0:00:49.902 I love it. 0:00:49.902,0:00:53.699 And today, I want to, well, 0:00:53.699,0:00:55.870 share with you something I love, 0:00:55.870,0:00:57.354 and also why. 0:00:57.354,0:01:01.283 And I think we'll begin with just this question: 0:01:01.283,0:01:02.620 What is computer music? 0:01:02.620,0:01:06.400 And I'm going to try to do my[br]best to provide a definition, 0:01:06.400,0:01:08.131 maybe by telling you a story 0:01:08.131,0:01:09.778 that goes through some of the stuff 0:01:09.778,0:01:11.704 I've been working on. 0:01:11.704,0:01:13.516 And the first thing, I think, in our story 0:01:13.516,0:01:16.064 is going to be something called ChucK. 0:01:16.064,0:01:21.437 Now, ChucK is a programming language for music, 0:01:21.437,0:01:24.146 and it's open-source, it's freely available, 0:01:24.146,0:01:26.066 and I like to think that it crashes equally well 0:01:26.066,0:01:28.410 on all modern operating systems. 0:01:28.410,0:01:31.370 And instead of telling you more about it, 0:01:31.370,0:01:33.196 I'm just going to give you a demo. 0:01:33.196,0:01:34.352 By the way, I'm just going to nerd out 0:01:34.352,0:01:35.981 for just a few minutes here, 0:01:35.981,0:01:38.779 so I would say, don't freak out. 0:01:38.779,0:01:40.850 In fact, I would invite all of you to join me 0:01:40.850,0:01:42.034 in just geeking out. 0:01:42.034,0:01:45.096 If you've never written a line[br]of code before in your life, 0:01:45.096,0:01:46.282 do not worry. 0:01:46.282,0:01:49.799 I'll bet you'll be able to come along on this. 0:01:49.799,0:01:51.218 First thing I'm going to do is to make 0:01:51.218,0:01:53.051 a sine wave oscillator, 0:01:53.051,0:01:56.085 and we're going to called the sine wave generator 0:01:56.085,0:01:58.847 "Ge." 0:01:58.847,0:02:00.937 And then we're going to connect "Ge" to the DAC. 0:02:00.937,0:02:02.091 Now this is kind of the abstraction 0:02:02.091,0:02:04.699 for the sound output on my computer. Okay? 0:02:04.699,0:02:07.899 So I've connected myself into the speaker. 0:02:07.899,0:02:09.491 Next, I'm going to say my frequency 0:02:09.491,0:02:11.459 is 440 hertz, 0:02:11.459,0:02:15.278 and I'm going to let time advance 0:02:15.278,0:02:18.000 by two seconds through this operation. 0:02:18.000,0:02:22.068 All right, so if I were to play this -- 0:02:22.068,0:02:24.740 (Tone) — 0:02:24.740,0:02:27.161 you would hear a sine wave[br]at 440 hertz for two seconds. 0:02:27.161,0:02:30.187 Okay, great. Now I'm going to copy and paste this, 0:02:30.187,0:02:31.931 and then just change some of these numbers, 0:02:31.931,0:02:35.891 220.5, 440 I shall leave it as that, 0:02:35.891,0:02:38.331 and .5 and 880. 0:02:38.331,0:02:39.693 By doubling the frequency, 0:02:39.693,0:02:42.210 we're actually going up in successive octaves, 0:02:42.210,0:02:43.547 and then we have this sequence -- 0:02:43.547,0:02:45.674 (Tones) — of tones. 0:02:45.674,0:02:47.580 Okay, great, now I can imagine creating 0:02:47.580,0:02:49.022 all kinds of really horrible 0:02:49.022,0:02:51.420 single sine wave pieces of music with this, 0:02:51.420,0:02:54.332 but I'm going to do something[br]that computers are really good at, 0:02:54.332,0:02:56.156 which is repetition. 0:02:56.156,0:02:57.860 I'm going to put this all in a while loop, 0:02:57.860,0:02:59.156 and you actually don't need to indent, 0:02:59.156,0:03:01.280 but this is purely for aesthetic reasons. 0:03:01.280,0:03:02.884 It's good practice. 0:03:02.884,0:03:04.464 And when we do this — 0:03:04.464,0:03:08.961 (Tones) — 0:03:08.961,0:03:10.134 that's going to go on for a while. 0:03:10.134,0:03:11.628 In fact, it's probably not going to stop 0:03:11.628,0:03:13.411 until this computer disintegrates. 0:03:13.411,0:03:16.110 And I can't really empirically prove that to you, 0:03:16.110,0:03:19.779 but I hope you'll believe me when I say that. 0:03:19.779,0:03:21.655 Next, I'm going to replace this 220 0:03:21.655,0:03:24.461 by math.random2f. 0:03:24.461,0:03:25.739 I'm going to generate a random number 0:03:25.739,0:03:28.879 between 30 and 1,000 and send that 0:03:28.879,0:03:30.965 to the frequency of me. 0:03:30.965,0:03:33.065 And I'm going to do this every half a second. 0:03:33.065,0:03:36.007 (Tones) 0:03:36.007,0:03:38.668 Let's do this every 200 milliseconds. 0:03:38.668,0:03:43.290 (Tones) 0:03:43.290,0:03:44.745 One hundred. 0:03:44.745,0:03:46.357 (Tones) 0:03:46.357,0:03:47.591 All right. 0:03:47.591,0:03:49.535 At this point, we've reached something 0:03:49.535,0:03:50.605 that I would like to think of as 0:03:50.605,0:03:54.626 the canonical computer music. 0:03:54.626,0:03:58.443 This is, to me, the sound that mainframes 0:03:58.443,0:03:59.565 are supposed to be making 0:03:59.565,0:04:02.807 when they're thinking really hard. 0:04:02.807,0:04:04.900 It's this sound, it's like, 0:04:04.900,0:04:08.471 the square root of five million. 0:04:10.427,0:04:14.211 So is this computer music? 0:04:14.211,0:04:16.190 Yeah, I guess by definition, 0:04:16.190,0:04:17.395 it's kind of computer music. 0:04:17.395,0:04:20.403 It's probably not the kind of music you would listen to 0:04:20.403,0:04:21.891 cruising down the highway, 0:04:21.891,0:04:26.907 but it's a foundation of computer-generated music, 0:04:26.907,0:04:29.110 and using ChucK, 0:04:29.110,0:04:30.803 we've actually been building instruments 0:04:30.803,0:04:32.699 in the Stanford Laptop Orchestra, 0:04:32.699,0:04:36.900 based right here at Stanford Center for[br]Computer Research in Music and Acoustics. 0:04:36.900,0:04:39.683 Now the Laptop Orchestra is an ensemble of laptops, 0:04:39.683,0:04:42.312 humans and special hemispherical speaker arrays. 0:04:42.312,0:04:43.909 Now the reason we have these 0:04:43.909,0:04:46.379 is so that for the instruments that we create 0:04:46.379,0:04:48.603 out of the laptop, we want the sound to come 0:04:48.603,0:04:51.123 out of somewhere near the instrument 0:04:51.123,0:04:52.491 and the performer, 0:04:52.491,0:04:55.193 kind of much like a traditional, acoustic instrument. 0:04:55.193,0:04:57.079 Like, if I were to play a violin here, 0:04:57.079,0:04:59.190 the sound would naturally not come out of 0:04:59.190,0:05:01.964 the P.A. system, but from the artifact itself. 0:05:01.964,0:05:05.171 So these speakers are meant to emulate that. 0:05:05.171,0:05:06.500 In fact, I'm going to show you 0:05:06.500,0:05:09.243 how we actually built them. 0:05:09.243,0:05:11.307 The first step is to go to IKEA 0:05:11.307,0:05:12.687 and buy a salad bowl. 0:05:12.687,0:05:15.917 This is an 11-inch Blanda Matt. 0:05:15.917,0:05:17.415 That's the actual name, 0:05:17.415,0:05:18.837 and I actually use one of these 0:05:18.837,0:05:21.065 to make salad at home as well, I kid you not. 0:05:21.065,0:05:24.236 And the first step is you turn it upside down, 0:05:24.236,0:05:26.711 and then you drill holes in them, 0:05:26.711,0:05:29.220 six holes per hemi, 0:05:29.220,0:05:30.934 and then make a base plate, 0:05:30.934,0:05:33.614 put car speaker drivers in them 0:05:33.614,0:05:36.205 along with amplifiers in the enclosure, 0:05:36.205,0:05:37.559 and you put that all together and you have 0:05:37.559,0:05:39.333 these hemispherical speaker arrays. 0:05:39.333,0:05:40.896 Add people, add laptops, 0:05:40.896,0:05:43.584 you have a laptop orchestra. 0:05:43.584,0:05:47.114 And what might a laptop orchestra sound like? 0:05:47.114,0:05:49.033 Well, let me give you a demonstration 0:05:49.033,0:05:52.268 of about 200 instruments we've created so far 0:05:52.268,0:05:55.511 for the Laptop Orchestra. 0:05:55.511,0:05:57.938 And what I'm going to do is[br]actually come over to this thing. 0:05:57.938,0:06:00.143 This thing I have in front of me 0:06:00.143,0:06:03.355 actually used to be a commodity gaming controller 0:06:03.355,0:06:05.145 called a Gametrak. 0:06:05.145,0:06:07.021 This thing actually has a glove[br]you can put on your hands. 0:06:07.021,0:06:08.581 It's tethered to the base, 0:06:08.581,0:06:11.110 and this will track the position of your hands 0:06:11.110,0:06:12.163 in real time. 0:06:12.163,0:06:15.537 It was originally designed as a golfing controller 0:06:15.537,0:06:17.453 to detect the motion of your swing. 0:06:17.453,0:06:19.984 That turned out to be a rather large 0:06:19.984,0:06:21.688 commercial non-success, 0:06:21.688,0:06:25.442 at which point they slashed prices to 10 dollars, 0:06:25.442,0:06:27.450 at which point computer music researchers 0:06:27.450,0:06:29.508 said, "This is awesome! 0:06:29.508,0:06:32.257 We can prototype instruments out of this." 0:06:32.257,0:06:35.201 So let me show you one instrument we've created, 0:06:35.201,0:06:37.113 one of many, and this instrument 0:06:37.113,0:06:38.682 is called "Twilight," 0:06:38.682,0:06:41.368 and it's meant to go with this metaphor 0:06:41.368,0:06:44.401 of pulling a sound out of the ground. 0:06:44.401,0:06:47.752 So let me see if this will work. 0:06:47.752,0:06:54.188 (Music) 0:06:56.968,0:06:58.791 And put it back. 0:06:58.791,0:07:02.886 And then if you go to the left, 0:07:02.886,0:07:05.381 right, 0:07:09.427,0:07:13.231 it sounds like an elephant in pain. 0:07:13.231,0:07:16.259 This is a slightly metallic sound. 0:07:16.259,0:07:19.613 Turn it just a bit. 0:07:19.613,0:07:22.569 (Music) 0:07:25.211,0:07:28.785 It's like a hovering car. 0:07:32.406,0:07:33.799 Okay. 0:07:33.799,0:07:37.965 This third one is a ratchet-like interaction, so 0:07:39.360,0:07:41.911 let me turn it up. 0:07:44.915,0:07:49.710 (Music) 0:07:50.068,0:07:51.948 So it's a slightly different interaction. 0:07:51.948,0:07:54.902 The fourth one is a drone. 0:07:55.583,0:08:00.760 (Music) 0:08:08.613,0:08:11.319 And finally, let's see, 0:08:11.319,0:08:13.130 this is a totally different interaction, 0:08:13.130,0:08:14.940 and I think you have to imagine that there's 0:08:14.940,0:08:17.872 this giant invisible drum sitting right here on stage, 0:08:17.872,0:08:20.315 and I'm going to bang it. 0:08:22.255,0:08:24.902 (Drum) 0:08:24.902,0:08:27.689 (Laughter) 0:08:28.241,0:08:30.685 So there we go, so that's one of many instruments 0:08:30.685,0:08:32.455 in the Laptop Orchestra. 0:08:32.455,0:08:36.009 (Applause) 0:08:36.009,0:08:38.290 Thank you. 0:08:38.290,0:08:40.396 And when you put that together, 0:08:40.396,0:08:44.464 you get something that sounds like this. 0:08:44.464,0:08:51.123 (Music) 0:09:33.470,0:09:35.820 Okay, and so, I think from the experience 0:09:35.820,0:09:38.343 of building a lot of instruments[br]for the Laptop Orchestra, 0:09:38.343,0:09:40.847 and I think from the curiosity of wondering, 0:09:40.847,0:09:42.350 what if we took these 0:09:42.350,0:09:43.942 hopefully expressive instruments 0:09:43.942,0:09:46.575 and we brought it to a lot of people, 0:09:46.575,0:09:48.982 plus then a healthy bout of insanity — 0:09:48.982,0:09:50.471 put those three things together — 0:09:50.471,0:09:53.987 led to me actually co-founding a startup company 0:09:53.987,0:09:56.446 in 2008 called Smule. 0:09:56.446,0:09:58.366 Now Smule's mission is to create 0:09:58.366,0:10:02.223 expressive, mobile music things, 0:10:02.223,0:10:06.985 and one of the first musical instruments 0:10:06.985,0:10:08.845 we created is called Ocarina. 0:10:08.845,0:10:11.610 And I'm going to just demo this for you real quick. 0:10:15.234,0:10:17.650 So Ocarina — 0:10:17.650,0:10:21.248 (Music) — 0:10:21.248,0:10:24.371 is based on this ancient flute-like instrument 0:10:24.371,0:10:25.780 called the ocarina, 0:10:25.780,0:10:29.163 and this one is the four-hole[br]English pendant configuration, 0:10:29.163,0:10:32.566 and you're literally blowing into the microphone 0:10:32.566,0:10:35.492 to make the sound. 0:10:35.492,0:10:37.125 And there's actually a little ChucK script 0:10:37.125,0:10:38.293 running in here that's detecting 0:10:38.293,0:10:39.775 the strength of your blowing 0:10:39.775,0:10:41.893 and also synthesizing the sound. 0:10:41.893,0:10:45.478 (Music) 0:10:45.478,0:10:48.808 And vibrato is mapped to the accelerometer, 0:10:48.808,0:10:50.461 so you can get — 0:10:50.461,0:10:53.790 (Music) 0:10:53.790,0:10:57.500 All right. So let me play a little ditty for you, 0:10:59.533,0:11:01.349 a little Bach. 0:11:01.349,0:11:03.941 And here, you'll hear a little[br]accompaniment with the melody. 0:11:03.941,0:11:06.509 The accompaniment actually follows the melody, 0:11:06.509,0:11:10.290 not the other way around. 0:11:10.290,0:11:15.625 (Music) 0:11:23.132,0:11:24.789 And this was designed 0:11:24.789,0:11:26.065 to let you take your time 0:11:26.065,0:11:29.270 and figure out where your expressive space is, 0:11:29.270,0:11:31.077 and you can just hang out here 0:11:31.077,0:11:34.139 for a while, for a really[br]dramatic effect, if you want, 0:11:34.139,0:11:37.205 and whenever you're ready — 0:11:37.205,0:11:41.857 (Music) 0:11:52.981,0:11:54.089 And on these longer notes, 0:11:54.089,0:11:56.190 I'm going to use more vibrato 0:11:56.190,0:11:57.082 towards the end of the notes 0:11:57.082,0:12:00.134 to give it a little bit more of an expressive quality. 0:12:00.134,0:12:03.750 (Music) 0:12:07.473,0:12:11.160 Huh, that's a nice chord to end this excerpt on. 0:12:11.160,0:12:14.581 (Applause) 0:12:14.581,0:12:17.841 Thank you. 0:12:19.750,0:12:23.746 So I think a good question to ask about Ocarina is, 0:12:23.746,0:12:28.493 is this a toy or it an instrument? Maybe it's both, 0:12:28.493,0:12:30.502 but for me, I think the more important question is, 0:12:30.502,0:12:32.043 is it expressive? 0:12:32.043,0:12:34.117 And at the same time, I think 0:12:34.117,0:12:35.421 creating these types of instruments 0:12:35.421,0:12:38.783 asks a question about the role of technology, 0:12:38.783,0:12:40.477 and its place for how we make music. 0:12:40.477,0:12:42.214 Apparently, for example, 0:12:42.214,0:12:44.120 not that long ago, like only a hundred years ago — 0:12:44.120,0:12:45.640 that's not that long in the course of human history — 0:12:45.640,0:12:47.621 families back then 0:12:47.621,0:12:49.509 used to make music together 0:12:49.509,0:12:52.557 as a common form of entertainment. 0:12:52.557,0:12:53.802 I don't think that's really happening 0:12:53.802,0:12:55.337 that much anymore. 0:12:55.337,0:12:57.007 You know, this is before radio, before recording. 0:12:57.007,0:12:59.214 In the last hundred years, with all this technology, 0:12:59.214,0:13:01.388 we now have more access to music 0:13:01.388,0:13:03.021 as listeners and consumers, 0:13:03.021,0:13:06.084 but somehow, I think we're making less music 0:13:06.084,0:13:07.770 than ever before. 0:13:07.770,0:13:09.401 I'm not sure why that would be. 0:13:09.401,0:13:12.050 Maybe it's because it's too easy just to hit play. 0:13:12.050,0:13:14.509 And while listening to music is wonderful, 0:13:14.509,0:13:17.918 there's a special joy to making music 0:13:17.918,0:13:19.573 that's all its own. 0:13:19.573,0:13:20.836 And I think that's one part 0:13:20.836,0:13:22.926 of the goal of why I do what I do 0:13:22.926,0:13:27.682 is kind of to take us back to the past a little bit. Right? 0:13:27.682,0:13:29.462 Now, if that's one goal, the other goal 0:13:29.462,0:13:30.892 is to look to the future and think about 0:13:30.892,0:13:33.229 what kind of new musical things can we make 0:13:33.229,0:13:35.822 that we don't perhaps yet have names for 0:13:35.822,0:13:38.685 that's enabled by technology, but ultimately 0:13:38.685,0:13:41.126 might change the way that humans make music. 0:13:41.126,0:13:43.498 And I'll just give you one example here, 0:13:43.498,0:13:49.723 and this is Ocarina's other feature. 0:13:49.723,0:13:51.910 This is a globe, 0:13:51.910,0:13:54.683 and here you're actually listening 0:13:54.683,0:13:56.735 to other users of Ocarina 0:13:56.735,0:14:00.715 blow into their iPhones to play something. 0:14:00.715,0:14:05.568 This is "G.I.R." from Texas, 0:14:05.568,0:14:11.501 "R.I.K." I don't know why it's these[br]three-letter names today, Los Angeles. 0:14:11.501,0:14:16.519 They're all playing pretty, 0:14:16.519,0:14:19.879 somewhat minimal music here. 0:14:19.879,0:14:25.327 (Music) 0:14:25.327,0:14:27.933 And the idea with this is that, well, 0:14:27.933,0:14:31.850 technology should not be foregrounded here, 0:14:31.850,0:14:33.933 and — (Laughter) — 0:14:33.933,0:14:36.646 we've actually opened this up. 0:14:36.646,0:14:38.153 The first thought is that, hey, you know 0:14:38.153,0:14:41.343 there's somebody somewhere out there 0:14:41.343,0:14:42.613 playing some music, 0:14:42.613,0:14:44.393 and this is a small but I think important 0:14:44.393,0:14:45.613 human connection to make 0:14:45.613,0:14:48.611 that perhaps the technology affords. 0:14:48.611,0:14:51.435 As a final example, 0:14:51.435,0:14:52.790 and perhaps my favorite example, 0:14:52.790,0:14:55.941 is that in the wake of the 2011 earthquake 0:14:55.941,0:14:58.427 and tsunami disaster in Japan, 0:14:58.427,0:15:01.270 a woman reached out in one of our singing apps 0:15:01.270,0:15:04.157 to try to get people to join in to sing with her 0:15:04.157,0:15:05.762 on a version of "Lean on Me." 0:15:05.762,0:15:08.810 Now, in these apps, there's this thing that allows 0:15:08.810,0:15:10.511 any user to add their voice 0:15:10.511,0:15:13.309 to an existing performance by any other user 0:15:13.309,0:15:14.363 or group of users, 0:15:14.363,0:15:16.388 so in some sense, she's created this kind of 0:15:16.388,0:15:19.772 global ad hoc corral of strangers, 0:15:19.772,0:15:21.980 and within weeks, thousands of people 0:15:21.980,0:15:23.612 joined in on this, 0:15:23.612,0:15:25.991 and you can kind of see people[br]coming from all around the world 0:15:25.991,0:15:28.272 and all these lines converging on the origin 0:15:28.272,0:15:30.620 where the first rendition of the song was sung, 0:15:30.620,0:15:32.254 and that's in Tokyo. 0:15:32.254,0:15:35.686 And this is what it sounds like [br]when there's 1,000 people. 0:15:35.686,0:15:37.663 This is 1,000 voices. 0:15:37.663,0:15:41.940 (Recording) ♪ Sometimes in our lives ♪ 0:15:41.940,0:15:49.260 ♪ We all have pain, we all have sorrow ♪ 0:15:49.260,0:15:53.100 ♪ But if we are wise ♪ 0:15:53.100,0:15:58.990 ♪ We know that there's always tomorrow ♪ 0:15:58.990,0:16:01.497 ♪ Lean on me ♪ 0:16:01.497,0:16:04.310 ♪ When you're not strong ♪ 0:16:04.310,0:16:06.950 ♪ And I'll be your friend ♪ 0:16:06.950,0:16:11.235 ♪ I'll help you carry on ♪ 0:16:11.235,0:16:15.248 ♪ For it won't be long ♪ 0:16:15.248,0:16:17.976 ♪ Till I'm gonna need ♪ 0:16:17.976,0:16:21.372 ♪ Somebody to lean on ♪ 0:16:21.372,0:16:23.726 ♪ Just lean on — ♪ 0:16:23.726,0:16:25.296 Is this computer music? 0:16:25.296,0:16:28.884 (Applause) 0:16:30.728,0:16:32.696 Was that computer music? 0:16:32.696,0:16:34.743 Yeah, I guess so; it's something that you really 0:16:34.743,0:16:37.028 couldn't have done without computers. 0:16:37.028,0:16:41.264 But at the same time, it's also just human, 0:16:41.264,0:16:44.353 and I think what I've essentially answered so far 0:16:44.353,0:16:47.744 is maybe why I do the stuff that I do, 0:16:47.744,0:16:50.136 and let's just finally return to the first question: 0:16:50.136,0:16:52.248 What is computer music? 0:16:52.248,0:16:54.552 And I think that the catch here is that, 0:16:54.552,0:16:55.808 at least to me, computer music 0:16:55.808,0:16:57.656 isn't really about computers. 0:16:57.656,0:16:59.182 It is about people. 0:16:59.182,0:17:00.816 It's about how we can use technology 0:17:00.816,0:17:02.862 to change the way we think 0:17:02.862,0:17:04.306 and do and make music, 0:17:04.306,0:17:07.992 and maybe even add to how we can 0:17:07.992,0:17:10.502 connect with each other through music. 0:17:10.502,0:17:12.655 And with that, I want to say, 0:17:12.655,0:17:15.752 this is computer music, and thank you for listening. 0:17:15.752,0:17:19.752 (Applause)