DSPRelated.com
Forums

AGC before FFT in piano frequency analysis

Started by Robert Scott March 3, 2004
On Tue, 9 Mar 2004 12:22:38 -0500, "Clay S. Turner" <CSTurner@WSE.Biz>
wrote:

>Hello Robert, > >A book you may wish to find is Quinn and Hannan's "The Estimation and >Tracking of Frequency." > >You may also wish to look at Peter Kootsookos' Frequency estimation page at: > >http://www.itee.uq.edu.au/~kootsoop/freqalgs.htm > >
Thanks for the references. I will check them out. -Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
In article 404e0f37.21116184@news.provide.net, Robert Scott at
no-one@dont-mail-me.com wrote on 03/09/2004 13:44:
...
> Thanks for the referece. I have looked at it briefly, but it will > take much longer to absorb it. It seems to be focused a lot on > synthesis. My application is piano tuning.
half of it is analysis: how to extract those wavetables and what they say about the amplitude and phase (and thus frequency) of the harmonics.
> By measuring the > "inharmonicity" of a number of piano strings, a specific stretched > tuning can be derived custom for that piano. Another problem that I > did not mention is that the partials are themselves not always pure, > but can be composed of several very closely-spaced components, giving > rise to a "false beat".
false or true (whatever that means) a beat is a beat and your model of closely-spaced frequency components (for a single harmonic) is equivalent to a single frequency component with a complex (as opposed to "simple") amplitude envelope. so you won't wanna throw the amplitude information away.
> Pitch detection in this case is particularly > hard because phase tracking may be undefined.
look at the paper. *all* harmonics, including the first harmonic, are measured relative to the reciprocal of the period. if that is off by a *little*, all that means is that the phases of the harmonics move in time and you can still determine the exact frequency by differentiating the phase with respect to time and using that to change the frequency from its exact value. r b-j
Robert Scott wrote:

> On Tue, 09 Mar 2004 17:03:24 GMT, glen herrmannsfeldt > <gah@ugcs.caltech.edu> wrote: > > >>Just to be sure I understand the question, as far as I know each >>piano note has two or three strings that are intentionally not tuned >>exactly the same. Are you also measuring that? > > > No, I am measuring a characteristic of a single string. That > characterisic is called "inharmonicity", and it is the degree to which > the higher-order partials deviate in frequency from the pure integer > multiples of the fundamental frequency. > > > -Robert Scott > Ypsilanti, Michigan > (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
Robert, Relative to its middle ranges, the lowest notes of a piano are about 2% flat, and the highest, as much sharp. To distinguish about a third of a semitone is hard. The actual inharmonicity of any one string is likely to be less than that. If I wanted to measure the natural resonances of any object -- string, bell, Helmholz resonator -- I imagine that I would get a better result by rigging up some kind of continuous exciter than by attempting to analyze an impulse response. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Tue, 09 Mar 2004 13:47:26 -0500, Jerry Avins <jya@ieee.org> wrote:

>...In a properly tuned piano, these strings are >not tuned to the same pitch, but they are close enough so that their >common bridge forces them to vibrate in unison. (A piano so far out of >tune that the strings of a single note vibrate independently sounds >characteristically "hollow".)
Piano tuners are taught to try to achieve the same pitch in all strings of a unison. They never deliberately tune them differently. If there is a difference, that difference is accidental. At least that's what the Piano Technicians Guild says. -Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
Robert Scott wrote:

> On Tue, 09 Mar 2004 13:47:26 -0500, Jerry Avins <jya@ieee.org> wrote: > > >>...In a properly tuned piano, these strings are >>not tuned to the same pitch, but they are close enough so that their >>common bridge forces them to vibrate in unison. (A piano so far out of >>tune that the strings of a single note vibrate independently sounds >>characteristically "hollow".) > > > Piano tuners are taught to try to achieve the same pitch in all > strings of a unison. They never deliberately tune them differently. > If there is a difference, that difference is accidental. At least > that's what the Piano Technicians Guild says. > > > -Robert Scott > Ypsilanti, Michigan > (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
I guess It depends on which piano tuner you talk to. I've demonstrated the effect myself with my makeshift tuning hammer. Anyway, whatever the intent, the result can be measured. A microphone makes a rather noisy pickup for a frequency meter. An electrical pickup near the string's center singles out the fundamental pretty well. I've seen it done, but only at a distance. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Tue, 09 Mar 2004 14:40:18 -0500, Jerry Avins <jya@ieee.org> wrote:

>Relative to its middle ranges, the lowest notes of a piano are about 2% >flat, and the highest, as much sharp. To distinguish about a third of a >semitone is hard. The actual inharmonicity of any one string is likely >to be less than that.
Inharmonicity is important not because of the listener's sense of pitch, but rather because if inharmonicity is not carefully taken into account, there will be terrible beats when octaves are played together. Inharmonicity is automatically taken into account when a technican tunes aurally, but when tuning with an electronic tuning aid, the device must explicitly take inharmonicity into account if it is to produce results as good as aural tuning. That is why I am so interested in accurate measurement of inharmonicity. Furthermore, this is a field operation and must be done quickly, so we cannot rely on continuous excitation methods to probe the resonances as you might in a laboratory situation. We must measure inharmonicity directly from the sound of the hammer hitting the string just once. -Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
On Tue, 09 Mar 2004 18:44:01 GMT, no-one@dont-mail-me.com (Robert Scott) wrote:

>On Tue, 09 Mar 2004 11:58:35 -0500, robert bristow-johnson ><rbj@surfglobal.net> wrote: > >>In article 404dc1d5.1303397@news.provide.net, Robert Scott at >>no-one@dont-mail-me.com wrote on 03/09/2004 08:08: >> >>> I am not interested in the amplitudes of the harmonics at all. I am >>> only interested in their frequencies. Due to the stiffness of the >>> piano wire, the harmonics are not really harmonics, but are >>> near-harmonic frequencies called partials.
Just in case you haven't already been there, the Reyburn Cyber Tuner (RCT) claims to have all this down pat - looks like an excellent tool.. Tony (remove the "_" to reply by email)
Just some thoughts ...

Maybe you want to have high resolution in frequency spectrum ... but
the signal changes during the six seconds ...
Then I think it is better that you get a short Time-Domain signal to
do the FFT, like using 1 seconds signal only. You can try to sample
the signal using a higher sampling rate at the same time.

The thing I assume here is that the sound don't change much during the
one second period, unlike your six seconds signal.

Maybe can do a six-"one seconds signal" FFTs, then see how is the
result.

Just some of my thoughts

Have a nice day.

Regards
smallfriend
Me wrote:

[Practical discussion of an implementation of what I had in mind
all snipped.]

Jim,

Passing a current through the string and sensing its motion with a
pick-up coil is another low-noise way to implement part of this. I would
certainly try to excite and measure the partials separately, as you
propose.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;

On Thu, 11 Mar 2004 11:36:09 +1100, Me <secad@netspace.net.au> wrote:

> > On the subject of tuners, a steady tone might be made by using 2 guitar > pickups and an amplifier. Please note I have not done this yet, but I > expect it would allow analysis to any required accuracy once you are no > longer constrained by decay.
When I was researching inharmonicity I did something similar to this. I used a driven coil to excite the string and used a photodetector to measure the response. I used a computer-driven high-resolution synthesizer to drive the coil. But I did not close the loop to make an oscillator. Instead I merely sweep the region of interest very slowly and noted the frequency at which a peak amplitude response was found. I had to sweep very slowly because the high-Q nature of the system made the amplitude take a long time to settle after each frequency change. (Yes, the changes were phase-coherent.) It took about 30 minutes to accurately map a single string. Fortunately it was a totally automated 30 minutes, so I was off doing something else. The results were very broad graphs of amplitude as a function of frequency. Strings with false beats showed up a having two (or more) separate peaks in the graph. Despite all the precision and long settling times, I think the results were no more accurate that I get now using the analysis of a 6-second sample from a struck note decaying normally. -Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)