Isolating audio harmonics (music)

Thread Starter

eromlignod1

Joined Sep 26, 2017
58
Gentlemen:

I am conducting some experiments in which I would like to isolate the harmonics of a musical tone. I need to be able to measure each one accurately with a frequency counter/timer.

Now, before you all jump in and suggest a band-pass filter, I can tell you that I have not had much luck with that so far. I listen to the tone with a high-quality microphone in a sound-proof room. I pass this signal through an old Krohn-Hite adjustable band-pass filter and then split the signal. Half goes to my scope and half to the frequency counter. All connections are BNC coax.

I am able to measure the fundamental and sometimes the first partial, but it is very difficult to isolate higher harmonics and measure their frequencies.

Is there an off-the-shelf solution for this?

Don
 

wayneh

Joined Sep 9, 2010
18,089
Yes, a spectrum analyzer. You don't want to alter (filter) the signal, you want to use hardware and software to analyze the signal.

oops, slow typing
 

Thread Starter

eromlignod1

Joined Sep 26, 2017
58
Well, my frequency counter can easily give me the answer I need with more than enough accuracy. If there were only a reliable way to isolate the harmonic sine waves...

Don
 

Thread Starter

eromlignod1

Joined Sep 26, 2017
58
If you measure the fundamental, then why can't you use that to calculate the frequency of the harmonics?
Well, that's the point of the research. Piano strings have inharmonicity, since they're not ideal vibrators, and the harmonics aren't perfectly related to the fundamental. I need the actual frequency of the overtones, not the theoretical one.

Don
 

joeyd999

Joined Jun 6, 2011
6,204
Well, that's the point of the research. Piano strings have inharmonicity, since they're not ideal vibrators, and the harmonics aren't perfectly related to the fundamental. I need the actual frequency of the overtones, not the theoretical one.

Don
Ahhh....that's different!

If you can "count" the fundamental, you can use a frequency multiplier to create ideal harmonics. Then, mix (multiply) those with the original signal (once for each harmonic) and looooooow pass the result. The resulting frequency will be the difference between the actual frequency and the ideal harmonic.
 

crutschow

Joined Mar 14, 2008
38,325
Okay.
How about taking a snapshot of the audio with a high accuracy (high number of bits) and high sample rate A/D converter (say a sample rate of ten times or more of the highest overtone you want to measure).
The FFT of that calculated with a computer should then give the frequencies to within the accuracy of the sample rate clock, and amplitude to within the voltage accuracy of the A/D.
 

MrChips

Joined Oct 2, 2009
34,629
That is not how it works. The sampling clock sets the limit on the maximum frequency that can be sampled.
The frequency resolution is inversely proportional to the total recording time.

For example, if you want to record 1kHz max, you need to sample at 2k samples per second.
If you want 1Hz resolution, you have to sample for 1 second.

TS asks for 200ppm resolution. That is 0.02% resolution.
At 1kHz, that is ±0.2Hz.
To attain that resolution you have to sample for 5 seconds.
 

crutschow

Joined Mar 14, 2008
38,325
if you want to record 1kHz max, you need to sample at 2k samples per second.
If you want 1Hz resolution, you have to sample for 1 second.

TS asks for 200ppm resolution. That is 0.02% resolution.
At 1kHz, that is ±0.2Hz.
To attain that resolution you have to sample for 5 seconds.
So sampling at 2kHz for a 1kHz signal will give a resolution of 200ppm for the harmonics also?
 

MrChips

Joined Oct 2, 2009
34,629
So sampling at 2kHz for a 1kHz signal will give a resolution of 200ppm for the harmonics also?
If the highest harmonic is 1kHz, yes.
But the critical criteria for attaining a resolution of ±0.2Hz is sampling for 5 seconds, i.e. you need to acquire 5 seconds of data.
 

MrChips

Joined Oct 2, 2009
34,629
Is the musical tone a fixed pitch and continuous for a long duration?
Do you need to measure the amplitude along with frequency?

If the frequency is constant then you can derive the harmonics from the fundamental.
If you want amplitude information then the FFT is your solution. Getting 200ppm is a bit problematic.
 

Thread Starter

eromlignod1

Joined Sep 26, 2017
58
I have to empirically measure the harmonics themselves. The first harmonic of a piano string is not exactly 2f. It is off a little due to the stiffness of the wire at its ends, tolerance and runout in the diameter, inhomogeneity of the material, etc.

Is there an off-the-shelf device or chip that can reliably filter out the unwanted harmonics? Maybe something with a sharper cutoff than the one I'm using?

Don
 

wayneh

Joined Sep 9, 2010
18,089
Can you sustain the piano note for 5 seconds?
A piano string can easily ring for longer than that, but it will not stay constant. The TS mentioned the peaks jumping around. That's not an artifact - it's really happening.

I think you'd have to capture multiple string strikes and average them to build an accurate profile of what a strike looks like over time. In other words collect 50 or 500 strikes so that you can have 5 seconds worth of sampling within some narrow time window, maybe between 500 and 600ms after striking.
How well can the human ear detect a change of pitch?
I don't know if the TS's goal has anything to do with human hearing. I certainly agree that 200ppm is likely excessive.
 
Top