Author Topic: Basic waveforms with FM  (Read 8829 times)

SMF

  • Team member
  • *
  • Posts: 43
    • View Profile
Basic waveforms with FM
« on: July 11, 2019, 02:03:30 PM »
Hello all,

so I am the proud owner of a preenFM2 now... And I try to get accommodated with its FM-synthesis (this is not the first FM-capable synthesizer I use, btw...), so I thought it would be fun to do what I have done on many FM-synths before: creating baisc waveforms with FM (saw, tri, square, pulse) to get an understanding of it's parameter-range and response...

But whatever I try I can not even come close to a synthesized 2-OP approximation of a sawtooth-waveform?!? hmm,... The spectrum looks right, so I guess there is some sort of phase-delay inside the operators, maybe?

BTW: just curious, but what was the reason for not using phasemodulation but real FM?

many thanks,
Stefan


SMF

  • Team member
  • *
  • Posts: 43
    • View Profile
Re: Basic waveforms with FM
« Reply #1 on: July 11, 2019, 11:06:25 PM »
hi,

after some further experiments... Could it be that there is a highpass-filter in-between the carriers and the modulators (in-between every modulator-carrier-link... so there should be quite a lot of them)? This could explain the observed phase-shift. And if so, this would effectively implement phase modulation instead of frequency modulation because of using the derivative of the modulation-signal, then.. wouldn't it?

If I'm not missing a point here, wouldn't it be "better" in this case to directly use PM and to save some CPU-cycles by avoiding the HP-filters (maybe to increase sample rate or polyphony or for allowing feedback)?

all the best,
Stefan

SMF

  • Team member
  • *
  • Posts: 43
    • View Profile
Re: Basic waveforms with FM
« Reply #2 on: July 12, 2019, 01:28:19 PM »
Hello again,

I have made a measurement of the preenFM2-output (noise is due to digital amplification to make it fit the simulated data in gnuplot. Despite a 13-16 kHz whine at -60dB -- the OLED? -- the output is dead clean) and compared it to

a) a 3OP-PM sawtooth-approximation without a phase-shift in between the carriers and the modulators

and

b) a 3OP-PM sawtooth-approximation with a phase-shift of pi*0.5

One clearly can see, that (b) is quite close to the output of the preenFM2. The differences -- I think -- mostly come from the frequency response of my audio-equipment which will of course distort the signal a little bit.

This should clarify what I meant with "phase-delay" in the last postings.

To explicitly say this: Both variants (whith and without the phase-difference) absolutely sound the same and have the same spectral distribution. Only the waveform on the oscilloscope will differ from the expected result. So, basically this is nothing to worry about...

On the other hand side: This result makes me really think that it might be a good idea to (maybe via a flag for backwards-compatibility?) switch the preen over to use PM (as most (all??) other "FM" synths do). It's using PM anyways, now...
With this change it would produce the expected waveforms from the various tutorials and it would (most probably) save some CPU-time to calculate...

For me personally it was just irritating. The sound and the flexibility of this nice little monster is outstanding! I love it, so many thanks Xavier!

all the best,
Stefan

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Basic waveforms with FM
« Reply #3 on: August 04, 2019, 10:42:18 AM »
Hello,


BTW: just curious, but what was the reason for not using phasemodulation but real FM?

The reason is that the preenfm started as a simple FM attemp and turned into a synthetiser over time.
I was even not aware at that time that other synths used Phase modulation.
Phase modulation avoid a pitch shifting when cascading 3 operators or more without any CPU impact. And i think that the reason why 80s synth used it.
FM needs a low pass (EDITED :!!!!TYPO <= It's a HIGH PASS) (few HZ) after operators to avoid this pitch shifting.

I don't remember the maths, but PM/FM spectral diferrences should be obvious when cascading at least 3 operators.

Thanks for the nice words...
but i don't have any plan to PM to the preenfm2 ;)

Xavier
« Last Edit: August 17, 2019, 08:41:45 AM by Xavier »

SMF

  • Team member
  • *
  • Posts: 43
    • View Profile
Re: Basic waveforms with FM
« Reply #4 on: August 12, 2019, 05:34:39 PM »
Hi Xavier,

FM needs a low pass (few HZ) after operators to avoid this pitch shifting.

when I read this for the first time (in an older thread), I assumed it was a typo, but as you repeatedly say it's a low-pass filter, I am curious now... because for all what I recall, it is a high-pass filter which is required to get rid of the DC-component of the resulting spectrum in case of FM (PM does get rid of the DC-component inherently)...

So, if you really use a low-pass filter in between the operators, then I assume that it might be used to isolate (integrate over) the DC-component from the signal and then subtracting it from the next modulator-input? If so, then you turned the low-pass into a high-pass in this way...

But I may be misunderstanding what you actually do there.

all the best,
Stefan

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Basic waveforms with FM
« Reply #5 on: August 17, 2019, 08:40:23 AM »
Hi Xavier,
when I read this for the first time (in an older thread), I assumed it was a typo, but as you repeatedly say it's a low-pass filter, I am curious now... because for all what I recall, it is a high-pass filter which is required to get rid of the DC-component of the resulting spectrum in case of FM (PM does get rid of the DC-component inherently)...

Yes, sorry. It was a typo, it's a high pass filter, as you said to get rid of the DC-component.

TanaBarbier

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Basic waveforms with FM
« Reply #6 on: March 03, 2021, 09:55:32 PM »
Hi everybody

I am really interested in this topic. I know I am digging an old thread but if someone has any info, or just want to geek out a little bit on FM vs PM...
How are those two technics so different ?

PM is something like : Pm(t)=a*sin(f*t+b*sin(f’*t))
Is FM like this : Fm(t)=a*sin(f*t*b*sin(f’*t))
Or like this : Fm(t)=a*sin(f*t*(1+b*sin(f’*t))    (So that you still get a sine wave when there is no modulation)
Or something else ?

I get that frequency modulation will introduce a change in pitch because of DC offset (or even a small difference between positive and negative part of the cycle), so high passing it gets rid of that. But what about spectrum, how is it different? I mean sidebands still appear at the same frequencies, don’t they? Are their amplitudes different? Don’t they follow the same Bessel functions ?
I have to say that I don’t think I hear the difference, (the frequency drift being taken care of by the HP), but what is actually different? (Signal looks like phases have been messed with, no feedback etc, what else?)

Any idea, place to look for those kind of stuff?

 A good day to everybody.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: Basic waveforms with FM
« Reply #7 on: March 05, 2021, 09:05:07 AM »
How i see the forumas is
  Pm(t) = a*sin( f  * t + b * sin(f' * t))
  Fm(t) = a*sin( (f + b * sin(f' * t)) * t)

In FM the above operator(s) modulate the frequency, in PM they modulate the phase (as expected ;) )

The DC Offset only occures if you have 3 operators in a row.
A High Pass filter is required on the middle operator.

To hear a difference between PM and FM, you also have to use 3 operators. Each OP modulates the one bellow.
Then the resulting sound will be  different.
I made the maths a long time ago, but i don't remember at all  ::)