Thursday, March 2, 2023

Frequency modulation

While testing filter FM I realised that I needed to know a little bit more about what is actually going on, so here we go. I'll explain things using VCO frequency modulation as it is a bit more intuitive, but the same happens with filter FM.

Linear FM

In linear FM, the change in Lin FM CV is directly propotional to the change in frequency. For example, if a 1V increase in Lin FM CV leads to a 200Hz increase, a 1V decrease leads to a 200Hz decrease - as long as the base frequency set by the (1V/oct) Pitch CV stays the same. 

In other words, if the initial frequency is 440Hz, the output should be between 240Hz and 640Hz. What we hear is close to the average of the two extremes (this moves into the field of psychoacoustics apparently, so this is not an exact science or at very least not something I'm proficient in). The average here, at least with a symmetrical waveform, is 440Hz, so the output stays in tune as we increase/decrease the CV.

BUT: Once you change the Pitch CV, 1V no longer corresponds to a 200Hz increase. However, increasing and decreasing the Lin FM CV will add or subtract the same number of Hz so the average stays the same as the base frequency. Also, the relationship between the modulated frequency in both cases to the base frequency stays the same.

For example - if a 1V Lin FM CV adds 200Hz when the base frequency is 440Hz, adding 1V will add 400Hz (one octave up) when the base frequency is 880Hz (one octave up), and 100Hz (one octave down) when the base frequency is 220Hz (one octave down). 

Linear FM stays in tune both as we change the FM CV and the Pitch CV, as long as the modulated frequency does not reach either 0Hz or the upper limit of the VCO pitch or filter cutoff.

Linear FM is usually implemented by modulating the reference current in the exponential converter.


Exponential FM

With exponential FM,  we modulate pitch as "semitones". If we use a 1V/oct input, and FM CV is, say, +/- 1V, frequency will go between +1 and -1 octave of the original frequency. For example, if the original frequency is 440Hz, the modulated signal will go from 220Hz to 880Hz.

What is the effect of this? Well, what we hear is not the original 440Hz tone, but again closer to the average of the two extreme. In our case this means 220 + (880-220)/2 = 550Hz

If we drop the original pitch by an octave to 220Hz, we would expect an output between 110 and 440Hz. The average is now 110 + (440-110)/2 = 275Hz, which is one octave down from 550Hz. In other words, the modulated output tracks the original pitch.

But what if we change the FM CV? If we go from +/-1V to +/-2V but keep the original frequency at 440Hz, we would now get a range of +/-2 octaves, or from  110Hz to 1760Hz.

The average of these is 935Hz, whereas for the +/-1V FM CV it was 550Hz. The perceived pitch increases. Similarly, if we decrease the CV the perceived pitch drops. As long as the CV range stays the same we're good though.

Exponential FM is usually implemented by mixing the FM CV with the normal V/Oct CV.


Through zero modulation

An exponential FM will always halve the cutoff frequency for every 1V decrease of CV. This means that the cutoff frequency will never reach zero.

For linear FM however, which controls the reference current in the exponential converter, cutoff WILL reach zero. 

Through zero modulation means that we detect when the CV changes polarity, and (at least for a VCO) reverse the polarity of the output. The frequency should be the same as for a positive CV of the same magnitude. In other words, we use the absolute value of the CV for frequency, and the sign to control the output phase. I am not sure how this will work for a filter but it will be interesting to test.

A bit of maths for the linear FM case

The output current of the exponential converter, which linearly controls the VCO pitch, is defined as

I_c = I_ref * e^(-V_b/V_T)

where -V_b is the exponential CV presented at the exponential converter (scaled down from 1V/oct)

Let's call E = e^(-V_b/V_T), giving us

I_c = I_ref * E

Now, say we increase I_ref with a current I_linfm that is 50% of I_ref. We now have that

1.5 * I_ref * E = 1.5 * I_c

In other words, we increased the pitch by 50%

The absolute increase in I_c is 0.5. 


Now, let's double E, going one octave up

I_ref * 2 * E =  2 * I_c

Again, we increase I_linfm by 50%:

1.5 * I_ref * 2 * E = 1.5 * 2 * I_c = 3 * I_c

We have still increased the pitch by 50%, but this time the absolute increase in I_c is 1. In other words, doubling E doubles the effect of changing I_ref. 


Substituting with numbers: Let's assume that E gives us an I_c that produces 440Hz

increasing I_ref by 50% would then produce a 1.5 * 440Hz = 660Hz wave. The change in Hz is 220.


If we double E without changing I_ref, we get an 880Hz wave.

Now if we increase I_ref by 50%, we get 1.5 * 880Hz = 1320Hz. The change in Hz is 440.


Comparing the two, we see that an increase in E makes a change in I_ref span more Hz. We also see that the relationship between the changed pitches - 660Hz and 1320Hz (2x, or one octave between), is the  same as the change in E.


Some sources

https://ask.video/video/fm-synthesis-explored/3-3-exponential-vs-linear-vs-thru-zero-fm

difference between linear and exponential applications: https://modwiggler.com/forum/viewtopic.php?t=52340

Exponential FM vs linear FM: https://gearspace.com/board/electronic-music-instruments-and-electronic-music-production/1100357-exponential-fm-vs-linear-fm.html

Understanding the Differences Between Exponential, Linear, and Through Zero FM: https://learningmodular.com/understanding-the-differences-between-exponential-linear-and-through-zero-fm/

Adding through-zero lin fm to CEM3340:

http://jhaible.com/legacy/tonline_stuff/hj2vco.gif

http://jhaible.com/legacy/tonline_stuff/hj_modul.html

SSI2130 VCO with TZFM

https://www.soundsemiconductor.com/downloads/ssi2130datasheet.pdf

SSI2130 TZFM control circuit


The SSI2130 has built-in time reverse that changes the direction of the waveforms. This little circuit both outputs the absolute value of the lin freq FM and a control signal for the direction control ("time reverse")

No comments:

Post a Comment