Your "detecting a wavelength of perhaps 0.7 cent off" caught my eye,
as the Hammond tone generation is mechanically tied to the 50Hz or
60Hz power frequency, and I don't think the line frequency has ever
been regulated as accurately as 1 cent (1/100th semitone). For
accurate recordings, you'd need to run the organ off a power inverter
with a quartz crystal derived power frequency. Even with that, you're
still not accounting for variations caused by the mechanical
geartrain. I can imagine that has an effect, but not how much.

Here's some info on the US power frequency and its variation:
https://en.wikipedia.org/wiki/Utility_frequency
https://ws680.nist.gov/publication/get_pdf.cfm?pub_id=922663
http://www.leapsecond.com/pages/mains/

Then there's this on the Hammond that you surely already know:
https://electricdruid.net/technical-aspects-of-the-hammond-organ/

On Tue, Jan 1, 2019 at 7:48 PM Frank Sheeran <fshee...@gmail.com> wrote:
>
> Summary
>
> I'm having trouble identifying exact frequencies in what should be an 
> extremely easy-to-process WAV file, as  a first step to doing a harmonic 
> analysis with a Fourier transform.
>
>
>
> Details of Project
>
> I have a file which contains a second's worth of sound of each of the 91 
> tonewheels of  a Hammond B-3 organ in order.  (Hammonds have spinning disks 
> whose edge is fluted in a shape of a desired output sound wave.  This spins 
> in front of a mechanical pickup, which converts that undulating edge into an 
> electronic signal.)
>
> I want to do a harmonic analysis of each disk in turn.
>
> Given the volume of example sounds, I'm hoping for the utility program doing 
> this analysis to be as automated as possible.  I see the first project as a 
> first step towards a utility that will let me conveniently analyze other 
> sounds as well going forward, such as guitar notes.
>
>
>
> Current Status
>
> I'm properly detecting the notes' start and end, with a heuristic of looking 
> for a running string of individual samples less than some threshold.  By 
> experimentation, length and threshold values that work were obtained.
>
> Since the Hammond sounds don't change from beginning to end, except for some 
> instability at the start and finish, I'm taking the middle 80% of each 
> detected note.
>
> I'm currently then scanning that range for an upwards zero-crossing.  I 
> linear-interpolate that starting value, so that if say sample 100 is -.04 and 
> 100 is +.01, I assume the waveform starts at 100.8.
>
> I then keep a running "value under the curve", manually piecewise-integrating 
> the waveform, as I scan forward for more upwards zero-crossings.
>
> For each subsequent upwards zero-crossing, I again linear-interpolate a 
> fractional sample value.  This is possibly the end of the waveform.  I 
> tentatively ask what the "value under the curve would be" up to this 
> zero-crossing.  If the value is close enough to zero, then I treat the 
> difference between this interpolated crossing and the first as a candidate 
> wavelength.
>
> When run on test tones I compose of sine waves at various harmonics, the 
> method succeed to 5-6 decimal places.  The resulting harmonic analysis gives 
> the proper strengths of the Harmonics I put in, and detects the other 
> harmonics at values of -90dB or so.  When allowed to continue on and detect a 
> candidate wavelength in fact twice the actual, the noise floor drops to 
> -195dB.  Three wavelengths
>
> However when run on the Hammond recording, it's detecting a wavelength of 
> perhaps 0.7 cent off.  And this probably accounts for an entire wall of ghost 
> frequencies to be detected as well.
>
> SO........ Am I going about this totally wrong?  Is there a different and 
> better approach to use?  Or do I just need to keep tweaking, such as adding a 
> DC filter, an 60Hz AC hum filter (I see some in an FFT at maybe -95dB), 
> additionally using a low-pass filter before the pitch-detection stage but 
> don't use once I've detected a wavelength, and so on?  One idea I have is 
> that I should use the detected wavelength to select the closest known 
> wavelength (I know the exact frequency of each wheel) but to do so would make 
> the utility program less general-purpose.
>
> Best regards,
> Frank Sheeran
>
> _______________________________________________
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to