Introduction and Guest Welcome
00:00:15
Speaker
Welcome to Deaf and episode number 53? 54? 54, I think it is. 54? Yeah, 54. Oh, I think we took a kind of a small summer break, hiatus and then we're back. But this time we're back with a bang with Mr.
Dave Yarwood's Location and Work
00:00:34
Speaker
Dave Yarwood all the way from the US of A. Hey, thanks for having me. Whereabouts in the US are you, Dave?
00:00:43
Speaker
I'm right outside of Durham, North Carolina. Actually, right now I'm at the office of Adzerk, where I work, which is in downtown Durham.
Closure Community in Durham
00:00:52
Speaker
You're in the kind of, uh, the, the blast zone of, um, of closure. Yeah. It's like close your HQ. Talking of the heart of closure, maybe we should start by just talking about the fact that we all kind of met up at the heart of closure. Um, while you were over there, uh, I think you gave a lightning talk, didn't you Dave?
European Closure Conference Experience
00:01:17
Speaker
Yeah. So, um, I'm very grateful that ads are pays for us to attend some conferences every now and then. And, uh, I heard that hard closure was happening. I was like, what if I attended a European closure conference? And they're like, um, yeah, okay. All right, Dave, you can do that. So that was, it was really awesome. Yeah, it's really good. Yeah.
00:01:37
Speaker
It was a really nice demo. So you're showing up all the fancy music stuff that we get into later. But I think there is a couple of things happening, right? Heart of Closure and also Closure Trade during this period. Heart of Closure was really great. I mean, it was a beautiful venue, pretty nice late. I think a kind of a slow food sort of, slow conference sort of. Yeah. Yeah. It's a nice way of putting it actually. Yeah. It was a very slow conference, but a very low beat.
00:02:05
Speaker
Yeah. And you could have a lot of conversations around and it was really nice. Yeah. I really liked it. And it's a beautiful city, I think. Yeah. What did you think of it, because I guess it's your first time in Belgium.
First Visit to Belgium
00:02:17
Speaker
Yeah, it was my first time in Belgium, only my second time in Europe in my life.
00:02:21
Speaker
Um, really like it over there. I thought the conference is really well organized and you know, a lot of great activities going on. People are organizing their own activities. Uh, there seemed like there was a lot of room for like hallway chatter and meeting people, which is, I really enjoyed that.
00:02:39
Speaker
Yeah, there was also a real nice focus on not just on closure, but also a bit broader community issues.
Environmental Discussions at the Conference
00:02:46
Speaker
I really like the one with the I don't remember the name, but he was talking about all the global warming because of the servers and stuff. And how can you reduce your carbon footprint for the for the servers and stuff? So that was pretty cool. A great conference. I think just to say, by the way, that I'm working on a blockchain at the moment, but it's not the bad ones that burn up the planets. OK, so so don't at me.
00:03:11
Speaker
blockchain is burning the planet. But it was a very, very nice conference.
Networking at Conferences
00:03:17
Speaker
Uh, of course, you know, thanks to RNA and Martin who, uh, made the conference, uh, uh, a reality, I think. So it's a, I had wonderful time there. And then of course, you know, we met up there and then we had nice pasta in the evening. Yeah. Yeah. It was really, uh, I felt like really star struck. Actually, there's all these people that I know have known for a while on the internet.
00:03:37
Speaker
Like on Twitter or whatever on the clergy and Slack and I got to meet them all in person. Yeah. Yeah. That's true.
00:03:45
Speaker
Do you go to a lot of conferences, Dave, or is this sort of one of your first Closure conferences or do you go to a lot in the US? I know they don't have that many in the US. The tides are changing. No, I go to one or two conferences a year.
Company Support for Conferences
00:04:02
Speaker
Adzark's whole thing is focusing on our professional development and making sure we go out to conferences and learn things. I've been to a few Closure conferences before.
00:04:12
Speaker
Closure conge they have here in Durham every year. Oh, yeah, of course. Yeah, that's gonna happen again this November That's the Metcalf closure Yeah, I've really got to get to it one of these days. I'm hoping as well, but it's a bit late now October I don't know when I make when is it? It's a end of November I think like right either right before or right after Thanksgiving Which doesn't mean much to you guys I suppose
00:04:39
Speaker
I mean, for me, absolutely no. I keep, I think it's a Turkey thing, right? Is it the... Yeah, it's what's basically they eat as much food as possible and hang
Thanksgiving Traditions and Humor
00:04:49
Speaker
out with your family and drink all day.
00:04:51
Speaker
We have we have fake turkey every year. We have tofurkey. I'm also vegetarian. This is this is also another. It's not quite a first, actually, because we've had a few vegetarians on, but it's nice to have, you know, complete vegetarian podcast keeping our brand up to date. Got to keep that ratio of vegetarian guests and non-vegetarian guests up.
00:05:15
Speaker
Well, we do ban eating meat during the podcast. We're not very good at enforcing it, but it's an honor system. We can guarantee our audience that nobody is eating meat during the show. The stuff that you see in the movies, no animals
Music Background and Programming Journey
00:05:33
Speaker
were harmed during the making of the movie. We really should insist that people don't eat it while they're listening to the show.
00:05:43
Speaker
that they should be. Yeah. So tweet us if you're eating meat during listening to Deaf and that would be quite interesting. Or if you're having like a nice vegan meal, that would be good as well to tweet that one too. So that would be nice. So Dave, so how did you end up at heart of closure? So what is your journey into closure? So where did you start? Can you give us a bit brief bio?
00:06:11
Speaker
Sure. So I'm a self-taught programmer. I've been working at Adzerk for about five years. It's actually my first software development job. Studied music, composition, and bassoon performance at UNC. Bassoon. Bassoon. If you didn't know, that's a double read wind instrument. It's very long and narrow. Beautiful instrument, yeah. Yep. I have never seen it. Is it like a wind thing, or is it strings, or is it? It's a woodwind.
00:06:38
Speaker
OK. Wow. Yep. It's like a big hard flute. I don't mean that. That sounds naughty. It's like a flute. It's more like a big clarinet, isn't it, I guess? Well, it has two reeds. It's a double reed instrument. So on the clarinet, you have the mouthpiece, and there's a single reed that you're flapping your tongue against. On a bassoon, there's two reeds like this. You can sort of like hop against each other. Yeah, but people don't see that part. They just see the output part.
00:07:07
Speaker
So I'm putting my fingers together. Like it's a double read. So Dave is doing something like a shadow puppet of a crocodile. Like a duck, I think I'm going to say. Like a duck. Okay. That didn't work out too well. Anyway, studied music in school, um, got into software development
From Music Degree to Programming Career
00:07:25
Speaker
later. I've always sort of been interested in computers, but didn't really make a concerted effort to learn how to program until after college.
00:07:32
Speaker
And it just started devouring programming books. It started with, I think, Python, and then Ruby. And eventually, it got into functional programming, learned some books, read some books on Haskell. Why the shift? Because you have a professional musical career or something, or that's what you are building up to with your studies.
00:07:54
Speaker
Oh, no, I kind of went into college knowing that I wouldn't make anything with music. I mean, make any money doing it. Yeah, my mindset at the time was like, Oh, I just want to get a four year degree in something and then that'll help me get a job, right?
00:08:09
Speaker
And it ended up falling into a career that was unrelated to music or software development at all. Sort of like a desk job. I was there for like six years. And then in the evening hours, I was sort of like thinking about, maybe I should switch careers at some point. This isn't very rewarding. So I just kind of started teaching myself more and more about programming.
00:08:33
Speaker
There is a big intersection of people going into programming and then music as well, right? Oh yeah, I mean, tons of people. They seem to be kind of logically similar or something. Yeah, really, I think there's a part of the brain that is active when you're doing, you're either playing music, maybe writing music, I don't know, and writing software. Yeah. Yeah. I think we have to be careful here, listeners. Correlation is not causation. Yeah, that's true.
00:09:03
Speaker
So people, people should go back and then learn music theory properly before they can become programmers.
Learning Closure and Interest in Metaprogramming
00:09:08
Speaker
It'll make you a better programmer. Exactly. I'm not going to back that up at all, but it sounds like a good thing to say. Welcome to my Ted talk. So you had four years of music courses and music degree, and then you started learning Python. And then what happened?
00:09:29
Speaker
Yeah. Well, actually I took one class, one computer science class in college. It was like, it may have even been like CS 101. It was like introduction to programming and that was Java. And I really liked it, but it seemed like a lot of ceremony. Like this is, this is not for me, you know, a lot of stuff here. I don't understand all these import statements and stuff. So I kind of put that aside. And then later, you know, when I found out about Python, it was like, Oh, I can actually write scripts and things. Like it's not hard to do this. And then that kind of got me going.
00:09:58
Speaker
Then, then where did you discover closure then? I actually don't remember. I think it may have been, this is like early 20, the teens. What do you call it? Decade the tens, the teens. There's a book that came out called Seven Languages in Seven Weeks. Oh yeah. Bruce, Bruce Staunter or Bruce Tate. I don't know how to pronounce his name. Yeah. Pragmatic book. Yeah. Yeah. Yep. So I don't remember that may have been my first exposure to closure. But yeah.
00:10:27
Speaker
That book, I really liked that book because it was like a survey of wildly different programming languages. Yeah. And, um, yeah, closure caught my fancy because at the time I was really into Ruby and I liked the metaprogramming aspects of Ruby. You can make a DSL to kind of, you know, make your own language inside your program to describe what you're trying to do. And in Lisp, like you can, you can really do a lot with that. Like that's metaprogramming to the extreme.
00:10:57
Speaker
Yeah. And then you joined Adzerk then after learning Closure.
Developing Alda and Desk Job Boredom
00:11:01
Speaker
Yeah. This is like maybe a couple of years after I'd been programming in Closure for a while. Yeah. And during that time when I was working the desk job and tinkering with programming in my off hours, that's when I started creating Alda. Okay. So you already started before you started working and getting paid for writing software. Right. It's just something that I really wanted to do.
00:11:26
Speaker
Actually, a little anecdote there. Yeah. There's a little anecdote there. Sorry. Go for it. Go ahead, please. Yeah. So I was working this desk job. And sometimes I would get all the work done for the day that I could possibly do. But I still had to be there for eight hours a day because that was the rule. And so I was looking around. I was like, what can I do with my time now? I mean, I could get out this big sheet of manuscript paper, like staff sheet music paper and start composing music. But that would look kind of like I'm obviously not on task.
00:11:56
Speaker
So what if I could open up Notepad on the Windows machine that I was working on and just start typing in a text file and compose music that way? I think that may have kind of planted the seed for Alda a little bit. That's nice. So I think we should be thankful for that boring desk job then for Alda. Yeah. If you became professional in programming immediately, you would be writing some other junk like, OK, some more HTTP shit and all that stuff.
00:12:25
Speaker
That's nice. But I was, I was digging through a bit of history and then I think it's almost six years or seven years since you started building Alder. Yeah. 2012. I think that's when I started like designing the language. Wow.
00:12:39
Speaker
Well, we can also talk a little bit about, before we get into Alder, because I think it's going to dominate the show, but before we do that, a bit more about Adzerk, because like you say, they're working there. And I think that's where Mischa and Alan Diepert of Hoplon and various other closure things
Work at Adzerk and Closure Community
00:12:59
Speaker
So did they kind of, how did, how did that work when you like went for an interview or whatever? Were there, did you show them elder ones say, look, I can cut closure or how did, how did, how did they kind of like get you on board? So I started going to the triangle area. That's what we call Durham Raleigh and Chapel Hill in North Carolina, the triangle area closure meetup group, which at the time was hosted at Cognitex. And so yeah, I went there once a month, met a bunch of people in the community.
00:13:26
Speaker
And, uh, there are a few people from Adzerk who would attend the meetups. And so at one point somebody, I think Alan actually mentioned that they were hiring. So I was like, Oh, okay. I'll look into this. No, I think it's like a, I just happened to be in the right city to get interested in closure.
00:13:44
Speaker
Right. And did you know that like closure was like next door to where you like, like the heart of closure in the, in the sort of a headquarter sense. Did you know it was there when you were learning closure? Was that, uh, did you find that out afterwards? No, I found out afterwards. It was like this weird coincidence. Um, another weird coincidence is that I read the book, uh, early on when I was learning closure, I read a closure for the brave and true Daniel Higginbotham. Um, also lives in Durham.
00:14:14
Speaker
Oh, right. Okay. Yeah. Like I read that book and I was like, man, I really liked this book. I want to tell the author how much I like it. So on the, I went on the website and there's this contact information and I was like, wait, that's my zip code. Like I could walk to this guy's house. So did you? That's nice. Like a scary stalker, you know.
00:14:35
Speaker
And that's where he got his, uh, what do you call that? Like an, an order to stay away 500 feet or something. I have a string order from Daniel. Have you met him in, have you met him in the closure meetups though? Does he go there? Yeah. He actually, he, uh, he did some contracting work for Adzerk for a while. So we were, all right. Okay. All right. Right. Okay. So you did finally managed to get to say hello. Yeah. Yeah.
00:15:02
Speaker
It's like the Hollywood of closure, like all the celebrities living in the like 50 kilometer area. Yeah.
Adzerk's Use of Closure and Advertising Technology
00:15:08
Speaker
Yeah. Like one of the first talks that I attended there at the meetup was Stu Holloway was talking about the atomic and that just like blew my brain apart. Like I barely knew about databases at all. And then he's talking about like, you know, the element of time and like being able to like, you know, immutable database.
00:15:25
Speaker
Yeah. If it is not too revealing, so what do you do at Adzerk using Closure? How does the stack look like and what kind of challenges that you are, or what kind of things that you're solving there? Yeah. So we're like, I guess you could describe us as sort of a world-class platform for decision making at scale. The use case is typically ad serving.
00:15:49
Speaker
And we enable people to do better things with advertising in the native advertising space. So the part of the system that I work on most is what we call the configuration or the management side of things. So people are funneling ads into the system and configuring how they're supposed to serve.
00:16:10
Speaker
Oh, yeah, it's service-driven architecture. There's a bunch of different services, mostly written in Clojure. We're all sort of Clojure fanatics here. So there's a few older systems that are written in other stacks, C Sharp and some Node.js and stuff like that. But all the new stuff we're building is in Clojure, and we're working on replacing the older stuff with Clojure. So there's some sort of porting effort going on too.
00:16:38
Speaker
Just a non-technical question in some ways, like a business question, but it's like, are you looking at personalized ads or is it more kind of like looking at demographics or sectors or other kind of non-personal splits? Well, we're really sort of like the toolkit in that whole thing. Like we enable people to build exactly the type of ad serving experience that they want. So the idea is we're trying to get customers who are more interested in doing like more humane sorts of advertising.
00:17:09
Speaker
which is, you know, you could use some element of personalization, but the hope is that you leave really sensitive information out of the equation and just focus on stuff that, you know, like if you're browsing some website, you probably want to be shown ads that are relevant to your interests, but not in an invasive way. Right. So you per se are not actually a surveillance company. Not per se. It's good to know, good to know.
00:17:40
Speaker
So I was there in, I think last week, I was there in a conference called Data Council in Barcelona. It's about data and all that stuff, machine learning and AI, and also the data engineering stuff. So there was a company, somebody doing like a similar kind of ad delivery thing, but it's a real time bidding.
00:17:58
Speaker
So I didn't know that, that, you know, while you are scrolling on a mobile page, they immediately send the spaces available and then there is real time bidding going to happen and then people can push the ad then. The ads that I'm used to is like Google ad versus something, you give some publisher and then you're done. Then you sell the space and you don't care what it is going to be shown.
00:18:18
Speaker
Yeah. So that's sort of like the old world of ad serving where you just have like a banner on your site. You don't particularly care what the ad is going to be. Could be something really inappropriate or not relevant. Yeah. So the new idea with native advertising is, you know, you have you can collect just the information or keep it, you know, sort of collect the information that's most relevant for the types of ads you want to show. And a lot of it is more like content on your website. It might be sponsored content. You know, it's clear that it's an ad like you'll see the word sponsored next to it or something.
00:18:47
Speaker
But it has to do with whatever area of the website that you're in. Or sometimes if you've bought something, you might get ads for related things. That might be something you're interested in doing.
00:19:00
Speaker
Yeah, yeah. At least it's not that level creepy that, you know, I'm in a Wi-Fi network and then someone else who's sitting beside me and then he's searching for hotels in Barcelona and then I just get the ads of hotels in Barcelona because the same Wi-Fi network and then they keep thinking, oh, these people must be in the same home or something. So, you know, yeah, it's super creepy sometimes.
00:19:20
Speaker
But so how is the, so like what kind of database use and what kind of libraries
Adzerk's Technical Stack and SQL Exploration
00:19:27
Speaker
do you use? Do you use Hoplon there as well? Because I know Misha and Alan. Yeah. Yeah. We have a huge Hoplon application that there's all sorts of cells all over the place. We coordinate them together. Nice. Yeah.
00:19:42
Speaker
It is interesting to see Hoplon work at that level of scale. You see a lot of the examples. You can do a to-do application and things like that, which is you're not really stressing the system there, but we're making all these database queries in the background and updating the results in different cells and things like that. It actually works really well. What is the database that you're using? Do you use Datomic or do you use Postgres or what kind of databases that you use? We're using Microsoft SQL Server.
00:20:13
Speaker
Wow. Yeah, fine. Yeah, that's the legacy system that we're sort of tied to how things are working in that database. Yeah. Well, I think once you abstract it away using some libraries, then probably you wouldn't be worrying too much about what SQL server, what type of server is there. Yeah, true. Although it can do some pretty interesting things. There's like change tracking in SQL Server. Have you heard of this? No.
00:20:40
Speaker
It's kind of neat. You basically get like a log of things that changed in the database, which is almost like an audit table. Yeah, it's like CDC, isn't it? Change data tracking. Change data, something. Capture. Capture. Oh, capture. Yeah, that one. Here.
00:20:59
Speaker
Nice. And so because you were not, let's say, tainted by years and years of Java and stuff. Right. So how did you see or what is your, because there is plenty of front-end code that you're working on, like Hoplon and with ClosureScript. And I'm assuming there is a lot of back-end code as well. So
00:21:23
Speaker
Was there any leaky abstractions that you had to learn more JavaScript? You had to learn more Java to get more productive with Closure Closure Script? I want to say Closure Script kind of hides a lot of the mess of JavaScript. I mean, there's some things you have to know, like why is this? You have to know to disable, like if you're doing a click handler on something on the front end, you have to remember to prevent default.
00:21:50
Speaker
Yeah, to prevent the DOM events. Yeah. Right. So little things like that are still you still have to know about that stuff. Yeah. And on the server side, do you get into more Java side because that kind of libraries that you're using? Yeah, like we've actually been tinkering with different ways to do SQL queries. And a while back, we decided that Closure Java JDBC didn't meet our needs.
00:22:15
Speaker
although JDBC Next is looking a lot more promising. It's kind of similar to the thing that we ended up hand rolling something that's very similar. So there's a lot of like interop with JDBC and stuff like that. So maybe we can now switch to music.
00:22:35
Speaker
Yeah, sure. And talk about the new language. So what is ALDA? Where did it come from? We know where it come from, from the boring desk job, luckily. But how did you build it and what is the value proposition? Right. So ALDA is a text format for music composition. Imagine if you could write music by writing text in your text editor.
00:22:59
Speaker
And then highlight just the part that you want to play. Maybe press a couple of keystrokes and hear it played back. I was very inspired by the Unix philosophy of things. So I wanted to make a command line program that its job is to take some text-based input that represents music and play it. So it's just like. So you can echo and cat all the instructions to Alda. Yeah. So if you want, you can actually write a program in some other language
00:23:28
Speaker
emit Alda syntax and pipe that into Alda. So I do something quite like that with, I've written a lot of music where I write closure code that generates Alda. And you can write algorithmic or procedural music that way. So you're an algo reva, are you, Dave? One day I hope to be. I'm really more of an algo composer. OK.
00:23:57
Speaker
So what is this? How does the architecture look like? Because it's so you write your sheet music or you write your music with notes and essentially with text, plain text. And then you feed that to all the program. And then what happens then?
00:24:15
Speaker
Yeah, so actually, it's changing now. I'm actually working on Alda V2, which is architected differently. But I'll just talk about V1, because that's what we have in the releases today. So it's actually a- You can tease them about V2. Oh, I absolutely want to. Yeah. Yeah, I actually just gave a talk at Strangeloop, where I talked about all this stuff. I gave the history of the architecture of Alda. So that talk is- Yeah, I just saw that. No one watches Strangeloop. They all listen to this.
00:24:44
Speaker
Yeah. So anyway, so we have this, the client is actually a Java program. That's a very thin program that just talks to a closure server that's running in the background. Right. That's basically like my, my hacky workaround for closure startup time. Okay. Um, but did you try growl VM or something to, to, uh, make it go faster?
00:25:06
Speaker
I haven't experimented with growl VM. Uh, this was the decision to split it out in a client server was years before growl VM. Oh, you could, maybe as you could use node JS or something like that as well, like plank or, um, or, uh, what's it, what's your own cold? Uh, Luma Luma. Yeah. Yeah.
00:25:26
Speaker
Yeah, so there are many different ways to skin the cat nowadays in 2019. Yeah, yeah, yeah, yeah. That's true. So yeah, so there is a client program and then there is a server program in Java. Yeah, I actually distribute them as a single executable though. There's this trick you can play where you have an Uber jar that has both Java and Clojure code in it. And then you can make that whole thing in executable, like a self-running jar. So the client will start the server in the background.
00:25:56
Speaker
OK, so the feed or the input is basically some text representation of the music. Right. It's like a markup language for music. OK. All right. OK. And then there is an interpreter, or how is it producing the sound from that one? Yeah, so the Closure program, the server, is taking the input, parsing it, turning it into an AST, and then it will sort of build up a score data structure in memory.
00:26:26
Speaker
It's like basically this big hash map that has all the data about the score. And then it performs it, interprets it by using the JVM. There's actually a MIDI synthesizer built into the JVM. So it uses that for playback. OK. Wow.
00:26:45
Speaker
I don't remember the details anymore, but I remember there was a story about it a while ago that certain parts of the JDK weren't ported to OpenJDK like these audio drivers. Is that the case or do you have to use the Oracle distribution or can you use like the OpenJDK or some other one? Nope. All the OpenJDK does work for the MIDI
00:27:12
Speaker
The package is java.x.sound.midi. Thankfully, that's not one of the ones that Oracle decided to pull out. It's a nice thing because it doesn't require you to install anything extra in order to hear the sounds. If you have Java installed, Aldo will work on your system. That's ideal. That's perfect. Yeah.
00:27:35
Speaker
So this is the V1 architecture that you're talking about. The one that we download when right now, that's what you get. Essentially a Java program and then some closure code base that is going to do the parsing and translation. Yeah, all of the work. It parses your input and figures out what you meant music-wise and then performs it.
00:27:58
Speaker
So how do you account for things like two instruments in the score playing at the same time? Is that part of the markup text? Like you have one instrument too or whatever? I mean, maybe you can explain it a bit. Yeah, that's actually. So an instrument part is sort of the top level element syntactically, like in the AST.
00:28:24
Speaker
So you have, you basically say, you know, you can say violin, colon, and then have all the markup that represents what that violin is going to play. Maybe as you could give us a quick demo of it, Dave, just like, you know, saying like piano or something. Yeah, actually, so I have a score pulled up here. This is an excerpt of a string quartet by Debussy. And so I'm just highlighting just just not the world, is it? Oh, you want me to start with Hello World.
00:28:53
Speaker
Yeah, I think that's, that's, that's easier for us. Yeah. All right. Yeah. We're slow learners, man. Come on. Yeah. Yeah. We'll get to WC later. Yeah.
00:29:02
Speaker
Okay. So this is a string quartet. So that's two violins, a viola and a cello. And so we've got the code that I'm highlighting. I hate to talk about code that I'm like, this is what I'm... So it's violin and then in quotes, violin one. So that's like the name of that violin. That's useful because you can have multiple violins. And then some markup that basically says in the fourth octave,
00:29:28
Speaker
play the notes A, C and B. And you can say how long the notes are as well. So this is what that sounds like. Oh, hang on.
00:29:46
Speaker
Oh, so you also specify the duration in the text to say the last note to play longer. Right. So the first couple of notes were half notes. So I said A2. That means a half note. And then C, because the duration is sticky, you don't necessarily want to have to put the duration on every single note. So it's just C. And then you have B, which is a whole note. So that's B1.
00:30:12
Speaker
OK, so it's more like a state. So it remembers the state then, right? Because if I change the state at some point and then going forward until I say something else, it keeps that state in terms of beats. Yeah, there's a trade-off there because as functional programmers, we don't like to rely too much on previous state. I've gotten that criticism before. But I think it sort of keeps things concise.
00:30:39
Speaker
because a lot of the time you don't, like you'll sort of, you know, now you're in 16th, you have like a run of 16th notes, which are, you know, faster notes. And so you'll just put the 16 on the first one, and then you have a bunch of notes that don't have durations on them. And it's implicit that they are 16th notes. I think there's a, personally, I think there's a big difference between how you program things and how you annotate them. I mean, you know, to me, having an annotation, which has, you know, memory of the previous state to save the author,
00:31:06
Speaker
I think that's really good. That's got nothing to do with functional programming. That's just an annotation thing. That's a convenience for the scribbler. That's how you program it. You can program it as stateless or stateful as you want. You can always, you can always expand that and so you don't rely on previous state. So I don't think there's a problem there. Yeah, that's a good point.
00:31:34
Speaker
So screw those guys. Yeah. Yeah. I will say that my sort of my target audience for Alda is people who don't necessarily know how to program. Yeah, exactly. Yeah, exactly. Makes sense. Yeah. Yeah. But how did, because you started this before you learned Closure, is that right? Yes. Building Alda. So how did, how did learning Closure influence Alda later? Ah, that's an interesting question.
00:32:04
Speaker
Yeah, so when I was first designing the language, there are a couple of existing music programming languages that I stole some ideas from. There's Lily Pond, which is a great language for music engraving, sort of generating sheet music. Is that what you call it, is it?
00:32:22
Speaker
engraving. Yeah. Yeah. It's an interesting term. I've never heard that phrase before. Yeah. It sounds like something you do in a graveyard, you know. Let's engrave the music. Yeah. That's basically putting them into a graveyard. I don't know. I always think of engraving as something you do on metal or stone or something, but I guess, you know, music's old, isn't it? Well, no, originally you used, they used the, uh, well, originally they used, you know, pen and paper, but with the industrial revolution, we have the, uh,
00:32:52
Speaker
you know, ah, I'm blanking on the name of that machine, you know, the important one that printed the printing press, the printing press. Yeah. So, um, yeah, there are, there are special sets of, um, you know, whatever those things are called the stamps or whatever that, yeah. Oh yeah. There are different shapes that are used for music, like quarter notes and eighth notes and things like that. Okay. Okay. And those were engravings. Yeah. Right. So that's where music engraving originally came from.
00:33:15
Speaker
Right, OK. Sorry, a bit of a... Makes sense. Yeah, it's a little tangent there. But Lilypond, it's a music engraving language because it's like they brought that whole process into the digital age. I mean, there were already programs for this, but they wanted a programming language that did specifically that. But anyway, there's some really interesting syntax there that if you look at Lilypond and look at Alda and compare them, you'll see how I stole a bunch of ideas from it. And there's another language called MML or music macro language.
00:33:43
Speaker
that was a big influence. That's the language that, I don't know if you remember from the flip phone era, like early 2000s, there was a time where a lot of people were programming their own ringtones for it. That language was a dialect of MML. And there's other dialects of MML that are running like old basic machines, like from the 80s.
00:34:08
Speaker
And yeah, so that was like an early computer music language. Yeah, well, low tech is the way to go. Yeah. But I like the syntax, so I took a bunch of ideas from those things. So Vijay, you're asking me about how Clojure influenced things. Yeah. So something interesting that happened after I started implementing it in Clojure was that at some point, I decided to expose evaluation semantics.
00:34:37
Speaker
So part of the syntax of the language is just closure s expressions. A simple example of that is just like open for n volume 50 close for n. So it's an embedded DSL as well now. Yes. OK. And you have because we're really just calling your invoking eval on whatever closure code you have in there.
00:35:00
Speaker
You can use the entire Closure Core standard library, which is full of really useful functions for dealing with sequences of things. And in scope is this whole library of music functions like chord and note and things like that. So when you combine them, it's this really powerful language for algorithmic music.
00:35:23
Speaker
But maybe kind of a small digression or something. I was thinking, so the kind of music that you can, quote unquote, program and the kind of music that you write without programming, do you think there is a difference?
00:35:38
Speaker
Uh, because it seems to me like if I'm coding, then, then all this coding mentality comes into the, comes into the music. Is that, I don't know how to put that one. Like, like, no, because if I'm, if I'm thinking about a song, I don't think about loops. I don't think about, you know, uh, whatever, you know, for loops or whatever on this kind of things. Right. Is there any creative difference between these two in your opinion? Yeah, absolutely. I think it's just, um,
00:36:06
Speaker
It's basically the system that you have at hand for notating your music.
00:36:11
Speaker
can influence the type of music that you create. And you can write music that's more similar to the type of music you would write if you're just sitting at a piano with sheet music paper and writing it by hand. And you can also, if you have a touring complete programming language at your disposal, like Closure, you can do kind of wackier things or generate lists of random integers and have that inform your pitch content and things like that.
00:36:39
Speaker
So do you kind of think about the REPL experience as well as part of that? Yeah, so ALDA has a REPL. We call it the read eval play loop. Oh, nice. Nice. Yeah, but yeah, that's useful for experimentation. You can just pop the ALDA REPL open and
00:37:03
Speaker
try out bits of syntax, and here's small snippets played back. But an interesting thing, so I created a Vim plugin for Alda. I think I just answered your question, Emacs, or some other shit, right? Exactly, yeah. Some other shit. Yes, I'm pretty sure Emacs can be plugged in as well. Yeah, there's an Alda mode for Emacs.
00:37:25
Speaker
Yeah, perfect. Then your sins are absolved. So please go on. Great. Right. So yeah, an interesting thing happened as I got more into closure and I learned how you can just instead of just having a REPL open in a different terminal, you can integrate it with your text editor.
00:37:44
Speaker
And that makes you more proficient, more efficient, and you can evaluate things more quickly. Yeah, so that's the way I've started doing things in Alda. I actually rarely open up the Alda REPL anymore, unless it's like I want to try something out really quick. Just like with Clojure, a lot of the time I just have the REPL plugged into my editor.
00:38:06
Speaker
Yeah. So if the music composition process, is it something like if you don't have something like Alda or a computer, then you write a small, what do you call it, like a staff, whatever, and then you play it on piano and then change one note and play it again. So is that like a repetitive process like that in general?
00:38:30
Speaker
Yeah, totally. It's like an iterative process. You come up with an idea, play it back, and then say, oh, what if this one note had to add a sharp to it, make it a little bit higher? See what that sounds like. And you play it back. And when you come up with an idea you like.
00:38:44
Speaker
Now you've got it in your buffer, and you can repeat it or experiment with it. So we think the loop becomes really tight. I mean, it becomes really quick because you can just change it and then play it immediately. Yeah. It's really nice. The tight feedback loop. I must say, I downloaded the app. I downloaded the software, and then it was super easy. I was surprised. I was able to type some things, and I was looking at some sheet music and the beginner stuff that I know a bit.
00:39:12
Speaker
It was really, really smooth experience. That's awesome. It's an awesome job. Thank you. Because, you know, making computers make music, it's been I think there are plenty of software like this, right? I mean, plenty of experimentation, like how to how to make it more effective. Yeah. So I think they all they all cover different niches. A lot of people ask me, well, how is it? Is it like overtone or is it like Sonic Pie? And those are two great projects by Sam Aaron, one of them is a closure library overtone.
00:39:43
Speaker
Those are great, but they sort of serve different purposes. Like you couldn't get a music composition student to pick up overtone. And if they don't know anything about programming and have them start to be productive with it. Yeah. I think that's why they went with Sonic Pi, wasn't it, to try and make it more amenable to kids? Yeah. So what's your target audience, Dave, actually? What's your kind of demographic, let's say?
00:40:12
Speaker
I would say it's anybody who is close to the intersection of music making and programming. So either there's sort of like two groups of people. There's like musicians who don't know much about programming and they want to kind of experiment with making something by writing code. And then there's programmers who don't necessarily know anything about music and they want to learn about music theory or making music. You know, I don't play an instrument. How can I make music?
00:40:36
Speaker
So they know how to write code. So this enables them to do that. And you can explore different music concepts by learning how to notate it with Alda. So what is an instrument, by the way, on Alda? If I say piano, and then if I change it to the fancy instrument that you were talking about before? Bassoon? Oh, I can do that. Yeah. OK, so here. How does it sound?
00:41:01
Speaker
Yeah, so here's a piano doing a C major scale. This, by the way, is the hello world of Alda. And then I can just change the word. So it says piano colon and then some other stuff. So I'm going to change piano to bassoon. And instead of octave four, I'm going to put an octave two, which is sort of more idiomatic for the bassoon. Oh, OK, sweet.
00:41:28
Speaker
So what changed there, like in terms of a program, the instrument is already predefined or can we create our own instruments and can you explain how those things work? So right now we have the 128 general MIDI spec instruments. There's a spec for MIDI and they've defined 128 instruments. And so all of those are available in the JVM built-in MIDI synthesizer. So we call that, the MIDI term for that is program change.
00:41:58
Speaker
So piano is one program, it's program zero. And then bassoon is, I forget what the number is, but it's probably, you know, program 37 or something like that. So the actual, so what you're naming this instrument, that's basically an index into some synth in Java, essentially. Yeah. There's like a lookup table of strings to what patches this.
00:42:20
Speaker
So can you create your own instruments out of those things or just a combination of these ones is how you compose the music? Yeah, right now it's just those 128 instruments. That should be enough, I think.
00:42:34
Speaker
Yeah, it's fun to play with them. I mean, there's a certain breed of musician who really wants to mess around with creating new sounds and messing with synthesizers and things like that. I'm interested in doing that myself. So at some point, I would like to see if I could add different types of instruments that are synthesizers. OK. So is the MIDI of Java, is that extensible?
00:43:01
Speaker
No, not really. Not in the way that I think you're saying, can you add instruments to it? And not really. Well, so an interesting thing about MIDI is that MIDI itself does not have a sound. It's really a message format. So you can emit MIDI messages. And then those go into some sort of synthesizer. So the JVM MIDI synthesizer is just one instance of a synthesizer.
00:43:26
Speaker
But it would be pretty easy to just emit these messages out on some port and then plug them into a software synth or maybe even a hardware synth. And then you can say that, OK, now patch 37 is this weird synth sound that I programmed.
00:43:45
Speaker
Okay. So can you, um, did you test the limits of this one? Like, can you create like an orchestra of whatever number of instruments and then play them? And then what happens then? If I have like 120 violins or whatever, I actually don't know if that would work or not. I've always been composing for, you know, I've composed for up to like eight instruments before. So you don't know if, if we play like, uh, like Mahler's fifth, you don't know about how that would work.
00:44:14
Speaker
I have a feeling you might run into some issues with parsing huge input things. I hand rolled the parser myself to squeeze the most performance out of it. And you might run into some weird edge cases or something. I'd be curious how that works out. And in terms of architecture, I think one of our listeners should try it. Yeah. It would take quite a while to transcribe a whole orchestra piece like that.
00:44:45
Speaker
Hey, that's why you have closure for us. Yeah, come on. You can generate an orchestral piece. Exactly. Yeah. And then see what happens. And so every instrument is playing separate thread, or how is it working? Because if all of them are playing together, how do they synchronize?
00:45:05
Speaker
So there's this other concept in MIDI. This is another class that's available to you in the JavaX sound MIDI package, which is called a sequencer. And so that gives you the ability to send MIDI messages in time. And it's really great because it actually might depend on the Java implementation, but it's using threads on your audio card. So it's not affected by GC and things like that. So you actually get pretty solid timing.
00:45:35
Speaker
So really, what we're doing is we're loading up the sequencer with note data. It's sort of like you're popping a cassette tape into the player. And then once it's all loaded, we press play, and it all plays in time. OK. So it's converting all these things into a series of things that can be sent, and then there is no delay between multiple things. OK. That's really nice. So basically, it's a kind of translation layer between your notation and MIDI.
00:46:03
Speaker
Yes, exactly. So how is the performance, by the way, with Clojure? So the parsing part is happening in Clojure and then you generate many messages. So how is the performance and what is driving you to write V2 of this one?
00:46:23
Speaker
So yeah, performance is pretty good overall. I have a pretty good time with it. There are some architectural issues that have come about. That's really what I wanted to work around for V2. So yeah, I would also refer listeners to my talk. I just gave it strange loop for the gory details of this. But basically, we've ended up at this place with all the V1 where we have three different types of process. There's the client.
00:46:47
Speaker
There's a server which is really just a go between between the client and this other thing which is a worker process. And so the server is like supervising these other background processes that are sitting around waiting for for input and playing the score. It's not great because we have to.
00:47:03
Speaker
I don't know, for a variety of reasons. One of them is that some users have reported issues where the worker processes just do not start. So they see the server come up, and then it's like, all right, starting workers. And it just hangs there. I think on Windows and maybe other operating systems, there's issues where a background process can't start its own background processes. So it's just gotten kind of complicated, and I wanted to simplify things. So I'm currently working on a new version of Alda, where everything is done as much as possible.
00:47:33
Speaker
is done on the client side. So all the translation into MIDI is on the client side, basically? Yes. Yeah. So we do still have a background process because I wanted things to, I think it should be an asynchronous type thing where you just fire off like, you know, this is my score, play this. And then that happens by some other process in the background and you can come back along and stop it after, before it's done, if you'd like to.
00:48:01
Speaker
Because I think the browsers have MIDI these days, don't they? They do. There's a library called MIDIJS, which is really good. I've had some pipe dreams about porting the player part to Web Audio API and doing stuff with MIDIJS. Yeah, well, I mean, you know, version 3 or, you know. Yeah, maybe that would be version 3.
00:48:26
Speaker
Yeah. So are you going to say, Dave, you're going to say about what about the browser has got some other things? Yeah. It also has a synthesizer built in. I didn't know that. I didn't know that. Oh, okay. Well, it has the low level parts so you can, you can build your own synthesizer. So they have oscillators.
00:48:42
Speaker
and different types of filters and things. So people have built modular or analog synth or quote unquote analog synth type things in the browser. Yeah. When I've seen some like when Web Audio first came out, I saw some like stuff that was linked to like music that was linked to video images so they could in real time create like music in the browser and that was reacting to the kind of images that were being put out there.
00:49:09
Speaker
which was very smooth, you know, I mean, this was I mean, anyway, yeah, I mean, obviously you're putting a lot of pressure on the graphics card. And I guess you have to have a good graphics card and a good sound card. And sometimes the WebGL isn't as perfect as you'd like it to be. But that's a different story. So WebGL talks directly to the to the GPU. So in theory, does Web Audio speak directly to sound cards or is that? Yeah, is that it does. OK.
00:49:37
Speaker
It does. Yeah, I've looked into the timing things. I actually have a closure script library that deals with timing involving the Web Audio API. It's called Cronoid because it's time-related and it's for rock-solid scheduling. So let's see, wait. Yeah, kind of a dumb name, but anyway. Yeah, so there's this article by, I'm blanking on his name, but a guy who actually worked on the Web Audio API,
00:50:06
Speaker
Um, the article is called a tale of two clocks and it's all about how to schedule events in the browser. Right. And basically the answer is you have to kind of think you have to coordinate between this. There's like, you can get, um, access to the audio card and there's like a clock running there and you have to coordinate that with like your browsers, uh, event loop. Yeah.
00:50:27
Speaker
So Karanoi does that for you behind the stage. It implements the algorithm that's described in that article. So you can say, in 3,000 milliseconds, play this. Or at this timestamp, play this. And it'll do it with good accuracy of time. So what is the technology change from V1 to V2?
00:50:49
Speaker
Yeah, so this is the part where I get kicked off the show because I'm implementing it. So the new architecture is there's a client and there's what I call a player, which is kind of like the worker now, but all it does is literally just play like all the work is done client side. The player's job is just to perform it. And so the player is written in Kotlin and the client is written in Go.
00:51:11
Speaker
Wow. Okay. That's the end of episode number 50. Bye guys. But why Kotlin and why Go? What changed there? I'll start with Kotlin because that one's easy. It's really like that was sort of an arbitrary decision.
00:51:29
Speaker
I actually could have done that one in Closure because this is a background process. It doesn't necessarily matter how long it takes to start. So I could have gone with Closure. But as a bonus, I wanted to have a quick startup time. I might actually experiment with rewriting it with Grawl VM compiled Closure. But I need a JVM there so I could use the MIDI sequencer synthesizer. And then on the client side, I really just wanted as much performance as I could get without dipping into
00:51:59
Speaker
something I can't tolerate like writing C or C++. And another important, so I tried a variety of things. I tried Rust and Crystal as well. I like those languages. But what the tipping point for me that made me decide on Go was that it was the platform that allowed me to most easily create
00:52:19
Speaker
cross-platform native executables with absolutely no dynamic linking. That was the key part. Right. And it's just like one, you just drop in one image and bam, you're off. Yeah. Yeah. I did some experiments and it was like very easy to use Go to just spit out Windows, macOS, and Linux executables that have no native dependencies.
00:52:43
Speaker
Isn't that the same with Rust as well? Because I didn't do any cross compilation on Rust yet, but I thought it was similar. You can do cross platform compilation fairly easily with Rust, but I think some of the Rust standard library might still depend on libc.
00:52:59
Speaker
Oh, OK. So there's an element of the system I'm trying to run this on might not necessarily have the bits that it needs without installing some other library. Yeah. So it just goes back to wanting to provide a good experience for people who aren't familiar with programming and tinkering with compiling their own executables and stuff like that, making sure you have the right libraries installed.
00:53:19
Speaker
Yeah, yeah, I think it makes sense because especially you need the performance and you need the startup time not to be that much. So in those cases, it's the right tool for the right job, especially music related things. I mean, people don't want to wait for, I don't know, 10 seconds to start the program.
00:53:34
Speaker
Yeah, exactly. So that makes sense. It's been interesting because Go is not my favorite language by any stretch, but just through using it a bunch, I've kind of, I don't know if it's Stockholm syndrome, but I've kind of gotten used to it and it doesn't feel as bad to me now.
00:53:51
Speaker
Yeah, I think familiarity. Right. Did you use the, um, cause I, I used to go for a while as well. And I was, I was, to be honest, I was, I was pretty glad to be rid of it. Um, and, uh, but I didn't, maybe he didn't use it as heavily as you did, but are you using any of the kind of async features of it? I mean, the sort of, or was it just, is it just a means to an end to get a cross platform executables? So far, so I'm not finished implementing this yet, but I've gotten pretty far with the go part.
00:54:20
Speaker
I'm pretty much done with the Kotlin part. That part took me a week or two. I could easily rewrite that in some other, because what it's doing is pretty minimal. The client-to-client side, I haven't found myself needing to use Go routines yet. The performance is so good. It parses things in microseconds. And the performance is so good, I just haven't needed to introduce concurrency yet.
00:54:42
Speaker
Yeah, but the code language is still ALDA plus closure then? Oh, that's a great question. So it's really important to me. I haven't demonstrated this yet. Maybe I will. But I like to write closure code that writes musical compositions. Maybe I'll play you an example if you're interested. Yes, of course. All right.
00:55:04
Speaker
So I like to sort of just tinker in my Closure REPL, just writing with the ALDA library kind of loaded. So there's this, OK, I got to introduce ALDA CLJ. It is the successor to this inline Closure scripting layer in ALDA V1. Because in ALDA V2, we can't have that, because now the runtime is a native executable. We don't have an enclosure process. Yeah.
00:55:29
Speaker
But I figured out that I can actually get the same effect. I can do exactly the same sort of thing by just driving the Alda program from Closure. So I wrote a Closure library that has the same DSL for music. And that's Alda CLJ. So I've used that to compose a bunch of different types of music. I probably should have had this pulled up already. We're always winging it, Dave. Don't worry. Indeed.
00:56:01
Speaker
OK, yeah, so. All right, I've got I've got it pulled up here, so. In this score, I've defined a function called random note. And it will return every time you call it, it returns a random note like a note with a random pitch and it lasts a random length of time in milliseconds. Or it might randomly choose to rest or not play anything for a certain amount of time. You know, and then I've so I've got three instruments in electric piano, a timpani,
00:56:29
Speaker
and a Celeste, which is a keyboard instrument. Sounds kind of like bells. And the random thing is closure. Yeah, yeah. So random node is a closure function that I've defined. OK, it's just data in, data out. That's it. It doesn't do anything with Alda. Yeah, exactly. Well, it's using the Alda CLJ library to return basically records. OK, yeah.
00:56:53
Speaker
Yep. And then so there's a so in all the CLJ, there's a function called play play play bang. And you give it any number of these records and it will sort of translate it into valid all the syntax and just ship it over to your all the command line. OK, nice.
00:57:11
Speaker
I'm really just shelling out like what it was doing is very simple. It's just sort of sending the. Sending the all the syntax like a string of all the code to all the and all the. Yes, exactly. So now you can now you have a closure repl and you can bring in your own dependencies like you could pull in an HTTP library and grab like like I did my strange loop talk. You can pull in weather forecast data.
00:57:33
Speaker
and use that to generate music. All right, okay. Anyway, here's that. I don't know whether it's cloudy or bright. Yeah, so anyway, this is- Let's listen to this. Yeah, so let's listen to this. This sounds different every time you evaluate the score. You never know what it's going to sound like.
00:58:04
Speaker
sort of reminiscent of like the art music of the early 20th century, John Cage and stuff like that. So the instrument parts just look like repeatedly 20 random note, like a closure.
00:58:24
Speaker
So you can still use Closure to generate this Alda linguistic description of the music. And then that is being sent to this Go program eventually. And then that goes into the Kotlin thing. Right. Yeah, the interface is actually the same as Alda v1. So you can go ahead and use Alda CLJ today with the release version of Alda. But it'll get faster once Alda v2 is released.
00:58:51
Speaker
Nice. So Closure is still there. So it's good that you're still on the show. Yeah. I think I redeemed myself, hopefully. So the Closure part is basically the Algore part of the Algore Raves or the Algore composition. Right. And then the other bits and pieces are the playing and the sending. Yes. So the key realization I had was that all of the language is really just the markup layer. And that's the way it ought to be.
00:59:22
Speaker
You can drive it from other things and generate that. Implement the algorithmic part in terms of just the markup part.
00:59:29
Speaker
Okay. So in a way it's like a closure, right? Because closure compiles to JVM stuff and then JVM is running the stuff somewhere. So it's technically similar to that kind of division, so to speak. Right. So you're writing closure code, but then there is this ALDA VM, quote unquote ALDA VM that is written in Go or whatever. And then you're just sending the bytes to that one and that's playing it. Exactly.
00:59:58
Speaker
Nice, so. What other things that do you do with closure apart from music? Any other projects that you work with or? Well, I have some closure open source libraries. I've done a bunch of tinkering with zero MQ. Yeah, so I wrote a wrapper library for geo MQ, which is the pure Java implementation of zero MQ.
01:00:26
Speaker
And I call that easy ZMQ. The letters easy ZMQ. It's sort of like a more idiomatic, you know, closure wrapper library for the, the Java one is sort of tied to a lot of idioms of Java. So this gets around on some of that. Yeah. Nice. But did you use zero MQ in your projects already? Yeah, actually all the V1 uses zero MQ to communicate between the client and the server and the workers.
01:00:54
Speaker
OK, makes sense. So that's how you ended up using ZeroMQ. OK. Yeah, so I talked about this a bit in the Strange Loop talk as well. But one of the early iterations of Aldo, where I wanted to split it out between client and server, I did the most naive thing possible, which is just HTTP. So the server is running an HTTP server, and the client is just sending HTTP requests to the server. And somebody pointed out to me that this is not the most
01:01:23
Speaker
not the most efficient way to do it. If I just want to get essentially a byte array from one place to another, there are cheaper ways to do that. So that's what led me to ZeroMQ as an option for doing that. Yeah. OK. So you didn't think about WebSockets or something like that? Well, this is like from one server side program to another, like just running on your machine. OK.
01:01:51
Speaker
But even then, I think if you want WebSockets, then you still want HTTP handover, right? Handshake is still HTTP. So you'll bring in all this nuisance around it, probably. Yeah. Well, the idea with WebSockets is just that you use HTTP as a sort of introduction layer. But then it's a TCP IP socket after that. Yeah. Then we just do the WebSocket. Yeah. Yeah, so ZeroMQ is basically just like you have sockets open on either side.
01:02:21
Speaker
It's almost like dealing with raw sockets, except that it's painful to work with raw sockets. There's a lot of kind of housekeeping you have to do to make sure the message gets returned to whoever sent it and things like that. So ZeroMQ is just a layer on top of that. So you have the routers and everything in ZeroMQ that can send the appropriate messages to correct locations or something.
01:02:43
Speaker
Right, I really like ZeroMQ because it gives you some, they have socket types. So there's the most basic program you can write and using ZeroMQ has like a pair of sockets that are requested in response. And so you just create an instance of each and different programs maybe, or maybe in different threads in the same program. And you just send messages between those two things. And they also have more complicated things. They have Pub-Sub and they have what we do in all the route messages between the client and the workers.
01:03:13
Speaker
like there's like a broker in the middle that has what we call router and dealer sockets. So there's all sorts of like, sort of, it's like they give you the Lego blocks and you can build whatever you'd like with those. Yeah, so all is open source, right? So what type of contributions are people can make to the library or the program?
01:03:37
Speaker
We could really use a lot of help right now with our website and documentation. Those are areas that just dive in. Maybe you can probably hear that a lot with a lot of projects. But yeah, I could definitely use some help with making the documentation friendly or making the website have all the information that we really want in it.
01:03:53
Speaker
Yeah, nice. I think some people will probably try it out at least. I think it's, as I said, the user experience is at least on Mac because I didn't try Windows and other stuff. I'm assuming it's the similar kind of experience there. It was really nice. I just downloaded and then I just typed all the repel and then I could just start typing notes and then listen to some horrible stuff that I typed in.
01:04:14
Speaker
So that was beautiful. I was thinking maybe we should, because all the notes are like, if we have sort of a normalization of the source code, then we should convert source code into music. So you just put enclosure code, and then it normalizes into the seven notes all the stuff that we write in. Then we should be able to provide something like, the shape of the code is this because of the music. Whoa, that's interesting.
01:04:42
Speaker
You could analyze the Git repo. Exactly. And you could decide whether a pull request makes you happy or not. And then it gives the whole new meaning of this code is too noisy, literally. I just played it in Alda. Right. What a noisy code. Yeah.
01:05:05
Speaker
So, um, can you play us something, something more? Um, of course, you know, we did, we, we, we heard the hello world thing. Uh, you're saying Debussy or whatever that thing is. I'm sorry. I'm like completely like, uh, uh, level zero level minus two. Yeah. Let's do that. I've also got the, uh, the weather forecast piece to be listened to. If you're interested, let's do it. Yeah. You want the weather forecast?
01:05:31
Speaker
This is a weather forecast, yeah. Are you choosing a particular location?
01:05:37
Speaker
Yeah, so what I did was the purpose of this score was to demonstrate that now that you have control of the closure part, you are using ALDA within your closure REPL. So you can pull in whatever libraries you'd like. So I used an HTTP client and a JSON library. And now I can consume the National Weather Service API and get weather forecast data. For this example, it's four cities. There's New York, LA, St. Louis, and Durham.
01:06:04
Speaker
Well, why don't we change it a little bit? Is that possible so we can have like Brussels or for me, Leaven. So the heart of Closure Place, Leaven. And then you're in Denhag? Yeah, the Hague or Amsterdam. I think if you play Amsterdam music, Netherlands weather is like going to be just rain. So it's going to be like a flat G or something. It'll be interesting to see like the global Al Gore. That's true. Is it easy to change or not?
01:06:32
Speaker
No, it's not possible because this is like the United States National Weather Service. Oh, right. Okay. You're not using Yahoo weather or something. Yeah. Okay. No, but yeah. So yeah. So you've got the New York is percussion. LA is an upright base. St. Louis is a saxophone and Durham is a vibraphone. So you end up with this like weird jazz based on weather data. Okay. Right. Without further ado. Yeah, let's hit it. Yeah.
01:07:12
Speaker
As the notes get lower, that's the weather getting colder. And, uh, the wind speed controls how fast the notes happen. And, uh, I don't know if we're getting stereo or probably not, but panning is controlled by the wind direction. I was picking up again. How long was the forecast for, you know?
01:07:39
Speaker
You get 150 hour chunks. Oh, right. I'll turn that off. We don't need to listen to the whole thing. Well, it certainly makes weather forecasting. Listening to weather forecast a bit more interesting than we have at the moment. Right. Like a hurricane came through North Carolina as I was working on this. So I was like, oh, let's see what the weather is like in North Carolina right now. And as you might expect is the notes were very fast and moving up and down. The wind was all over the place.
01:08:07
Speaker
And if you get a sharpie, can you change the weather? That's the next feature. All the V2, all the V3. Draw your own hurricane. Sorry, that was off topic. Political joke.
01:08:28
Speaker
So can you play the other one, the composition or? Yes. So how complicated is this code, by the way? It should be pretty easy for a guy like me to write this code, right? To copy from the sheet music.
01:08:40
Speaker
Yeah, it's about, so this is four different, it's a string quartet by WC, so there's four instruments. The whole file, this is just an excerpt of it, but there's 53 lines. Each instrument part is like, you know, maybe 10 lines or so. So it's very concise syntax. This is in your GitHub repo, right? You know, as an example somewhere or? Yeah, actually this example, if you go to, it's GitHub, AldoLang,
01:09:07
Speaker
Um, all decor is the name of the repo. There's a folder of examples and this is one of them. Perfect. Okay. Let's hear it. All right.
01:09:45
Speaker
Very good. Beautiful. Very good. Yeah. This is a perfect medium, isn't it? Podcasting is a perfect medium for this kind of stuff, you know? But this is a first for Deafen, where we have everything done interactively and put music on live. So yeah, congratulations to us. This is amazing. Thank you. Thank you. Yeah.
01:10:09
Speaker
Thanks, Dave. So good luck with all the project. And hopefully you'll make more progress and then bring more closure into the rest of the components soon. So I think we are, wow, we are one hour, 10 minutes already. That's nice.
01:10:29
Speaker
So thanks again Dave for showing up on the podcast on Sunday and then playing all this music for us and hopefully more and more people will try out Alda and then I think you'll basically make most of the orchestra people's lives
01:10:46
Speaker
very difficult because you cannot keep it. So if you want to make music, you don't need orchestra anymore, you can just have a computer and then you can just make it. Yeah, let's take their jobs. Yeah, exactly. For me, I think it's like I like the fact that there are quite a lot of creative activities like this enclosure.
01:11:07
Speaker
When we were at the heart of Closure, we saw one of the talks was by a lady who was doing random, well not exactly random actually, but a sort of artistic generation of images, and you were doing the older stuff with the music.
01:11:23
Speaker
It seems like the algorithmic or computer intersection of arts is becoming more viable and obviously having more tools like the sort of stuff you're doing there is really useful for artists and for people who want to be artists or want to just experiment with things. I think it's really great and thank you very much and I think it's an inspiring activity that you're doing there.
01:11:50
Speaker
And I've got to say, I mean, it was such a pleasure meeting you in the heart of closure. I mean, you're such a positive, delightful person. And that shows through on this podcast as well, I'm sure. So I really appreciate all the efforts you've gone to and, you know, just being an awesome dude. So cheers, Matt. Thanks a lot. It's been great being on your podcast.
01:12:14
Speaker
Of course. Of course. Yeah, because we are exactly. Why wouldn't it be? Totally. I mean, he's great. I'm great. You're great. Oh, yeah. No.
01:12:29
Speaker
So what I meant to say was that whatever Ray said was completely true and it was a pleasure meeting you at Heart of Closure. I like that you're working on a project for so long and I can see how passionate you are about this stuff.
01:12:45
Speaker
And that's why when I saw, you know, you started ALDA like 2012, I was like, wow, there are not many people, I mean, side projects are like every weekend, right? People start a side project and then it just disappears pretty quickly. But you know, you're changing the architectural designs, you're making it even better. And the user experience is amazing. And I hope it's gonna be very useful for people who are composing music, and then people who are using Closure as well.
01:13:15
Speaker
So thanks a lot. Thank you for joining us on the podcast and playing the music. I'll certainly give it a try again more and more than try to see to understand the music better, I think. So thanks a lot for having me. It's an absolute pleasure, Dave. Really is a pleasure. Yeah.
01:13:35
Speaker
And you know, I think I think you're I think Dave is a bit of an exception, isn't he? He's not a Patreon. You know, normally we have guests. No, he's not. Yeah. Yeah. We only have guests who are Patreons, you know. Oh, I got to get on that. So these days we only pick, you know, guests who are paying us, you know, you need to pay to be on the podcast or something. But
01:13:59
Speaker
I think that's basically we'll reduce our Patreon to two people again. But one quick update is that we used to do the live shows, but these days I think because of the technical, what do you call it, like a deprecation of the Google Hangouts thing, we are trying to figure out what is the best way.
01:14:21
Speaker
So, but, you know, we'll see what we can do for our patrons. And we are going to have another episode recorded pretty soon, so keep listening. That's it from us for this episode number 53? I think it's 54. I think it's 54. Okay, 54. We'll work it out.
01:14:45
Speaker
Who gives a shit to be honest, you know? Exactly. Totally. It's episode Dave, you know, it's episode Alder and Dave and you know, let's be more human with our episodic indexing. Exactly. Yeah. That's it. Thank you. And see you next time. See ya.
01:15:39
Speaker
Little did they know that it was in fact 53.