 Actually because the problem is like my audience they're my golden audience people I really want to talk to people. I want to actually have some kind of impact on our not But but maybe you can help me out, right? So Because how do you go to parties? I've been beat upon to listen. I I mean, I've got three kids So I've been for a while, but when I did go to parties You meet people. Hi, how's it going? What's your name? Sam? This is quite unusual for me. Normally I'm programming all day And they asked me what do you do and I say I'm a programmer Must have had that experience and then there's walk away. Let's do a programming party then that's fine But normal parties people don't normally tend to go to a program and I don't know about you, but I find that deeply frustrating Because there's so much beauty so much joy in programming to share with everybody that the inability to even start talking about it A direct experience So now I lie so if I go to a party now people say what do you do? I sound musician Oh great. What do you play now? I've got The police we have the conversation and so what I'm trying to do hopefully is to give you maybe a tool You can use to help have that conversation with other people But actually the real problem is it isn't you guys and your party experience I think the real problem is how do we engage everybody else and not just people our age but people older and Ideally much younger And so I think that if we say to people say well why do we need the program then why do we need the program? That's a really good question In the UK we've just started to introduce computer science in schools That's fabulous, but when people talk about why they need the program That the same same standard things because you can get a job And I know most of you probably all of you here have jobs because you could program But you're all probably like me quite weird Right, you probably discovered programming for its own beauty its own joy and spent time in your own time Just learning about these things right so you're all quite weird people And I think that the things that we it that got us started by programming are necessary the same things Excited other people and also that our motivations are the same motivations that probably other people might start program So I think that just to look beyond our own cultures and look beyond our own small programming communities to think about how do we engage everybody else and so when we talk about Engagement and we talk about Using having a job to load a program. I think that's that's bad start How many people learn sports at school to become professional sportsman? Some people but not all should we only teach sports the people who are going to be the professional sportsmen of course now But there's so many beautiful Positive things to get them from studying sports that are beyond just getting a job I think the same as programming is true. I'm just to think about analogies of this I mean how many people think that reading and writing is only for business Right, we do reading and writing for other things that they're making rich richer. Yes, of course we did right And then this is a little point is why I never talk to programmers. I really say you've got unbelievably great skills all of you Why is it not all I'm not saying all you do got many programmers using to make rich people rich And I think there are more things we can do and I think that engaging broader audiences Especially young people Showing people that the code is much more than writing a business applications or business websites I think that's a really a good way to start. So maybe it's really it's fine, right? But if you do agree then maybe we need to start a conversation about what other things Where with them what are the domains so and ideally Why are we only if it's not making jobs and my fingers? I think that code is amazing new tool that humans can use to express themselves Just like we use the technology of language for us to express ourselves Computing code is also technology that also is amazing powerful expression at all. We just haven't really Learn how to use it as such. Yes. It's so nice. It's so young. I give you you start Who's watched the structure interpretations of computer program lectures? All of you need to go watch those things From the 80s But they open it up by talking about programming extremely new and they talk about in other technologies of the fields of study And they come in the example of geography. It says geography came around From the Egyptian periods where they were looking the Nile and they were worried about where the flooding might be So they created tools and compasses and maps to actually figure out where they were safe to pop the lands Do we call geography company? Do we call astronomy telescoping? So why do we call computing computing? It's obviously we're still very very good. So we haven't figured out what we can do that I think there's lots more stuff and I think music is one of the many things you could do in computing That's really interesting And this is go back to what I was saying earlier It's something we can use to engage with water water because people who aren't Program is already and I think that this is where it gets really excited. So this is what I've created. It's called sonic pie It's a ruby DSL but like rails, but it doesn't make websites. It makes tax and In the same way the rails was trying to make all of the sort of hard Complicated enterprise tech stacks a bit more simple and engaging and easy to start with This has exactly same properties And I developed this in schools with school kids and I don't know if anyone's been to schools recently, but it's uh, It's a different experience They're like, uh, the teachers just trying to make the most of the time trying to get the kids to listen Right and they've got all these technologies of techniques to use and cutting the hands or counting down or pointing fingers and waggling Whatever technique they're using at some point hopefully the children are signalists the name the teachers No time to talk in schools. So If you think about it, they've got time for maybe two or three sentences before the kids are reminded one day What are your two or three sentences to engage kids in program? if you were in that school Is it opening apps? I would like that but um But yeah, I mean even then it's like is it create a work a project or a workspace or a far system Entity with all these things that take take many lessons. Do you understand? So you need to find ways to actually to get them straight away. So this is why Sonic Pi is also a text editor. I built my own text editor to make this experience easier. It's also app So you just download it from app you download it for pc if you have a grasp in pi Right school. Sonic Pi is also installed by default Um, so you just open their application and you get this kind of environment and you can just type text And you can run and you get errors Great, so this is my birth program thread death Um, and so undefined local variable method good work fine. So what what can we call? Well, I've got sort of auto completion thing going on. So call play give me a number And I can hear sound And this point I can spend hours. I've only got for 20 minutes left. So I'm gonna go quickly Um, but at this point there's a lot of opportunities for learning to photograph distractions So numbers have this property to go up and go down. It's great What else in the world? And can we therefore use numbers to model? Clearly pitch the music goes up. So if I do tonight this give a higher note And if I do tonight this in a low I could also do something like this and get notes between those So I'm free to choose whatever note I want. Um, and at this point kids do this closer. What about this? They play this note Maybe you could hear that And then this one this is a really fun like So I did this talk to uh, to have some job developers In other words about baritone and it was in a cinema When I did this line of code thinking maybe you might hear a little bit and the banks just Oh It was amazing. So you could tell like the one line of code you can get people engaged interested So this you can play any note at this point. Oh wait, you can hear that look just the back, right? So there's a cinema. I mean, yeah scared Um, so there we are It's the first program in sonic pine. You don't have to think about Objects and classes and any of that stuff. You just write in the function Give it a parameter press the run button or hit the shortcuts and you get immediate outputs And you need to visualize what's going on in the scope of that And then uh, this point you think well, okay, I want to make a melody 60 then 65 I don't know what your expectations are that probably not or we're not the same as what actually happens in because This is where it sort of deviates from traditional programming languages. Although. It's a ruby yourself. There's lots of weird It's not quite ruby. It's mostly ruby Here, uh, you might know one way to think about it is the computer's crazy fast So it plays note 60 and note 65 pretty much at the same time that one after the other But actually I've got this insane sort of clock system And this plays both these notes some collective at the same time One more 4100 Actually Because you need this and I get into the moment when you actually move on from doing gleeps and gleeps like this to Performing on stage at useful ventures. Are you when you do using you care about time you care about sound and so One of the challenges of something higher is not just to make something that I can go in the classroom And do this kind of thing, but also the same tool. I think go on stage in the fall I mean that sounds ridiculous, but that's what a guitar is right You go to the school pick up a guitar you start learning but then there are amazing guitarists professional using the same instruments So could we imagine it's not in pi as Both take it both learn pick it up very simple, but also take it to a crazy level So if you want to make a melody with one more command Now I I don't know about you but that excites me to uh, Believe me But I think about it, right? What is western music? It's mostly which notes played when the plate But I have the ability to make any melody Any bass line any riff any notes on any dark punk with these two backgrounds I could do that more importantly you can do that I need more importantly your children And they do it's so fun to watch And so this is the thing right so this point. I basically I was trying to meet the computer science professor I've done this you can obviously then use your standard favorite ruby things So like Do a bit of function calling so you can make abstractions And first part second part you can do randomization and that can go to detail about that of course spend time talking Spending a lot of time It's not standard But the question then is where where to go for him and I think this is exciting Programs, we have this starting point making some basic beats, but if I want to go on stage and Where and this is where it gets pretty interesting. So first of all what you do is you can change the sound So that means that uh boring so I can use since there's a bunch of built-in synths. So let's start with chitly The So you can obviously change these things and it's uh effects are cobalt lower it so I can switch between that and I saw way So you can modify the sounds now these synthesizers this huge synth piano Is uh as documentation about it and have all those those black things that you can't read at all They're all in options little things to change each of the synthesizers has up to some 20 or 30 different controls So the tombering sound is fully programmable and this is where you can start spending serious time exploring the sound What crazy thing do you do? And that this is to me where it gets really exciting Um, but what do I mean by this? Well, let's let's have a look. So if I have a used synth profit Play I know you should also use root cymbals to represent notes Um, and I let's go for reduce time of eight seconds You sound right well, you can cut these options as opposed to the options of the change of mode cluster Oh no Let's uh crunch it So you can start to press around these things. I didn't know you said the sounds are made on top of each other So every time you press the wrong button, it's a pretty good press. It's more than three And your credit is still running. The sound is still being reduced because it's throwing more sounds at the top So already we're dealing with a Occursive And why do we that? So but I before do that. I'll say well, so you can play different notes. You can wait time You can change the sound you can modify the sound and there's many many pages to make it. I really encourage you to download it Just explore the play But you can also play samples. So this is like the r-men break most famous It's not great Oh, it's just formed like a hip hop and drum base gather Jungle, what do I mean by that? So like n w. Where you use the same sample and they just played out And then you've obviously got the sun the drum base down here And then the jungle which is the same thing Fast, right? So you can take the same sample you can change the strength, right? You can even do this, right? What do you think this is going to do? Basses So you can play a backwards a hard speed forward whatever so you can play around look you like that. That's great Yeah, if you like that, you can imagine it's just so much more you can do that And I guess the way I explain that is that tonight he's come to the digital ocean party And now we've got it. So you can see like the way you can make it, right? So that's looking at other things so Before I continue, it's really important just to make sure you understand this is free open source You can download all of these systems and if you press the help button Here the last information There's a full tutorial and this is a full book It's like 40,000 views and it's written assuming, you know, nothing about programming And nothing about music So if you don't live like that even you can whip through but you definitely can still whip through And children taught themselves how to code Adults taught themselves how to code So you can totally get it That's got a lot of time documenting every single part of something Building something which is useful is one thing, right? That's a beautiful thing But if it's not something I can immediately just download and use there's lots of obstacles And maybe they're thinking of programming So okay, you can download a bunch of things, general things and even private things Put them in this directory and then you've got this great script Generate to this thing and then you've got this file If you're a programmer, you can follow a tutorial from those down And then pop it out of the building and sort of build it But if you're my daughter, my son, you're not going to get that If you're a computer science teacher So you just have to work completely and also have to have really good documentation So when it doesn't work to expect, you can know if you're having a problem So the point to point out is it's really well documented And my promise to you, and it's a real choice, is if any part of the documentation doesn't make sense That's my fault, not your fault Right, no one's too stupid to code No one's too stupid to code, it's me, I'm too stupid to brush it's places in the way So if you read my tutorial and it doesn't make sense, that's a good Please tell me how I really do my best to fix this so the next person won't come at a different time So that's again that's a good promise But where did you do this? So I've got samples, I've got synths The next thing is you might want to write like a Hatch tracks, right? So I create like a sample bass drum That sleeps for half a second And we've got the bass drum part, it's great for kids to do this And within a couple of hours, children are doing this So that's just coming this out and then Let's create another one of the synths Instead of doing this, let's do it for a second And let's just code one here a little bit Now we're going to play them both at the same time Obviously your program is actually But most of us don't realize this, and kids, they want this They write this code, within four lessons And a number of children are doing exactly this and saying Excuse me, why can't I get no things at the same time? And it's a bit depressing because if you can, the answer is You can't do this Because you have to wait until you're the first to do it Because you need this thing called concurrency in France And we don't teach that at school Sorry Seriously, and now if you don't, it's going to teach you That kids, people, to do this And the kids say, that's not the service I haven't got the time, we can't mark it It's just not acceptable, we can't teach that And so this is where, you know You just put the hair out and it's depressing How do I fix this? And this is the beautiful thing about programming So programming in general is that We don't have to stop at things You can't do this They're rubbish They're like black holes of programming Let's be writing some notes and sitting on a network socket And you're next to someone who's waiting for you Each video press Then they're using all that they're going to do To do the same thing Or a computer that they gave you But if you ever wanted to do two things at the same time Or if you want to change the behavior You just don't give you anything to talk to So, as a programmer, that's what you do You can invent new things And I'm practicing for a live loop So you just add a live loop from the code And it gives you an error Because live loop means to have a unique name These are now no longer These are my bands And I've got Sarah playing the drums Freddie playing the bass And then when I'm on the code I'll forget So now we've got Sarah playing the drums There's one more thing We've got number eight on the left Something stupid quickly At this point, people have been quite happy They've got things going at the same time But if I played that For more than a few minutes It all would be... Yeah, it's not going to do something good So what I really want to be able to do Is, I mean that this is a static programming thing So if you have an idea of what to build What if we do the TV thing Just write it down first Unless you know exactly what it's going to build Don't do the TV thing Unless you reach it, let's go So you can write a test And you can do the same thing But other than that Things are But here we run the code We then run the tests In this case we listen to music And then... Okay, I want to change the bass drum It's a bit less specific Sorry, I want to stop dancing I'm going to change the code I'm still at 70 Oh, we aren't getting caught I'm going to change the code Half speed But this is not going to work That's programming That's totally going to work When you always tear down the code But when you perform it What you really want to be able to do Is just change the code And have it just automatically That's a lively thing It doesn't just give you concurrency It gives you the ability to create a character This is already a lot of fun I'll give you enough stuff to go away But I want to just go in and trade more So Even if you don't have a square brush It's like cool UK artists I need to get a lot of stuff For the arm end break things So let's just go back and look at that Let's change time Let's change the speed of time So you use PPM You suck at PPM Because this part is actually hard to live It's actually hard to beat And time is like to trade local variables Which by lively you can have more motion time More motion PPM You also stretch time based on the length of samples Again, don't listen to what I'm saying It's just crazy science But the effect here is that I can now basically see The one length of the sample I'll just do that I'll just start But what's round-bushed It's basically took that sample as a round file It looks for all the transit Throw all the trouble that it takes for that And then carefully using the citizens Took them out And then copy and pasted them And spent days doing the tweets Could we do this in a slightly better way So what we could actually do is Just stick for a short amount of time To get rid of this I'll just do one second of that Which is just not to the sample Here I'm just pulling out that drum file And I can now Do up three bits Or I can use this Or I'll Do random instruments I'm using this It's like the whole stuff What the genre of music is All lines of code So that's the look I can take the guitar sample Do the same thing Going nuts I can even I've got time to show you What you can even pull in all the yogurt In some words I have the guitar style I can build the live movement So you can play up the bass And play it back And look, it's just fun It's a multiple fun What you're taking It's the best I can make it So with all the randomization stuff So if I Would do Rounds Three Values Five, zero, zero, six I call it again And if I Plug in this twice I'm sitting here with two different values But get this We do this with all of them Which actually said I do really useful when you make music It's now a tool of the moment I mean what would I do with this So if I did that The live look stuff And I've got this What I can do is I do eight times Do random seed So number So we can all build melodies By changing this number So you see how I can just by changing that seed You can have different things This is a really fun pose A structure like this for randomization I mean where I'm going to take that If I Build an example It's called regress I've got some scale of E minor Type Oh I do this cool thing here This is for two reasons One is it's a special kind of data structure It's a new useful data structure So it's kind of idealistic So it's sort of square brackets But also I want to make sure that the kids aren't scared of this Because this is the most exciting programming language there is If you have time to do this I know that's a reticle But I still believe it But anyway this is this I did the same thing again So I'm all doing this using randomization system To pull me out of a random grid I did the same thing And it doesn't go too crazy So look at this Sleep from minus Right I'll leave that as an exercise for you to grow up Why doesn't it fit in I've got one minute left I want to show you one more thing So if you have a guitar And you have an audio pedal A sort of audio card in your system You just read it as a gift amount And you call it a fool And you run the code And you pull the audio in You now get up and hit the top I have to show you this When you say With effects Wrap that around And now you've got a guitar Another one Distortion And now you've got a guitar Passive I can change it very quickly But for 30 seconds left It's ridiculously short But there's one more thing it can do So I can call MIDI E1 You can't see that It's hidden away from you It's a little moaned It's just flashed That's no use for you So what do you really want to do Is put it here and play So if I break one of these live blocks Put this in here And sleep for a short amount of time Flash it a lot But if I then say live, audio You can hear this Change the amplitude So now what I'm doing here It's then Device And then with the live audio You can then use That all sounds complicated But it's fine by the code I have some reverb here Actually let's just use a cross And cross your way To use something in there instead of live And then you can use Reads here E1 E2 E1 And then for the final phase I do great, I don't want to do And I can synchronize it in time With an existing green light So it's a good control system I want things to be at the same time So if I synchronize this And see It plays sample and bass drum And it starts by adding a kick drum Please See for a couple of seconds with loud Off we go For now time So please want to see me later on