I was fascinated by the amazing work of Lee de Mora producing Earth system model music: https://www.youtube.com/playlist?list=PL27v682n8E2Sla8U7jJph9w9M6nYln-W3 after reading the scientific paper by him with co-workers on music generated from the UKESM1: https://gc.copernicus.org/articles/3/263/2020.
I really like the visual nature of synthesia piano music like this one by Yann Tiersen: https://www.youtube.com/watch?v=Yhrwvqo1w34. So, I decided to have a go at mapping the global temperature anomaly data I am working with onto the piano roll in the linux multimedia studio (LMMS: https://en.wikipedia.org/wiki/LMMS).
For the data I used the yearly global land air temperature anomaly timeseries from CRUTEM 22.214.171.124 and mapped it onto the 108-key extended piano in 12-tone equal temperament with the 58th key (the fifth A called A4) tuned to 440 Hz ‘A440’). For an 88-key piano A4 would traditionally be the 49th key. In LMMS the piano roll is 108-keys in length and starts at C0 (10 tones below A0). To calculate the note frequencies, I used the equal temperament formula from Eric Weisstein: http://www.ericweisstein.com/encyclopedias/music/EqualTemperament.html. This allowed me to map the temperature anomalies to piano key frequencies. First I had to discretise the anomaly timeseries to 108 bins such that zero anomaly is aligned with A440 and each octave corresponds to a 1 degree anomaly difference:
The mapping onto frequency space then looks like this and spans just over 2 octaves:
I then used midiutil by Mark Conway to generate a MIDI file that LMMS could read in to its piano roll. One additional step to note here is that the MIDI scale starts at C₋₁ not C0 and the indices of the note frequencies need offsetting by 1 octave. I chose a beats per minute of 600 in LMMS. Finally, I recorded the piano roll and output the video to MP4.
Here is the rendition: