3
$\begingroup$

I am currently working on a project, the final aim of which is to see if one can classify which instrument a sound recording is coming from, by looking at the fourier transform of a note and comparing the intensities of the fundamental frequency to the first several harmonics. While I am aware that in general how humans perceive sound is much more complicated than just the spectrum of frequencies, in the data collection there were some somewhat strange results. Specifically, in two recorded samples of a piano note, which sound indistinguishable when listening by ear, produced these two very different fourier transforms.

"Normal" Piano Sample"Weird" Piano Sample

Looking closer at the actual waveforms, there is some clue as to why in the second case we see a dominant second harmonic:

"Normal" Waveform"Weird" Waveform

It looks like in the second case, the first harmonic is almost "separated out" as an independent wave, whereas in the first case it is almost completely "absorbed" into the fundamental. Both cases were recorded on the same instrument with the same microphone, and as mentioned before, sound identical. I was wondering if anyone had any ideas about what causes this kind of behavior, or potentially how to mitigate it in recording/processing.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

The obvious reason from the plots is that the relative amplitudes of the two harmonics are different. The relative phases of the harmonics will also change the shape of the wave form, if the amplitudes are constant.

Note that since in a real piano the harmonics are not exactly in the frequency ratio 2:1, the relative phases will change over time. If you plot the waveform over a longer time period, you will probably see the "shape" of the wave change.

Also, whether these "sound indistinguishable" probably depends who is listening, and what they are listening for. A professional piano technician, or a professional pianist, might hear things which you don't!

$\endgroup$
4
  • $\begingroup$ Ohh that's a really good point about the relative phases changing, and explains why sometimes you get one or the other seemingly randomly. Also a good point about listening to the note, there's a good chance someone else could tell the difference, I just meant to point out that one note does not sound obviously an octave higher than the other :) $\endgroup$
    – Theo
    Commented Apr 28, 2021 at 17:34
  • 1
    $\begingroup$ You can experiment with the effect of phase changes yourself. Taking the amplitudes from the first graph, plot the functions $1.6\sin t + 0.5\sin 2t$ and $1.6\sin t + 0.5\cos 2t$ for example. (Then try changing the $+$ signs to $-$ to get two more plots...) $\endgroup$
    – alephzero
    Commented Apr 28, 2021 at 17:40
  • $\begingroup$ @Theo If you analyze a human singer, depending on the vowel sound being sung, you will see the $2f_1$ analyzer peak stronger than the fundamental, but the "note" you hear matches a sine generator tone of the fundamental ($f_1$). Psychoacoustics (brain+ear) is a fascinating topic. $\endgroup$
    – Bill N
    Commented Apr 28, 2021 at 20:35
  • $\begingroup$ Relative phase wouldn’t affect the magnitude frequency response as shown in the first pair of graphs though. My hunch is that a note struck more loudly is more likely to excite the overtones, explaining why the second sample has a different measured spectrum. $\endgroup$
    – geshel
    Commented May 2, 2021 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.