Oompah.py – Big Brass meets Big Data (Guest post)

Written by / on 25th
Brass Band in Leeds

I had the pleasure of attending the LeedsDataMill hack-day a few weekends ago. I had a lot of fun and I want to give a sense of the playful yet useful nature of these events. I also want to show how we attempted to create something that was uniquely representative of Leeds. I hope you agree that we were (literally) taking steps in the right direction.

As with all hack days I turned up in the morning not knowing what to expect. I knew I was going to write code, but didn’t know who I’d be working with nor what data would be available. Quite by accident I met up with my buddy and Leeds resident Simon Davy (@bloodearnest) during the opening coffee / meet and greet session. The next session answered my question about the availability of data: several “curators” of Leeds based data presented data sets of interest, one of which was footfall data for various locations in Leeds (i.e. counting the number of people passing through a specific point in the city).

“Let’s create a piece of music that represents the footfall data” suggested Simon (as well as being a programmer, Simon is a percussionist).

“How about we create the piece for Brass Band?” I countered (as an ex-principal Eb Bass in the National Youth Brass Band of Great Britain).

“Awesome!”

Collecting data is relatively easy compared to actually representing it in a meaningful way – especially in a way that lets the data “speak” so people understand the information therein.

Auralizing data (turning it into sounds) is a rather gimmick-y thing to do – it’s relatively easy to turn numbers into computerized bleeps and bloops. Unfortunately, such soundscapes are often incomprehensible and about as much fun as listening to a million monkeys playing on a million Wurlitzer organs.

However, by writing for brass band we were choosing an artistic medium as synonymous with Leeds and “oop north” as flat vowels and “trouble at t’mill” jokes. Furthermore, writing for brass would be helpful because it limits us to creating something that a human could play (rather than random sounding virtuosic bleeps and bloops).

“But how do we tell the story in the data?” asked Simon.

A morning of brain-storming produced the following plan:

* Use the excellent Lilypond music typesetting system (lilypond.org) to produce the score.

* Instrumental sections of the band represent different areas of Leeds. We had data for eight spots within the city: Dortmund Square, Albion Street North etc, and, say, the basses’ part might be arbitrarily based upon Dortmund Square.

* Split the music into twenty-four 16 bar sections (one 16 bar section for each hour of the day).

* Aggregate the data for each location for all days (we noticed, when we visualized the aggregate data, that each location followed a pattern but the pattern varied from location to location).

* Rhythmic data for each instrumental section during each 16 bar representation of an hour is based upon the number of footfalls (i.e. how busy the pedestrian traffic is at that location at that time in the day). The busier the footfall data the “busier” (quicker, more syncopated) are the rhythms played by a specific section at a specific time. The dynamics (volume) of the piece ought to follow this pattern too.

* Derive the pitch of notes from the number of footfalls but, to ensure we don’t just produce a-tonal noise, use such data as the “seed” for selecting notes from a pentatonic scale (making it more likely to sound “nice” rather than “grating”).

* To ensure listeners understand what time of day they’re listening to the start of each 16 bar “hour” contains a tubular bell sounding out the hour (a la the “bongs” of Big Ben). Furthermore, to make things more musically interesting each hour is played using a different pentatonic scale. The music modulates in such a way that midnight is a tritone away from midday (i.e. harmonically speaking, as far away as possible). Thus, the music harmonically meanders from one key to the other and back again as night becomes day and day becomes night.

Working out this plan took the morning and our lunchtime. In the afternoon we got to actually writing some code (i.e. the “hacking” in the “hack” day).

Given that both Simon and I were only available on the Saturday of the two day event we didn’t finish our plan. However we did manage to write code to generate pitches, code to spew out a musical score, various bits of data processing (data aggregation and so on) and progress on transforming footfalls into rhythms. Being unfinished meant that our work was also full of bugs, as the following example of a hernia inducing Cornet parts demonstrates:

oompah

What now..?

Simon and I have plans to finish our work and present it at this year’s PyconUK developer conference in September. We also hope to enlist the help of a “Real Brass Band” ™ to perform the data for us. We’ll let you know how we get on and hopefully attach a YouTube video of the performance. :-)

Finally, many many thanks to Leanne, Abhay and Mark at the Leeds Data Mill for organizing such a fun yet important event. Kudos to Leeds City Council for supporting and hosting too.

If only other cities were as switched on as Leeds to the potential of open data and citizen coders contributing for the wider civic good (in both a mathematical and artistic sense).

Blog post by
Nicholas Tollervey (@ntoll) & Simon Davy (@bloodearnest). Main image by Donald Judge via Flickr

Nicholas TollerveySimon Davy

Get Involved

Are you feeling inspired? Got a shed load of data you want to share? Or maybe your pet project is finally ready to unveil. Whatever the reason we are always happy to hear from you. Share your stories and suggestions with us here.

SUBMIT DATA SUBMIT PROJECT

Search Data Sets