Blogs
Turning Chess Into Music

Turning Chess Into Music

BadXinton
| 9

Chess and music share a lot of similarities. They are intrinsically linked by mathematics and are both finite in structure yet seemingly infinite in possibility and creativity. Just as grandmasters of Chess learn to 'break' the rules and principles of the game, so too do composers and musicians in their music.

I was excited to see the surge of interest in chess over the last few months. I had been watching Hikaru Nakamura’s brilliant Twitch livestreams in March just as the lockdowns around the world really got going, so I was able to witness the chess ‘boom’ first hand and it was a pleasure to be along for that ride. Anything that positively grows the game of chess is, in my mind, a good thing!

I wanted to get involved but wasn’t exactly sure how at first…

In the past I have made a minimal electronic track that was composed using the solar system as a roadmap, where each planet was represented by a synth’s motif, and the distances between the planets were scaled down from the vast dimensions of space to establish the structure and mix of the track. In another project, I took inspiration from Corfe Castle, a historical site in South West England, and created an immersive sound experience that represented the Castle’s history, using musical elements and sound effects recorded on the site.

…then the thought came to me! Was I able to turn a game of chess into music? Would it actually sound musical? Well… read on to find out!
(If you would like to get straight to the music, scroll down to the bottom of this article!)

~

Method to My Madness

For this project, my plan was to use the co-ordinates of pieces to directly inform the main melodic choices of the music. To keep things a little simpler in this first ever attempt at making ‘chess music’ I used only the files (A-B-C-D-E-F-G-H) which, luckily, are just one extra letter away from being an A Minor  or C Major scale (A-B-C-D-E-F-G).

Piano Am scale

Piano Am scale pic from: http://www.piano-keyboard-guide.com/a-minor-scale.html

I decided that each file would correspond to that same note in the A Minor or C Major scale (in any octave) and that the H file or a ‘castle’ could count as a ‘wildcard’ for a note/notes of my choice. The destination of each move would ‘activate’ these notes. For example:

If a piece moves from the A file to the E file, I would play an E.   

moving a chess piece from the a file to the e file

If a piece moves from the A file to the H file (or castled), then I would be allowed to play any note that I like: one note of any pitch per move onto the H file and any number of notes of any pitch for a castle. 

moving a chess piece from the a file to the h file

With this approach it was guaranteed that the melody would at least resemble something musical and coherent, though it would still leave a lot up to me.

Choosing the Game

Hikaru and Magnus Original pics sourced from wikipedia; creative commons. Edited together by myself.

Considering that this recent chess boom began on Twitch via Hikaru Nakamura’s content, I decided to use a game of his that I had enjoyed watching live on that site. The game in question was a fantastic draw that ultimately decided the Magnus Carlsen Chess Tour grand final between Magnus Carlsen and Hikaru Nakamura. This whole final was a very close affair with both players at times going behind, then ahead, coming back from defeats and winning under unlikely circumstances. From a viewers’ perspective it was a perfect match that went as far as it could and even settled in the most even way possible. It was exciting to watch in part because of the buzz surrounding the tournament and also because of the time control of the games, which made sure the match didn’t drag on for an age of repetitive draws. Inspired by watching this event, it felt like the perfect game to base this project upon.

I obtained the PGN of this game and set about organising the data in such a way that I would be able to use it musically. The first thing to do was to separate out each move, then I had to be sure I only kept the data of the final position of a piece, and not confuse myself by using its starting position! For example, as stated in this game’s PGN, move 27 for white was: Rdg1. I had to be sure that I only used the letter ‘g’ for my data set and not the ‘R’ (Rook) or ‘d’ (starting file).

With these discrepancies out of the way, I was able to create myself an unusual set of notation using the letter associated with each piece’s destination file. Below you can see the finished result of this. If you are a musician, perhaps have a go at playing through it to get a feel for what that is like! Remember each letter corresponds to the note you must play, and if there is an ‘h’ or a ‘? (castle)’ you can play any note/s that you like.

e, e, f, c, b, f, d, c, c, c, d, e, h, d, f, f, g, e, g, ?, e, b, a, b, e, f, ?, g, h, e, e, c, d, b, b, h, g, g, c, g, b, f, f, f, e, h, f, g, g, h, g, h, g, h, b, c, c, a, g, g, g, a, d, b, g, g, g, h, a, d, c, d, b, h, d, e, d, f, e, d, e, d, b, c, e, f, f, d, e, f, e, e, f, e, f, g, f, g , e, g, c, g, c, g, e, e , f, e, d, e, b, b, b, b, b, b, d, c, c, e, c, d, b, d, e, c, c, b, c, b, e, d, f, b

Turning Chess into Music

It was at this point in the process where my musicality really started to be utilised. It was important to me that the structure of the piece was followable and felt naturally musical. If you listen to this track and don't notice anything out of the ordinary.. then my goal was achieved. Remember that this is a melody made entirely from a game of chess!

I couldn’t simply play each note one after the other for the same length of time continuously until the end, as this would feel like a meandering and strange piece that would just suddenly finish. I also couldn’t split the notes into even groups of 4 or 8 or some other value relevant to the time signature, as in this case some groups would have sounded incomplete or crossed over bars of music in an unusual and unmusical manner.

So, the solution to this was to instead group the melodic notes together in batches that could fit within a traditional musical structure. For example, the first entry of the melody consists of the first 12 notes assigned via the board files. Notice how the first ‘e’ does not begin on the first beat of the bar, and that the first ‘e’ also lasts twice as long as the other notes. This all lets the melody here finish on an ‘e’, a relevant note to end on in this Am/C Major key for a pleasing cadence at the end of the phrase.

e4

e5

e, e

Nf3

Nc6

f, c

Bb5

Nf6

b, f

d3

Bc5

d, c

Bxc6

dxc6

c, c

Nbd2

Be6

d, e


In comparison, the next phrase uses 13 notes assigned via the board files, including one assigned via a queen-side castle, for which I chose a single ‘e’. Although there is an extra note here, the timings are slightly different to the first phrase and so the two phrases together all fit within 8 bars of the steady 4/4 time signature.

h3

Nd7

h, d

Nf1

f6

f, f

g4

Qe7

g, e

Ng3

O-O-O

g, ? ? ?

Qe2

Kb8

e, b

a3

Bb6

a, b

Be3

e


I was careful in how I split up each phrase, even requiring some changes once I had made it through the whole track. It was not an instant process! Towards the end of the piece, I wanted to repeat the beginning in some way and, although the assigned notes at this point were not exactly the same as the beginning, I was able to use them over the beginning chord progression in a manner reminiscent of an instrument solo. This was down to the beginning rule I had established which put this melody in one key signature…

…but to keep the music interesting throughout, it was the perfect opportunity to use some jazzier chord progressions and break the harmony away from the melody’s strict rules. Through the use of modulation and accidentals (sharps and flats) I was able to create a harmonically rich accompaniment that takes you through different keys and rhythms, adding to the momentum of the piece and giving a sense of progression. I wont go into a lot of detail about the musical side of harmony and counterpoint here, but it was through pushing these outside of the conventional 'box' that I was able to craft a diverse piece of music that will hopefully feel as if it has taken you on a journey!

Lofi Chess Jazz

With everything in place I put together a video of the process, playing the music over the chess game in question alongside chess.com's brilliant analysis table. I even recorded and included the chess.com board sounds for a little extra nostalgia and authenticity! Please enjoy the final music track in the video below and let me know… Was I able to turn a game of chess into music? :

(If you have read this article, you may wish to skip to 3:41 in the video to get straight to the music!)

Thanks for reading.

Thanks for watching.

Thanks for listening.


If you do have any questions, I’d be happy to answer them if I can! Otherwise I really do hope you enjoyed this unusual adventure, and there may yet be more chess/music collaborations in the future!

All the best!

Charles
(BadXinton)
https://www.charlesevanharrison.com/