I’ve been doing new experiments analyzing the results of using the microphones without a pipe for resonance. I was expecting flatter results with less noise because of the removal of the resonator. What I found was a lot different.

There were two directions that my search took. One was to run the same geometric configuration with identical input signals or two that are only different in volume. The other direction was to use different speakers to help tease out what effects are by the frequency response of the microphone, the frequency response of the speakers and variation caused by echoes in my work area.

My audio source was a pure tone swept linearly between 40 Hz and 8000 Hz over a timespan of 4, 8 or 12 minutes. Because the sweep is linear, the right half of each graph covers about one octave while the left half shows about ten. That would indicate that I’m emphasizing only a small part of the sound spectrum. I started working with a linear sweep to show as many resonance peaks as I could. That led to that emphasis.

The first effect I found was that the same configuration creates the same signal. I thought that the oscillating waveforms would an effect of random noise. The surprising part is that although it looks like a noisy waveform, it’s a reproducible and pretty consistent.

This graph shows two runs with the same speaker and microphoone in the same geometry but different volume input signal. There were minimal adjustment to get the graphs to line up. However, if they lined up perfectly, there would be no blue.

One interesting measurement is that temporally stretching the sweep into different duration scans also have a similar consistency in different runs.

The way I get these graphs is to record the microphone and then break the waveform into short chunks that are delimited by zero crossings of the signal. Each chunk has its samples squared and the square root of the average recorded.

Although the graph above looks pretty noisy, because the graph is consistent, there’s more going on. I performed the same chunking with the raw input signal below. There is a little noise, but it is substantially smaller than the variations in the above signal.

The x axis of each graph is indexed by the chunks in sequence.

The other question that I would like to answer is the manner that the speaker or microphone have different frequency response curves. I took three speakers that I have and ran the same input sequence. I couldn’t get the geometry of the speakers identical between the runs, so the effects of reflections off objects in the room are an unexplored effect.

What I saw when I analyzed the graphs and placed them together is that there is a big variation in the sounds recorded from each speaker. I don’t see anything that is obviously due to distortion from the microphone. I can’t say that it isn’t there but the effects of the geometry and the difference between the speakers appear to swamp any effect of the microphone.

I’d like to do more work exploring the effects of changing the geometry on the results as well as trying to identify the frequency response of each part of the system, microphone, speaker and room configuration. I’m not confident that I have enough data streams available to separate them.

One thing I learned is that making recordings during the day is fraught because of noisy traffic, construction work or lawnmowers. In the evening, the external noise sources are much lower. Another thing I learned is that collecting this data is time consuming. Each run takes 4 – 8 minutes which adds up.

One goal is to make some jigs so that I can reproduce the geometry from one day to the next.

Musical instruments and resonance

I’ve started a project exploring musical instruments and the physics controlling their audio properties. Mostly I’m interested in brass instruments like a trumpet or trombone‒instruments that are tubular for much of their length. Brass instruments have a constant diameter at their beginning. As the tube approaches the end, the instruments become more conical until terminating in a flared bell. I chose them because I played the trumpet in high school. It’s familiar.

One book that I’m using to help understand what is happening is “The Physics of Musical Instruments, 2nd edition” by Neville H. Fletcher and Thomas D. Rossing. It has quantitative descriptions of the properties of real instruments.

One interesting idea is to consider brass instruments as “reed instruments.” For a brass instrument, the “reed” is the lips of the performer. This allows brass instruments to use the same equations as woodwinds. As a first approximation, lips and reeds have similar properties of interrupted air flow. It does make a difference whether the opening closes with increasing pressure or opens with increasing pressure so the analogy has its limits.

My first experiments have been with a pipe resonating at different frequencies. My method of creating data is to input a sweeping pitched sound to one end of a pipe with a speaker. The pipe resonates at different frequencies so that the intensity of the sound so the other end varies over time. This is a example configuration with headphones presenting the sound on the right end and a microphone picking up sound on the left. I haven’t calibrated the frequency response curve of the microphone and speakers.

For example, when I sweep the input sine wave from 50 Hz to 2000 Hz over 2 minutes on one end of a 1m 1/2″ PVC tube, the amplitude from the other end creates this graph. I measure the amplitude as rms (root mean square) by squaring the values of each sample in a block and then taking their average. This helps in comparing one block to the next.

time vs. amplitude

One thing I notice with such examples is that as the frequency goes up, there is more and more noise in the wave form. The shapes become more ragged. It should be easy to identify the time of the different peaks and thus their frequency but this and other sources of noise interfere.

If I take above run and make an image of its frequency distribution, I get this. The Y axis isn’t calibrated, but starts at 0Hz at the bottom. This chart has the whole duration of a single observation session. The graph above is trimmed to exclude the times that I wasn’t activating the system.

Time vs. frequency

An interesting feature of the graph are the higher overtones from the input sweep. They show up as lines with higher slopes than the main output. This example, I can see 4 extra lines, but different configurations of microphone and pipe may show only one or two. (The third overtone is barely visible above the middle of the run.) Also, if I look closely, I see very faint equispaced horizontal lines. I suspect that those are from my computer fan but I haven’t verified it.

The gray noise at the bottom of the graph are different noises from within my house. I haven’t identified the causes of those or their frequency. Some of the graph is marked with mechanical bumps that show up as lines starting at zero hertz. The vertical features centered on the main input frequency are a common feature of these charts. I’m not sure whether they are real or are an artifact of my processing.

(This representation doesn’t help me identify the position of the peaks.)

An interesting adjustment is needed when I break the signal into chunks. For the Fourier transform or other analyses, I need to block the chunks so that they end at the zero crossings of the input waveform. I pick a minimum number of samples for a block and then search further for the next positively sloped zero crossing. If I don’t do that, the sharp edges at the ends of a block add artifacts that hide real effects. The software I’m using for FFT, FFTW allows me to have non-power-of-two long blocks which is essential for seeing useful results.