Inspired by an old but brilliant Clifford Stoll video and by my desire to get back into running experiments and reporting the results, I recently set out to measure the speed of sound using a set of Roland CS-10EM binaural microphones and a Zoom H2n I borrowed.
In the experimental setup I place the 2 microphones 0.8 meters apart in a large room (6x6 meters), connect the microphone jack to the line-in port of the H2n and set it to 4 channel recording . After starting the recording I then position myself approximately 2 meters away from the 2 microphones along a straight line that connects myself and the two microphones. I smash two hardwood boards against each other to mimic an impulse signal as best I can.
My original plan was to load the waveforms for the 2 signals into Python and write code that detects the impulse and tries to overlap the signals to compute the offset and thus the speed of sound. It was easy to get started with librosa and I was delighted to discover that Python has a built-in library to load WAV files. With numpy and matplotlib I was already familiar.
My various attempts to automatically match up the 2 waveforms failed, however. A reddit post and the helpful answers to that post allowed me to eliminate a number of potential issues with my original experiment.
Instead I matched them up manually using Audacity. Here are the results: