Barely Functional Theories

Musings on science and game design by James Furness.

The Dance of the Electrons and the Scientist

The LSCO crystal structure.

At a recent meeting in Philadelphia I heard about the ‘Sound ∩ Science Podcast Contest’ Read: The intersection of sound and science being held by the US Department of Energy (DOE) titled, described as ‘[…] an opportunity to share the excitement and mystery of science using sounds.’ I had a quiet hotel room evening ahead of me and an idea forming in my mind, so I set about creating a piece of music from my research data to enter.

Now my entry is complete and submitted, I though I’d take the time to write a few words about the science behind the music and a few of the creative decisions made along the way.

I’m going to quickly preface this post by making clear that the writing contained should be attributed to myself only. The words are not endorsed, reflective of or supported by the DOE, CCDM or anyone else mentioned within. The entry itself, however, was part of work made possible by the support of the DOE and CCDM.

Without further ado, here’s the final piece recorded ‘live’ from SunVox.An amazing piece of software kindly made available for free, though please join me in supporting it if you find it useful.

The Idea

My research at the time was focused on calculating the electronic structure of high temperature superconductor crystals to help understand their physics and to design better materials. A key property of crystals is their band structure, showing what energies electrons in the crystal can have. These allowed energies change as an electron moves around the crystal and gives a complicated energy landscape that the electrons to exist in. To understand a crystal’s band structure we calculate a walk through the energy landscape and record the band energies as we go.

The full band structure

We can, of course, take any path through the crystal but generally we follow a path that visits points of high symmetry and we give these special labels. I traced a longer than usual path for this project, exploring much of the crystal and generating long band plots to make music from. Here’s the path used to make the bands above.

The path taken through the Brillouin zone.

A Choir of Space Whales

So how do we go about turning this mess of bands into music? It took a bit of development but I eventually settled on something I was happy with.

Direct Synthesis

Lets isolate one band from the centre of the energy range and plot it up close.

The profile of a single band.

It looks somewhat like a low frequency wave convolved with some quieter high frequencies, prime material for use as a sample in an electronic synthesiser! Using two different bands as samples, a drum machine and a slice of cheese I put together a quick tune.

Hmm… Sounds nice enough, but ultimately anything built this way would just be music made with a slightly unconventional synth sample. Too far removed from the core science to really fit the competition brief.

So I tried another approach…

Frequency Modulation

Turning the bands directly into a sound waves didn’t work too well, instead I tried using the shape of the bands to control other sounds instead. The simplest way to do this is to mimic an analogue synthesiser and use the band structures to modulate aspects of a simple carrier wave.

I started out with a sine wave and used the energy of a band to control its frequency, so called frequency modulation. To do this I needed a way to map the energy of a band to a frequency, and it turned out that the simplest method I could think of worked really well. Quite simply, I defined the lowest energy point in the lowest band to correspond to some bass note, E in octave 1 (41.2 Hz), and the Fermi levelThe highest energy an electron can have in our material. to C in the 5th octave (523.25 Hz). It took a bit of experimentation to settle on this range of frequencies, but in the end it gave a nice spread of frequencies without any ear splitting highs or sub-audible lows.

I should note that the western even tempered scale rises roughly logarithmically with frequency. One could argue that an exponential mapping of energy to frequency might be more natural, but I found that the linear mapping worked well enough that I never explored using exponentials.

I took this frequency modulation approach and applied it to a few bands to build up some harmonies. I had most success by following the normal musical structure of choosing a bass tone to anchor the key, some mid frequency tones to harmonise the bass, and a higher pitch line for the ear will to lock on to as a melody (of sorts). I ended up choosing three bands to form ‘the accompaniment’, a core S character band deep in the energy spectrum for the bass, and two mid bands of P and D character to form the harmony.

For a ‘melody’ I decided to take the two bands either side of the Fermi level that are important in deciding if a material can conduct electricity or not, the valence and conduction bands (orange and purple respectively). I was happy to find that the interplay of these close frequencies produced some interesting sounds when combined.

I’ve highlighted the chosen bands on the image below.

Highlighted band structure

The resulting sounds were eerie and haunting, but ultimately not very interesting. More was needed to give the music a feeling of progression.

I intended to include an example of this ‘music’ here. Unfortunately, I only kept the Mathematica code used to generate the sounds, rather than the sound files themselves. Since beginning this project I’ve changed university and lost my access to Mathematica, so for now this work-in-progress example is lost :(. That’s what I get for relying on expensive software rather than open source!

Amplitude Modulation

Another common technique used in sound synthesis is using a mathematical function to control some other aspect of the sound, called an ‘envelope’. In order to add some variation to the frequency modulation I decided to use the bands to define and envelope and add some more character to the sounds.

Most envelopes require a fair bit of programming to get working, but an amplitudeRelated to the volume, how big the sound waves are. modulation can be achieved by a simple scalar multiplication, so I started out with that. I could have controlled this envelope any number of ways, but once again I found success by tying it to the energy of the bands.

If I made another simple mapping of band energy to wave amplitude then the low energy bands would have been nearly silent, so I decided to make a measure that was individual to each band rather than something global across all of them. In the end I settled on using the rate of variation of the band’s energy, normalised so its highest multiplied by 1 (full volume), its median energy gave 0 (silent) and its lowest energy gave -1 (full volume with a 180° phase shift). This means in regions where the band changes a lotCalled diffuse regions. the volume will changes a lot, and flat regions remain constant.

Applying this envelope to the band sounds makes the tones ebb and flow, granting a little variation to the different zones along the path.

Progress. But as a colleague described it: “A choir of space whales”.

Symmetry and Harmony

In traditional music chords and melodies are chosen to create a tension that pulls the ear forwards towards a resolution and along a satisfying musical journey. The ‘space whales’ were nice, but the music was lacking a drive. It meandered aimlessly until an abruptly stop with no resolution. The next improvement was therefore to add some traditional harmonic progression and inject some much needed momentum. I liked how close to the science the piece was so far, and I didn’t want to deviate from that, so I kept the additions down to a few sparingly placed chords.

To my ear, the band sounds are roughly in the key of A# minor, so I embellished the space whales with a sprinkling of chords that roughly followed the bass progression. To mix in a bit more of the science, I decided to strike the chords at times that roughly correspond to the passing of the high symmetry points we hit along the walk.

I wanted the chords to have a strong cavernous, echoey feel so I put the chords through a heavy echo effect. To me, this captured the feeling of being lost in the endless repeating units that build up the crystal.

The LSCO crystal structure.

Adding the Experimentalists

In the CCDM we are fortunate enough to have a diverse mix of both theoretical and experimental physicists. The theoretical voice was strong in the music so far, but to properly reflect the group I wanted to build in the experimental research as well. After some discussion with other CCDM members we decided to add another part to the music comprised entirely of sounds recorded in the lab. A laboratory is not my natural home, I tend to knock things over, so my fellow group members were invaluable in recording some of the sounds they encounter during their work, and I built the rest of the piece around them.

Building Crystals

So far, the sounds of the bands and the A# minor key had a haunting and mournful atmosphere, and this was supposed to communicate the excitement of science. I really didn’t want to portray my work as just a ‘mournful and haunting’ mystery! To remedy this I chose the growing of a crystal as the inspiration for last half of the music, and pushed the musical key onwards to a cheerier A# major key for an optimistic close.

Various lab sounds were processed into virtual instruments and fit in about the piece to add splashes texture and the experimental context. Then after the bands were complete, heavily processed glassware sounds were used to build up an A# major chord note by note, in a way that is reminiscent of atoms depositing to form the layers of a growing crystal. In the last two bars I introduced a dopant 7th note. This pulls the harmony towards a final closing resolution, and finishes the crystal allowing the researcher to pack up for the day and head for home.

Wrapping it All Together

That’s pretty much the story of how ‘The Dance of the Electrons and the Scientist’ came to be. I had great fun writing it, and was ecstatic when it won the best musical composition in the podcast competition. I always love playing with my research data and encourage everyone else to do the same.

Poster for the conference.

Leave a Reply

Your email address will not be published. Required fields are marked *

Robot Stopper *