# Re: [music-dsp] Sound Analysis

```

> Thank you Nigel, RB-J, Steffan, and Neil.

>
yer welcome from me.� armchair quarterbacking is pretty easy.

>

>

> i suspect that those tone wheel waveforms are close to sinusoidal.

>>

>

> Early models were. Starting I think around '53 with the B-3, C-3 and A1xx

> series (A100 etc.) they were a bit brighter, and the foot pedals were FAR

> brighter.

>

>

>

>> but to find out from your .wav file, you can apply a pretty simple pitch

>> detection to get the period of the waveform to a precision of

>> fractional sample.? then you can divide that period into N samples using

>> interpolation and resampling techniques.? this is how i would advocate

>> extracting a wavetable from a portion of a note (as opposed to the

>> heterodyne oscillator approach).

>>

>

> Exactly what I've already coded! Curious what the heterodyne oscillator

> approach is, but don't tell me, I'll look it up myself, thx as always.

>
pitch detect **and** resmpling?� as simple as it sounds, there's a bunch of
code in that.
(i'll tell you anyway) the heterodyne oscillator approach is what James
Beauchamp and Andrew Horner and every other author i know of that has done
analysis of musical notes to get the
envelope for each harmonic.� it still requires knowledge from a pitch detector
and then you multiply the note by this oscillator:

� �o[n] = e^(-j 2 pi f/fs n) = cos(2 pi f/fs n) - j sin(2 pi f/fs n)
where fs is the sampling frequency and f is the exact frequency of the harmonic
you're looking at.� this will bump the real and imaginary parts of that
harmonic down to DC.� then LPF both real and
imaginary parts of the result to get only the DC, then calculate magnitude and
phase of that DC value and you have the magnitude and phase of your harmonic at
frequency f.
...

>> And why do you need the _exact_ frequencies?

>>

>

> Only to have the exact wavelength, so I can do a DFT and get the exact

> harmonics from each disk and the amount of leakage.

>
�
right, and if you **do** have a perfectly periodic waveform that goes into your
DFT, then there is no DFT bin leakage, if that is the leakage you mean.
if you mean leakage of other tonewheels into the waveform of interest, that's a
different issue.� maybe you
should mark off 16 contiguous periods (after resampling so it's exactly 16
periods) and FFT that.� then bin 0 is your DC component, bin 16 is your first
harmonic, bin 32 your second, etc.� the bins in between should be virtually
zero and if they aren't, there is something else messing it
up.
�

--

r b-j� � � � � � � � � � � � �r...@audioimagination.com

"Imagination is more important than knowledge."

�
�
�
�
```
```_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp```