The code for this episode is available here.

I had it in my head that the third episode would talk about variables in the section about Computer Science. Originally I thought the musical would be about chords, but it didn’t quite fit well with variables. Then I thought about key signatures, thinking that these are kind of like variables in the sense that you can shift any song into different pitches just by changing key signatures; but again, I wasn’t very content with the connection. While walking Lucy (my dog) one day it hit me that leitmotifs are actually quite similar to variables in the sense that you can reference them at any point, and they hold a particular “value” when called.

Once this was decided, it was clear to me that I wanted the performance bit to include a number of leitmotifs that I’d compose. Since leitmotifs are often used in movies and animations, I decided I would tell some type of story with the visuals. This is in contrast to the types of visuals I’d done previously, which were mostly reactive: it’s a set of static rules that simply respond to what I’m playing. I’m a big fan of Disney’s Fantasia (original and 2000), and I wanted to do something like what was done for the first pieces (Bach’s Tocatta and Fugue in the original, and Beethoven’s 5th symphony, first movement, for the 2000); specifically, I wanted to be able to tell a story using simple shapes (also, I figured this would just make my animation job easier).

I asked for pointers to “emotional” animations using simple geometric shapes and got some really interesting suggestions, especially a bunch of experimental films in the NFB suggested by my colleague Fernando Diaz. The one that I was most drawn to was Spheres, and I used that as inspiration for my animation.

I wanted to experiment with smoother movements, so I chose to explore shaders. I posted some initial experiments on Twitter which some people seemed to like, and the “story” came from these initial experiments.

The initial leitmotif I wrote when humming while walking Lucy (I do a lot of thinking when walking Lucy) and the others came from playing around with the animations and my piano.


Once again, many thanks to my buddy Ralph Crewe for agreeing to play Isengard’s theme on trombone. You should subscribe to his YouTube channel!

Subscribe to the YouTube channel!.

Image attributions

For this episode I used a lot of images from Wikimedia Commons. Here are the credit attributions:

Darth Vader: Public Domain,

Phantom of the Opera: By Source -, CC BY 3.0,

Ride of the Valkyries: By William T. Maud (British, 1865 – 1903) -, Public Domain,

White shark: By Bernard DUPONT from FRANCE - Great White Shark (Carcharodon carcharias) attacking a seal shaped decoy …, CC BY-SA 2.0,

Light bulb: By Producer at Arabic Wikipedia - Transferred from ar.wikipedia to Commons., Public Domain,

Movie theatre: By Flickr user: Rudy Riet Washington, D.C. - Flickr:, CC BY-SA 2.0,

Broadway: By Photo: Andreas Praefcke - Self-photographed, CC BY 3.0,

Opera: By Sefer azeri - Own work, CC BY-SA 4.0,

Isengard: By J.R.R. Tolkien, Christopher Tolkien -, CC BY-SA 4.0,

Berlioz: By Pierre Petit - This file comes from Gallica Digital Library and is available under the digital ID btv1b84543244, Public Domain,

Harriet Smithson: By Unknown author -;, Public Domain,

Symphonie fantastique score: By manuscrit d'Hector Berlioz -, Public Domain,

Wagner: Public Domain,

Nibelung score: By Arnaud 25 - Own work, CC BY-SA 4.0,

Ring performance: By Somtow at English Wikipedia - Transferred from en.wikipedia to Commons., Public Domain,

Bayreuth Theatre: By © El Grafo / CC-BY-SA-4.0, CC BY-SA 4.0,

Ramanujan: By Konrad Jacobs - Oberwolfach Photo Collection, original location, CC BY-SA 2.0 de,

Envelope: By Self Scanned - Buisness correspondence - Allentown PA, Public Domain,

Finger pointing: By Debivort at en.wikipedia, CC BY-SA 3.0,

Pablo Neruda: By Revista argentina Siete días ilustrados -, Public Domain,

Pablo Picasso: By Revista Vea y Lea (cuadrado por Juan Pablo Arancibia Medina) - Fuente Original: Mágicas RuinasFUENTE DEL CUADRADO, Public Domain,

Pablo Escobar: By Colombian National Police - Colombia National Registry; Colombian National Police, Public Domain,

Pablo Milanés: By FNPI -, CC BY-SA 2.0,

Symphonie Fantastique video: Title: MYA Symphony Orchestra- Symphonie Fantastique I Reveries, Passions Author: MidwestYoungArtists Date: 25 November 2015 Original source: