 My name is Joseph Wilk. I am a programmer, and I am going to give you a live performance controlling visuals and music or noise. All live coded, all live, nothing is pre-recorded, nothing is pre-rendered. This is all done live synthesis, live Unity 3D games engine. I've never done this performance before, so it's very improvised, and it will probably go horribly wrong, so I will slam the laptop lid, and we will forget this thing ever happened. So without further ado, I'll stop talking and start trying to make some noise. I say noise, not music. Oh yeah, sorry, I should say this is done using Sonic Pi, Unity 3D, and a whole ton of other stuff, but I'll show you an Emacs, of course an Emacs. Okay, let's try and do some stuff. Build the magic of all that. Look at Emacs. Emacs is chugging because it can't handle the fact that it's rendering an open jail window at the same things you learned from live coding. Okay, so let me just kill. So what I have here is Unity 3D full screen app running in the background, and overlaid over the top of that is just a transparent terminal running Emacs. There's many layers to what I'm doing here, but probably Emacs is the place to start at. So Emacs has direct controls to the graphics, and it has direct controls to the visuals, a Unity. There's some live synthesis through Super Collider, and Sonic Pi, and some sampling, and there's also Ableton Live running, which is controlling MIDI, which is directing to stuff like this, a modular synthesizer. So when people say that I'm live coding and I'm not a musician, I can say it's a musical instrument. Emacs is running a UDP server inside itself, which is kind of how I can do weird stuff like controlling the speeds. When I'm actually triggering these values going back and forth here, it's actually broadcasting messages to the games engine and broadcasting messages to the audio engine, which is the great thing about code, right, is that I can manipulate many, many things through patterns, through executing functions of code that has many, many implications in the performance world. So there's Emacs, and obviously I run the code, you can see it flash whenever I kind of do that. It's usually a little hidden. So then that's actually getting sent to a Ruby server called Sonic Pi, which is executing the code in Ruby, and that again is sending messages to the graphics. Everything you kind of see here is just functions. They do some pretty hideous stuff I have to admit. It's the beautiful thing about live coding. There's a lot of mess underneath. I also, if I was being really fancy, I would say I implemented macro, was it macro? Pre-compiler macros in Ruby. If I'm not being fancy, I do regXs on this Ruby source and I removed commas for this data structure because this is my Ruby. I kind of like what Matt was saying, he didn't own Ruby as kind of everyone. This is my personal Ruby. This is what I use to express myself through, and hence it really matters to me very small details which don't matter in other types of programming. Commas are really, really annoying, so I remove them. Why not? So there's a couple other things. That's a prefix notation, but I'll scoot over some of that. Let's just kill that down a bit, and I'll also just see if I can boot up. So this is able to live. This is the only, well, let's say, so Unity 3D isn't open source, but you can get a free license. You don't have to pay to use it. Ableton is the only piece of software that I'm using that is actually a paid piece of software, and it's just rendering lots and lots of MIDI. I'm just going to turn my sound engine off because I was really breaking it there. I just kind of wanted to see if I can get this to work, so I can show you roughly what was going underneath the surface, because there's a lot inside Unity. It's really a case of, again, you can't do this all in Ruby. You probably could embed Ruby if you really wanted to try. I know people have done Iron Ruby and some weird and wondrous things like that. Really, what I'm doing is building a scene with lots of controls, which are then getting sent using something called OSC, open sound control, which is the duct tape of all art performance work using computers. So this is the scene. You'll see you actually had a lot of paths and a lot of choices. This isn't pre-designed as such. You can see in this example actually I had a tree which I decided not to open because that was me deciding. So you kind of see, without all the fancy stuff, you can see that I've composed of a scene and the really horrible and scary thing. I'll send you the link so you can kind of go away and take this stuff and do it yourself, because that's my real goal here. This is how I get Ruby to speak to Unity. So what you have here is effectively a patch graph, which has many, many OSC kind of endpoints, which just look like URLs. It's pretty tiny, but that just says slash rock slash vortex slash force. This is one of the forces controlling a vortex simulation. And I'm sending a Ruby message from my code and from Emacs to that address and then it's doing some nice smoothing because jarring transitions are not very nice and not very friendly. That's kind of all the magic that's going on. There's lots of really horrible, horrible, horrible bits inside the code that I'm probably not going to show you. But my real goal here was to try and give you something to take away and actually do this stuff yourself. I haven't really talked about this stuff very much before, as to how I do this stuff. So I just wanted to give you some links so you can actually do this stuff yourself, because it's fun. I highly recommend it. And it's amazing to think about Ruby from a different perspective and think about programming from a performance perspective, how that program allows you to sit in your mind and how you bend it and manipulate it. So the first thing I perform as Ripple Electric, that's me, my live coding entity. That URL there is the source code, which I'll push, but this is the source code of an album I created through Ruby code. And this is a deviation from one of those tracks. So you can go and see all the source that I did today and browse for yourself. I also kind of broke Spotify and iTunes and Bankam and basically all the music stores by naming my album ASCII Art. I'll leave you for that to decide what that actually says. I don't have to say. Yeah, so that's who I perform as. Sonic Pi, a free open source tool using Ruby to live code music, audio, pretty much anything. You can send OSC from it. You can do everything that I've done through Emacs through Sonic Pi's interface. You can plug in Atom. You can, you know, whatever editor you want to use. There's nothing stopping you doing that stuff. And Sonic Pi is used to teaching schools. So my kind of goal with this is to go into schools and show children how they can use programming language to express themselves and to explore their creativity and then go and I work with professional composers for movie schools and TV programs. And I sit with them with Sonic Pi and show them how programming can augment their creativity in order to discover interesting musical avenues, I guess. So for me, it's that kind of spectrum that I can sit in a classroom with a bunch of children and say, here's all my work, like go to it, open source it, fork it, make better music than me because you will be much better at this than I will ever be because you're starting so young and you can take in so much. And then the other end, they can take it to full fruition of actually composing professional level music. Unity 3D, as I said, you can get it on a free licence. You don't have to use the Unity 3D. You could use Ruby Shoes, you could use a browser-based thing, you could do shaders, you could do anything you can imagine that you can control and put a server inside. So there's a huge community around live coding using some tools that I'm happy to give some recommendation for if you want to play around with other stuff. Unity 3D is C-sharp or JavaScript, so you kind of have some choice there. And the other most important thing of all these things, how they fit together, is a library called clack. And I just mention it because it's not very well known and without this, it's almost impossible to get Unity to speak to Sonic Pi and Sonic Pi to speak to Unity. It's beautifully documented. You just go download it, install it, and you're done, and you will be able to send messages to Unity 3D through Ruby, which is super exciting. Yeah, so if you liked my music, thank you very much. I try. And this is an album that I put out. This is the... I'm going to hazard a guess. I might be wrong. The first person to ever publish an album on Spotify just through randomly executing Ruby code. So if you enjoy that, you can take layouts on Spotify, Bandcamp, and all the various other things. I'm really happy to show you. And also, oh yeah, one other thing I forgot. Every time I hit run in my live coding session in Emacs, I made a git commit. So not only do I have the full source of the end composition and how I composed it, I actually have from day one right up to this performance of every time I hit run. So that's a complete git history of the performance and the creation of the piece and all the weird and wondrous avenues that I went down trying to make it. Again, I'll push that all up and I'll tweet it out and share it with people if they want to see. Please come and see me if you want to talk about any of this stuff. I'm very happy to share and show you and help if you want to know where to get started. So thank you very much, everyone.