Skip to content
/ x-rays Public

A musical piece created using modeled x-ray diffraction data, as well as source code for the sound generator used.

Notifications You must be signed in to change notification settings

dsshen/x-rays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Rays

X-Rays is a musical piece created entirely using audio synthesized by simulating the x-ray diffraction peaks of sodium chloride (table salt). It was first shown in concert at Taplin Auditorium, Princeton University, on May 10, 2018.

Watch the concert version on YouTube.

Are you a musician and want to generate these dank sounds yourself? If you have a DAW with VST and/or AU functionality (such as Ableton, Logic Pro, FL Studio, Cubase, etc.), you can! In the PluginBuilds folder, you'll find VST and AU versions of the synth plugin used in this piece, which you can then install into your DAW of choice.

Are you a chemist and want to know how I simulate the diffraction peaks? Check out the source code, particularly the file PluginProcessor.h, for details. A good theoretical summary can be found here. In brief, I use structure factor to get the diffraction intensities (with lorentz-polarization correction) and generate sound by reading the intensity vs. 2-theta plot and mapping each peak to a sine wave (with 2-theta being mapped to Hz logarithmically). The parameters I use to change the sound are the unit-cell lengths (a, b, c) and angles (α, β, γ), as well as λ. Because the lattice parameters could potentially all be different, I compute the lattice spacing d using the triclinic case, since that reduces to all the other cases anyways.

The synth plugin was bootstrapped using JUCE and written in C++. The piece itself was arranged and mixed using Logic Pro X.

Concert notes from the Taplin performance

Humans love patterns. Our brains are hardwired to detect them, and our souls are energized by them. Crystal chemists experience the thrill of symmetry when elucidating the structure of a new crystal, and musicians feel it when band members all lock into the same groove during a jam. That this same thrill can be experienced in such different contexts suggests something profound about how we’re all wired to think and feel, and this piece was written in part to investigate what on earth goes into that wiring.

All of the sounds that you hear in X-Rays are directly generated from modeled x-ray diffraction data. To probe at the unique symmetries within crystals, scientists often use a technique called x-ray crystallography, in which a beam of x-rays is fired onto a powdered crystalline sample; these x-rays then “bounce” off of the sample in a unique pattern based on the specific types and arrangements of the atoms within. This diffraction pattern is typically described in terms of the angles and intensities of the “bounces” and allows a scientist to elucidate a crystal’s structure.

For this piece, a mathematical model is being used to predict the diffraction pattern of sodium chloride (table salt), and sound is generated by mapping each diffraction “bounce” to a sine frequency – low “bounce” angles correspond to a low sine frequency, smaller intensities correspond to quieter sines, etc. – and combining these sine waves into an other-worldly sound. Timbre shifts are made by changing the spatial arrangement of the sodium/chloride ions, and pitch shifts are made by modifying lambda, the wavelength of the x-ray beam. Thus, all of the sonic changes within the piece, including bass-line melodies, are due solely to the modification of physical and chemical parameters. The result is a novel and surprisingly expressive mode of sound synthesis.

About

A musical piece created using modeled x-ray diffraction data, as well as source code for the sound generator used.

Topics

Resources

Stars

Watchers

Forks

Packages