Playing a storm - music from weather data

This is a brief description of how weather from this weather station was used to generate a traditional Irish tune.

Weather Data

Weather generates a huge amount of data as the sensors that we employ tell us specific data measurements of temperature, wind, humidity, barometric pressure and so on. Weather events such as storms are usually represented in the form of satellite images, charts and graphs. All of which are things that you can look at and see. We are used to looking at visual representations of weather data but what about aural representations? What does weather data sound like? In this work we investigated the use of weather data to produce sounds and music. The process is known as sonification. The goal was to take weather data from a 24-hour period and see if we could turn it into music. There are many fine, soft days that we could have taken but that may not have given a very interesting output so we took data from a significant weather event in 2020 that we all remembered.

Storm Jorge

Storm Jorge came through Ireland on the 29th February 2020. It came with lots of warnings. It was an extreme event which produced some interesting weather data. This weather station gathered a lot of data from the storm and produced some interesting graph visualisations of the storm as can be seen on the website.

Graph of Storm Jorge

For the purposes of this work the focus was on the wind data, represented by the green line and barometric pressure data represented by the pink line on the graphs. For the 24 hour period of the 29th February the weather conditions were recorded every minute making 1440 observations of wind and barometer. This would be too much data to sonify so a 10 minute moving average was applied reducing the number of data points to a more manageable 144.

It is Music but not Musical

We then needed to rescale the range of the weather values to a range of 1 to 14, and match them to a musical scale of 14 notes, one-and-a-half octaves, from D to c' in ABC notation. We chose the key of D Dorian for the musical output. It is one of the most common minor scales in Irish traditional music, and we felt a minor scale would be appropriate for music generated by stormy weather.

Notes from Graph

As you can see in the graph overlay of the musical notes onto the green wind line, the notes are in line with the wind. From this we were able to assign a musical note to each of the wind observations. The first four notes are GEGG, followed by AAAG and so on so that each of the 144 wind observations now have an associated note.

Notes - low res

Similarly, for barometric pressure we mapped the wind observations to the scale of 1 to 14 giving us this stepped rendering of barometric pressure which was then converted to notes for each of the 144 observations. This allowed us to generate a musical output using one note per observation. This was interesting but as you can hear it is not very musical. It is a low-resolution melody. We wanted to explore the use of traditional Irish music to enhance the musicality of this low-res melody.

Mapping to Traditional Irish Music

Traditional tunes are built not only of single notes but from blocks or clusters or notes at 1/2 bar resolution. The tunes are assembled from these mini melodic patterns, with many of the blocks cropping up again and again across 100s of tunes. They are the gene code of traditional music. Typically, two of these blocks make up a bar; two bars a phrase; two phrases a line; two lines a part; and two parts a tune. We hoped to harness this structure to add musicality to our sonification output, filling in the low-res outline melody generated by the weather data.

Structure of Trad Music Tunes

It is worth noting that the idea of breaking tunes down in this fashion derives from the work of the great traditional music researcher and collector Breandán Breathnach, and the PhD research of composer and performer Martin Tourish. We built up a database of all the melodic blocks in all the 841 jigs in the Breathnach and O'Neill's collections at three levels of resolution: 2 bar phrases, single bars, and 1/2 bar 'jig blocks'. This would allow us not only to generate sound from our weather data, but to map the weather data to a musical database of the building blocks of traditional tunes, creating unique new music that reflected in its melody the shape of the weather graphs, and the energy of a storm.

The data in these collections is not structured or machine readable. We needed to bring these into a structure that would allow us to run searches, matches, filters and lookups. We brought them into a database that has one tune per record where each tune is broken down into its respective bars from 1 to 16. This would allow us to extract the root notes for each block which we would need later.

structuring the unstructured

Once we had the jigs in a structured format we were able to extract 5,800 2-bar phrases, each phrase containing 12 notes and corresponding to 4 root notes. We were also able to extract 12,000 bars usually containing 6 notes and 2 root notes. And also from the structured jigs list we were able to extract 23,000 jig blocks, the 3 note building blocks of jigs. Many of these jig blocks appear in multiple tunes so there were roughly 1000 unique jig blocks. We called this repository of jig information the "Jigs Corpus". It is still a work in progress and we hope to make this available on open source so that people can add to it and improve it. We used the Jigs Corpus to search for sequences of notes that would match our data from the storm. In our first pass of the data we wanted to find any matching 2-bar sections. This meant looking in the Jigs Corpus for a match of 4 sequential notes from the storm notes. In the example here the first 4 root notes from the storm were GEGG. We searched the Jigs Corpus for these 4 letters until we found a match which you can see here was GAG EDE GAG GED. Even with 5,800 records we still only came back with 15 matches – or 60 root notes.

1st pass

We still needed to run a second pass this time looking for 1-bar matches. In other words, we needed to search for matches of two root note combinations. As you can see in the example the two note combination of GE returned a corresponding jib bar shown below where the two root notes G and E are the prominent notes in the bar. This 2nd pass provided jig bars to all but a few stray notes. These were dealt with using a 3rd pass where notes were matched to jig blocks based on the frequency of occurrence of the block in the jigs corpus, using the most frequently used blocks first.

2nd pass

The final output is a tune which is made up of a mixture of musical combination notes that originate from the jig corpus but match the data of the storm.

Storm Jorge with Visualisation

Danny Diamond plays Storm Jorge

What next?

Though the original intention of the project was to sonify weather data we discovered during the project that just putting notes to data points rarely produced a musically pleasing melody. This led to working on the 'jigs corpus'. Building up the jigs corpus database allowed us identify the half-bar melodic blocks from which traditional tunes are built. By looking for weather generated data patterns that matched those in the jigs corpus we were able to use melodic patterns from the Irish tradition to represent the storm in a more musically sophisticated and melodic way. The jigs corpus is, in itself, a useful output of this project which we believe can be the basis for more work in this area. With further work it should be possible to extend the corpus beyond jigs, identifying and listing the musical building blocks of the entire Irish traditional repertoire, which would be a unique and useful resource for composers and students of traditional music. As the world produces more and more data, data science and data analytics is becoming more important. Data scientists turn data into forms that allow data to be used as a basis for key decisions: business, scientific, government policy and so on. This is crucial work as the decisions of today determine all of our futures. Data is rarely if ever used to create a new piece of art or music. This project links the science of data to the art of music in a novel way that bridges the gap between art and science. This project has also proven the concept that melodic music can be generated from data. In future work the researchers at NUI Galway are planning to carry out further enhancements to the traditional music database and to the algorithms developed in this initial work.

Links:

Danny Diamond Musician

Data Science Institute

Insight SFI Reserach Centre for Data Analytics