[Logo] Complexity Explorer, Santa Fe Institute In this last segment I am going to talk about something completely different, the use of chaos in music and dance. This dates back to work by Diana Dabby who was a PHD student of Steven Strogatz at MIT, and also a Carnegie Hall-level concert pianist. The reason I found out about this was because I got Diana's paper to review. Some of you may not know about this, the way you get a paper published in the scientific literature is, you send it in, the editor asks other people who can evaluate your work for a review, and if the reviews are positive the paper gets in. I have reviewed lots and lots of papers over my career but this was the first and only one that came with a cassette tape. Remember those? Maybe not... Diana's idea was to take a piece of music and consider it as a pitch sequence, just a sequence of labeled notes. The piece above is C, E, G, C, E, G and so on and so forth And then she took a chaotic attractor, didn't matter which one, and she generated a trajectory on that chaotic attractor with the points spaced the same distance that the notes were spaced in the original piece. Now neglect the fact that different notes can be different lengths, we can talk about that on the forum if you would like. Then what she did, was take the first point on the trajectory and she labeled it with the first note in the piece, and then she took the second point in the trajectory, and labeled it with the second note in the piece, and so on and so forth, until she had the pitch sequence wrapped all the way around the chaotic attractor. That established a mapping between the flow of the dynamics and the flow of the musical piece, and she used that mapping to generate variations on that musical piece. Now, if you generate a trajectory from exactly the same initial condition, and you had some sort of device that could recognise which little green square it was and play the appropriate note, you would get back exactly the original piece, but if you chose some other point on the chaotic attractor, generated a trajectory, and used the mapping to play the notes that that trajectory followed, you would get a variation. So let me play you some of these examples. Here's the original piece... (music plays) As many of you know, that is the Prelude in C Major from the first book of Bach's Well Tempered Clavier Now if Diana wrapped that piece, the pitch sequences in that piece, around a chaotic attractor, the Lorenz attractor, and used that mapping to generate a chaotic variation, this is what you would hear... (music plays) And just like a variation is supposed to do, it sounds like the original in some sense, and yet is different. I just love this work, and I talk about it every year in my University of Colorado version of this class. After one of those classes, one of the students, Josh Stewart, came up after class and said "I wonder if we could do this for dance?" That is, instead of music in, music out how about dance in, dance out? So here's the idea, very much like Diana Dabby's, Imagine that you have 300 dance moves, maybe they are key frames in an animation, or something like that, or you have taken a picture of a dancer every tenth of a second, then you take a trajectory on a chaotic attractor, and you evenly space in time, not in space, but in time, you evenly space 300 points around that attractor, then you generate a tiling of that attractor, Josh used a Voronoi diagram, such that each point is in the centre of one of these cells. Now you can imagine that the original trajectory as it goes around, lighting up those cells in sequence, that's called the cell itinerary of these dynamics, so this might be the first cell, and the second cell, and the third cell, and the fourth cell, and so on and so forth. Then what you do, is that you look at the dance, and you take the first dance move and you put it in the first cell, and then you take the second dance move, and you put it in the second cell and so on and so forth, and you end up with a mapping that looks like this, and then you use this much in the same way as Diana Dabby used her scheme. If you started at the exact same initial condition and generated a trajectory and played the dance moves for every cell it hit, you would get back the original dance piece, but if you started from some-place else on the same attractor, you would get a chaotic variation of that dance. Here is a demonstration of that scheme in action... This is the dance we used as a demonstration case, not as nice a Bach. Here is a chaotic variation of that dance, generated using the Lorenz equations. You can see it looks like the original in some sense, but it departs from that original... There is nothing special about the Lorenz equations, you can do this with the Rossler equations too, and you get similar effects. By the way, the first time I talked about this work at a conference and I showed this demo, a guy piped up from the second row and said "it looks like Al Gore doing the 'Macarena'". OK, what's going on here? The original trajectory lit up those cells in a certain order. The variation trajectory lights them up in a different order. So what this ends up doing, is taking chunks out of different parts of the dance and splicing them together in a different order. Here's a demonstration that will make that visible. This is a medley. There is a Macarena... ballet jump... and a kenpo karate kata... And when I show you a chaotic variation of that medley, you will be able to see different chunks of the different parts of the dance pasted together in a different order. There's some Makarena... goes in and out of karate, more Makarena... there's karate Some place in here there's a full copy of the ballet jump... there it is. Anyway, you get the idea. If we simply take the same dance moves and shuffle them randomly, this is what it looks like... any continuity you see here is because the animation software is connecting the dots, it is interpolating between the different key frames, but you can see it looks kind of like it's having an epileptic seizure. There's not the same kind of structure in this movement. I've had lots of students playing with this over the years. It doesn't just apply to sequences of movement snapshots, or sequences of musical notes, it also works with words. Here is a chaotic variation on a piece of Alice in Wonderland. Now as I said, it's taking chunks out of different regions of the dance and sticking them together in a different order. This is something that happens in lots of different kinds of music. It's also been done in dance by a modern choreographer named Merce Cunningham, who would chunk up a dance into phrases and throw the I Ching to determine the order in which the dancers would execute those phrases. And the dancers, and the critics and the audiences, all hated it because there are potentially abrupt transitions at the chunk boundaries. Those abrupt transitions arise because the two moves on either side of those chunk boundaries, may be very very far apart in - kind of - body space. You can really see that in this animation... This is again the original, before the chaotic variation, of a short ballet adagio composed by a colleague of mine... Now, what does it look like if we generate a chaotic variation on that? You can see the smooth movement on the - ouch... ouch... ouch - so you can really see the transitions here. This set us off on a primrose path, because I wanted to interpolate, that is to smooth those gaps. Not just in a way that was faithful to the tendons and muscles in the body, but also that was faithful to the style of the movement genre. So what we did, was we took a corpus, a whole bunch of examples of a certain kind of dance, and we looked a the individual joints in the body so like the wrist, and the elbow, and the knee, and we built a directed graph to capture how each of those joints moved. Once you do that, you look at the graph for say the right shoulder and you look for the shoulder position in the initial state and then you look at that same graph and you look for the shoulder position in the final state. So getting the shoulder from here to here can be accomplished simply by looking for something like the shortest path through that graph. Now it gets a little bit more complicated than that because you actually have 44 joints in your body and you have to do that in parallel and they all have to be the same path length because otherwise all the different joints in the body will depart from the initial condition at the right time, but they will all arrive at the final condition at different times, and that doesn't look good. The other thing that made this hard is the graphs really are a lot more complicated than that one I just showed you. So here is an interpolation task that we gave this programme. Get me from here to here in a manner that is consistent with the observed movement patterns in a corpus of ballet. Here is what the programme produced... So computer-generated dance, using machine learning techniques on a ballet corpus. This work didn't just suck me down the primrose path of machine learning, it also got me working with dancers. And that has culminated in a piece that has been performed in a number of cities.