Out Now: The Science of Sci-Fi Music

The Science of Sci-Fi Music

My latest book has just been published! It’s my fourth contribution to the “Science and Fiction” series from Springer, following on from Pseudoscience and Science Fiction (2017), Rockets and Ray Guns (2018) and Fake Physics (2019). This one is called The Science of Sci-Fi Music, and here’s the back-cover blurb:

The 20th century saw radical changes in the way serious music is composed and produced, including the advent of electronic instruments and novel compositional methods such as serialism and stochastic music. Unlike previous artistic revolutions, this one took its cues from the world of science.

Creating electronic sounds, in the early days, required a well-equipped laboratory and an understanding of acoustic theory. Composition became increasingly “algorithmic”, with many composers embracing the mathematics of set theory. The result was some of the most intellectually challenging music ever written – yet also some of the best known, thanks to its rapid assimilation into sci-fi movies and TV shows, from the electronic scores of Forbidden Planet and Dr Who to the other-worldly sounds of 2001: A Space Odyssey.

This book takes a close look at the science behind “science fiction” music, as well as exploring the way sci-fi imagery found its way into the work of musicians like Sun Ra and David Bowie, and how music influenced the science fiction writings of Philip K. Dick and others.

The Science of Sci-Fi Music is available from all the usual places, such as Amazon.com or Amazon UK, either as a paperback or an ebook.

To give a flavour of the contents, here’s a link to a short video preview of the book:

Algorithmic Beatles

Markov music matrix

When Eric Morecambe mangled Grieg’s Piano Concerto on a TV special in 1971, he insisted he was “playing all the right notes, but not necessarily in the right order”. That’s a valid point, because there aren’t that many different notes on a piano and the only thing that distinguishes one tune from another is the order in which you play them.

To a mathematician or computer programmer the situation is crying out for quantitative analysis. The diagram above shows the “transition matrix” for one specific Beatles tune (using the MIDI standard where middle C is C5). It’s clear there’s a lot of order here. One thing that jumps out is that there’s only one “black” note, G#5, and it’s always followed by A5. In fact A5 is a very popular note, cropping up after no fewer than 8 different pitches. On the other hand, G#5 itself is very rare, only ever coming after D6, and then only 6% of the time.

As well as analysing the original tune, this allows us to write a new tune of our own using the same transition matrix. The result (as the aforementioned mathematicians and computer programmers will recognize) is a first-order Markov chain. Producing an algorithm of this type from scratch would be rather tedious (as indeed the initial analysis would be), but fortunately there’s some free software called OpenMusic which includes built-in Markov functions that make the process much simpler.

Of course, there’s more to a tune than the pitch of the notes – there’s the duration of a note too. But that can be analysed and reproduced by exactly the same method. I experimented with an algorithmic composition of my own, based on the Beatles song analysed above. As a first step, I used the OpenMusic Markov functions to generate a series of tune-fragments for both the “right hand” and “left hand” of the piano. Then, to give the composition some structure, I arranged the fragments in a rough approximation to classical sonata form.

I won’t say what the original song was, because I want to see if anyone can guess it. As a hint, I’ve inserted a brief quotation from the original at the mid-point of the piece. Here it is on YouTube: