Re: [music-dsp] Sound Analysis

2019-01-04 Thread robert bristow-johnson









> 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

Re: [music-dsp] Sound Analysis

2019-01-04 Thread Robin Gareus
On 1/4/19 3:22 PM, Frank Sheeran wrote:
> Hey, if you don't want an actual Hammond, that's why I wrote the entire
> soft synth in the first place!  :-D
> 
> The main reason I'm doing this patch is as a case study showing my soft
> synth can emulate a real Hammond (and Leslie) warts and all, to a very deep
> level, and showing how one would go about it.

Hi Frank,

You may want to have a look at
   https://github.com/pantherb/setBfree
'warts and all' even managed to creep into the source-code there :)

The tonewheels in that case are pure sine waves with -40dB compartment
leakage, -40dB terminal-strip cross-talk and also -40dB for wire model,
but those are configurable (see src/tonegen.c). IMHO it does sound very
realistic e.g. https://vimeo.com/130633814

A related issue, there is a really nice paper analyzing the key-click:
https://asa.scitation.org/doi/full/10.1121/1.5003796

Cheers!
robin
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] Sound Analysis

2019-01-04 Thread STEFFAN DIEDRICHSEN


> On 04.01.2019|KW1, at 15:22, Frank Sheeran  wrote:
> 
> Thank you Nigel, RB-J, Steffan, and Neil.


You’re welcome!
> 
>  
> 
> 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.


Actually, only the wheels #1 -#13 have a sort of complex waveform. But the 3 
series have a slight level slope, the higher frequencies are a bit louder. This 
was a kind of emphasis, which in conjunction with a de-emphasis filter in the 
pre-amp reduced the key click a bit. As a penalty, the harmonic distortion of 
the higher tone wheels is a bit higher. 

> 
> A social network acquaintance supplied me the recording.  I'm not sure where 
> they tapped in to get it.  What it DOES have--and I'm glad of it--is the 
> leakage from the neighboring disk.  The disks are basically all in little 
> compartments of two disks, 4 octaves apart,

There are some wheels with 192 teeth, so the distance is not 4 octaves but an 
extra quint.


> and each disk is picked up by the other's pickup to some extent.  It's 
> absolutely audible, maybe -36dB down or something.

This can be pretty enervating, depending on the organ. Later models had extra 
networks to remove the “sub-harmonic”. 


>  
> 
> The tonewheels are intended to be perfectly sinusoidal, though their mass
> stamping does introduce various differences. The exception is the lowest
> octave of certain models, B3 included, made at certain times, as described
> here:
> 
> My understanding is that the first Hammonds up to the but not including the 
> B-3/C-3/A1xx models, were nearly sinusoidal, but after that they were 
> brightened considerably and that's what I'm seeing in my recording.

This might be introduced by the recording. The Hammond organ is a current 
mixer, the output of the tone wheel and the subsequent filter present on tone 
wheels #49 - #91 runs into matching transformer with a primary resistance < 1 
ohm via mixing resistors , which are  between 30 -100 ohm IIRC, typically 50 
ohm.

>  
> 
> http://www.dairiki.org/HammondWiki/ToneWheel 
> 
> 
> Given the intent of the tonewheel, I wouldn't bother with this particular
> experiment at all if I were trying to recreate a B3.  But then, I wouldn't do 
> any foldback either.


The foldback in the lowest octave was necessary to circumvent the missing 
sinusoidal wheels #1- #13, which had complex wave forms now. 
The foldback in the upper octaves was always there and is necessary to achieve 
the typical sound of an organ with all stops pulled out. 


> 
> Hey, if you don't want an actual Hammond, that's why I wrote the entire soft 
> synth in the first place!  :-D
> 
> The main reason I'm doing this patch is as a case study showing my soft synth 
> can emulate a real Hammond

The Synclavier was claiming that, too. It worked to a certain extent. 

> (and Leslie)

That’s the hard thing, since the Leslie defined the sound much more than the 
organ itself. 


> warts and all, to a very deep level, and showing how one would go about it.
> 
> But it's also well-known that every tonewheel
> organ has its own character due to being a very complex electro-mechanical
> device, so I suppose I might try this analysis if I were attempting to
> create a framework for creating such differenced organs.
> 
> The more modern "clonewheel" organs do let you simulate each wheel's 
> harmonics individually, etc.  In fact I should go look at a Hammond XK-5 just 
> to see if my research is similar to their default settings.

You can adjust the levels but not the harmonics themselves. But even that works 
well. 

>  
> It'd be interesting if a clonewheel manufacturer had an automated service 
> whereby you upload a recording as I requested of my organ acquaintance, then 
> let you download a patch that matched that exact organ.

Since most organ owners don’t have the knowledge nor the equipment how to 
create the recording, I doubt that this might be a great business model. 
Although it is somehow similar to the Kemper amp business model, I’d would 
assume, that most buyers of the Kemper amp are fine with the models supplied 
and shared over the internet. 

Best,

Steffan 


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

Re: [music-dsp] Sound Analysis

2019-01-04 Thread Frank Sheeran
Thank you Nigel, RB-J, Steffan, and Neil.



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.



how did you record the signals? If taken from the TWG terminal strip, they
> contain also a ton of neighbor frequencies, sub-harmonics, etc.


A social network acquaintance supplied me the recording.  I'm not sure
where they tapped in to get it.  What it DOES have--and I'm glad of it--is
the leakage from the neighboring disk.  The disks are basically all in
little compartments of two disks, 4 octaves apart, and each disk is picked
up by the other's pickup to some extent.  It's absolutely audible, maybe
-36dB down or something.  Since the two disks are locked in frequency,
though, I'm just incorporating the partner into the wavetable, so it has
zero performance penalty while playing.  (My synth calculates the wavetable
contents when a patch is loaded/parsed, so it takes an extra few tenths of
a second should you change the leakage coefficient, which will be
user-editable but not in real-time.)



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.


> Happy new year and all the best!
>

To you too, Staffan!


The tonewheels are intended to be perfectly sinusoidal, though their mass
> stamping does introduce various differences. The exception is the lowest
> octave of certain models, B3 included, made at certain times, as described
> here:
>

My understanding is that the first Hammonds up to the but not including the
B-3/C-3/A1xx models, were nearly sinusoidal, but after that they were
brightened considerably and that's what I'm seeing in my recording.


>
> http://www.dairiki.org/HammondWiki/ToneWheel
>
> Given the intent of the tonewheel, I wouldn't bother with this particular
> experiment at all if I were trying to recreate a B3.  But then, I wouldn't
> do any foldback either.


Hey, if you don't want an actual Hammond, that's why I wrote the entire
soft synth in the first place!  :-D

The main reason I'm doing this patch is as a case study showing my soft
synth can emulate a real Hammond (and Leslie) warts and all, to a very deep
level, and showing how one would go about it.

But it's also well-known that every tonewheel
> organ has its own character due to being a very complex electro-mechanical
> device, so I suppose I might try this analysis if I were attempting to
> create a framework for creating such differenced organs.
>

The more modern "clonewheel" organs do let you simulate each wheel's
harmonics individually, etc.  In fact I should go look at a Hammond XK-5
just to see if my research is similar to their default settings.

It'd be interesting if a clonewheel manufacturer had an automated service
whereby you upload a recording as I requested of my organ acquaintance,
then let you download a patch that matched that exact organ.

Thanks again, all.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp