Showing posts with label Exponential FM. Show all posts
Showing posts with label Exponential FM. Show all posts

Friday, August 1, 2025

Improved CV inputs for VCO

As mentioned earlier, I'm not satisfied with how the VCO CVs work. Noise on the CV probably has a higher effect on the pitch than necessary. Here are my current thoughts on how to improve this:

First of all, move all summing resistors to the VCO board. This requires an additional pin for separate pitch and exponential FM input.

Second, reduce the Pitch CV resistor from 39k to 100k

Third, add a second pitch CV, also with 100k input, but make sure the CV is inverted (and 5V added to it) after it is generated. In this case, any noise present on Pitch CV 1, will be negated by the same noise on Pitch CV 2. Again, this requires an additional pin on the VCO board.

I'm pretty sure adding two extra pins here are possible, especially when removing the two resistors to the left of the top square (moving them to the VCO board).

 

The two 15p CV headers on the mainboard and the CV generation board can be replaced by 32 pin ones, like this female one:

https://jlcpcb.com/partdetail/XKBConnection-X6511FV_32C85D32/C2883749 


NB:

I am not sure how this is affected by noise on the ground plane, and how the VCO is affected by ground plane noise - because, if the noise is present at the ground plane (as seen by the VCO) but not on the CV generation board, the CV value will fluctuate, and vice versa. If it is present both places, I'd assume it would cancel out, but I'm really not sure about this.

Also, when adding 5V to Pitch CV 2, I need to think about how noise would affect this as well.  

Wednesday, April 24, 2024

VCO testing again

I need to test the range of the CEM3340 based VCO with various pots at their min/max and also replaced with resistors or just leftout.

The pots in question is

- Osc scale trimmer, located on the board

- HF tracking trimmer, external. The Prophet 5 does not use this

- The 500k CV input offset trimmer. The reference design uses a 360k here, the P5 uses a 357k.

 

Now, for some reason there is a lot of noise on the board outputs (the CEM itself is clean), but even so I am able to measure the frequencies.

Update: The noise is still there when switching to a different VCO PCB.

 

For all tests, unless specified, I'm running with

360k resistor instead of 500k pot

HF trim center (5k/5k)

27k CV input, meaning the CV should span 18.5 octaves if perfectly tuned (and if that's supported by the VCO, which it isn't).

A cold VCO, i.e. turned on briefly to measure but otherwise off. 

PS: My resistors are to 12V, not 15V. Also, I have a 1M5 hardwired to -12V so basically the same as the Prophet 5 (though that uses -15V)


Test 1

Osc scale trimmer (10k) fully counter clockwise

Max period: 264ms (0V): 3.79Hz

Min period: 28.4uS (2.8V): 35.2kHz

Test 2

Osc scale trimmer aprox center (so around 29k to -5 from pin 1)

Max period: 492ms (0V): 2.03Hz

Min period: 28.2uS (3.6V): 35.36kHz

Test 3

Osc scale trimmer fully clockwise: (10k top, 0k bottom, so 24k from pin1 to -5V)

Max period: 650ms (0V): 1.54Hz

Min period: 28.4uS (4.5V): 35.2kHz

Test 4

Osc scale trimmer fully counter clockwise

HF trim trimmer fully counter clockwise (0k left to summer, 10k right to HF tracking)

264ms / 3.79Hz

28.4uS at  2.78V CV

Test 5

Osc scale trimmer fully counter clockwise

HF trim trimmer fully clockwise (10k left to summer, 0k right to HF tracking)

265mS / 3.79Hz

28.7uS at 2.6V: 34.8kHz

Test 6

Osc scale trimmer fully clockwise

HF trim trimmer fully counter clockwise (10k left to summer, 0k right to HF tracking)

649mS / 1.54Hz

30uS at 4.8V: 33.3kHz

Test 7

Osc scale trimmer fully clockwise

HF trim trimmer fully clockwise (10k left to summer, 0k right to HF tracking)

656mS / 1.54Hz

31.1uS at 4.1V, not possible to get lower: 32.2kHz

Test 8

Osc scale trimmer approx center

HF input directly to GND

457mS / 2.19Hz

 28.7uS at 3.8V, 28.4uS at 5V: 34.8kHz

Test 9

Osc scale trimmer fully clockwise

HF input directly to GND

VCO has been on for a bit

4V gives 20.8kHz 

Then

51.8uS = 19.3kHz (not sure if I changed the CV so not very informative)

29.8uS is max = 33.5kHz

 

Test 10+

After staying on for at least 30min

656mS / 1.52Hz

29.2uS max

4V gives 52.27uS so 19.1kHz

Little change from intitial, cold masurements, still tunable over full range.

Then fully counter clockwise osc scale trimmer: 

263mS, exact same as with cold VCO.

 

Conclusion

I may just go without HF tracking (connect to GND) and shorting bottom two pins of Osc scale pot - or use a 10k for higher precision tuning at the sacrifice of lowest possible note. All options seem to allow for plenty of digital tuning.

 

Update: Resistor instead of Osc scale trimmer

I did some measurements over the full range of the oscillator, first with the trimmer at its maximums, then with three different resistor values. For each, I calculated an "expected frequency", setting the measured frequency closest to 440Hz as 0, then I calculated an error as 100*(expected - measured freq) / expected.

Error with pot at extremes (blue and red) and then with a 3.9k resistor (breakdowns are when we reach the max VCO frequency of approx 35kHz)

Error using three different resistors

 

The best result was reached using a 2.7k resistor for a total of 26.7k between input and -5V. As the graph shows, we are within around 5% of the correct value and it fluctuates around 0, so I don't think we can get any closer. All measurements are done by manually setting the CV and measuring ms as the distance between two tops in Logic2, so there is a significant source of error there as well.

What I DONT know is if this is if this is consistent between VCO chips and VCO PCBs, so perhaps its best to keep the pot. If I decide to redo the PCB though, I think I'll go with a fixed resistor here.

Update: Double capacitance

I had forgotten that the VCO PCB comes with an on-board cap, so the external cap is not necessary. This means that all measurements above are for a 2nF cap instead of a 1nF, meaning the frequencies measured are half of what they will be with a 1nF cap (but not sure what the max frequency will be)

With a new AS3340 and only one 1nF cap, the lowest frequency is 185.3ms = 5.4Hz. Max is 15.2uS = 65.79kHz. The tracking with a 2k7 resistor is similar to the 2nF version and also similar to that of the other AS3340 which is good. There is a difference of around 3% (2Hz vs 2.7Hz) for the lowest frequency between the two devices though.

The tracking is similar, 1uF may even be a tad better - but the frequency range is different (2Hz to 32kHz with 2uF, 5.4Hz to 66kHz with 1nF)

Range

Both VCOs top out at 3.25V CV.

With a 2nF cap the range is 2 to 32kHz. The bottom is 2-3 octaves lower than necessary unless the VCO is used as an LFO.

With a 1nF cap the range is instead 5.4Hz to 65kHz which is at least one octave more than necessary on the top of the range.

The higher the range of frequencies covered by the CV, the less accurate the CV will be. Noise will also affect the CV more. Thus, we should try to keep the CV within the usefull range while still allowing room for trimming.

Since the lower range is at 0V CV, we'd have to mix in an offset to rise it. As for the top, we can replace the 25k input (which gives a theoretical range of 20 octaves) with a smaller one.

Let's say we want a useable range from 20Hz to 20kHz. And then we would like an additional octave at top and bottom for tuning. Thats 10 usable octaves plus 2 for tuning. 

With a 100k 1V/oct summing point we get 10uA per octave. 12 octaves needs 120uA, and to get this from a 5V we need a 5V / 120uA = 41.67kOhm resistor. Using a 39k resistor gives us 128uA (or 12.8 octaves). 33k gives 151uA (or 15.1 octaves).

Either of these may be fine, it all depends on how much the VCO drifts.

A quick test with a 39k resistor gives a range of 5.4Hz to 38Hz as expected. 

Adding a 470k resistor between a 5V reference and the CV summing point rises the bottom to 11.5Hz and puts the top at 66kHz. I think this is a good compromise.

Update: My reference voltage is 2.5V, not 5V, so using a 270k resistor instead is better.

Sync

Connecting a function generator to the VCO sync inputs, I got the following:

Hard sync is only triggered on fast falling edges. This means that the input must either be a pulse or a rising saw. Double check what the DCO outputs!

Sync is triggered on the falling edge of the input square wave

 

CEM Hard sync

expected input (bottom) and effect on saw wave (top)

CEM Hard sync is currently not working very well, but I found this post http://atosynth.blogspot.com/search/label/VCO saying I had the same problem earlier and that adding a 1nF cap in series with the input may fix things. Anyway, my experience is this:

For positive going sync pulses (with PWM making the positive going part 10%), the "neutral"/ 0V part must be less than -0.66V (which is eerily similar to one diode drop). 

Top is triangle output, the small dips are the classic CEM hard sync effect of positive going pulses. Zero must be around -0.7V
 

If I drop the lower level to less than -1.63V it stops working again. But - if I reverse the pulse so the 10% part is the one dropping, and set the MAX value to <-0.66V, it starts working as it should again.

Negative going pulses, zero must still be about -0.7V negative for things to work

Adding a 1nF input cap to the cem hardsync input

That fixed everything, now it looks like this, given a square wave input




Frequency modulation

Exponential FM through a 100k resistor works as expected, giving a +/-5 octave FM if VCO is trimmed properly.

Exponential FM

 

Linear FM did not work out of the box. If input is < -1V through a 120k resistor the output flatlines, I had this in my design and it does not work. So what DOES work?

Linear FM, VCO flatlines when FM input is too low

 

About linear FM in the CEM3340 manual: 

The input resistor should be selected to produce a current equal to +/- the reference current when the max input signal is present. 

The reference current is set using R_r. In the datasheet, the reference current is 15V / 1M5, or 10uA. Since I'm still using a 1M5 resistor but elected to use a 12V supply instead, I have ended up with a 12V/1M5 = 8uA reference current.

R_r is the reference-setting resistor

 

In the original circuit, the linear FM input resistor is set to 1M. To get a +/-10uV input here would mean the input would have to be +/-10V.

For my oscillator, the linear FM input will be max +/-5V, and I need to match a 8uA current. U/I, or 5V / 8uA = 625kOhm, which means I should use a 470k and a 150k resistor in series.

Linear FM with a 620k input resistor works fine.

 

One more thing - I want to be able to do linear modulation with CV. I therefore have to sum the input before 620kOhm input. Also, the CV is 0 to 5V when it should really be -5 to 5V. Thus, I should set CV gain to 2 and subtract 5V to center it. But the 100nF cap at the lin FM will filter out any DC component, so centering does not do anything. Instead, the CV from the CV generator should stay at 2.5V when not in use. It must also be amplified to 0-10V. That way it stays at 5V when 'idle' and can drop by 5V when in use.

PS: Slow moving lin FM will not be possible.
PPS: Centering the CV won't do any harm, it just won't do any good either, except keeping the lin FM input a bit further away from the rails when summing with another input.

Also - If I use a normal inverting summer, the CV will be reversed. This can be fixed digitally. The analog input will also be inverted, but I don't think that's an issue.

Noise issue

The noise is present on the frequency CV as well as on the output



The CEM saw output is completely clean, so the noise is introduced later

The same noise is present on the -5V reference voltage, with an total offset of around 25mV.

The noise on the -5V line is not affected by the oscillator frequency

The noise on the 

Changing the reference op amp did not change anything

Connecting the scope to the output through a 1k resistor has no effect.

The noise is 80kHz

Buffering the output does not change anything.

The noise is present on the CV even when not connected.

The noise is not present on the 5V reference, but it is present on the -5V/Vee input. Replacing the inverting op amp does not change anything:


When removing the VCO PCB from the breadboard, the -5V stabilizes and the noise disappears from the CV:


Something weird is going on. While tweaking the frequency CV, for a brief moment, the noise disappeared. This happened a couple of times. At the same time, the CV has stopped working after I put the PCB in the wrong position on the breadboard. Very strange.

Oh, but now something happened. Instead of tapping -5V directly from the inverting op amp, I buffered the voltage in a second op amp. Now the noise is gone! (Offset is still wrong though. Perhaps the CEM wave outputs are too low when not running from 15V?).


CV input seems dead though. I need to try a different AS3340 chip but I can't find them...

Noooo! The noise is back! But unplugging and plugging back the -5V made it go away again. Something is ringing.

But when moving the probe from triangle to saw output, noise came back. 

Ooh, touching the summing point of the 5 to -5V inverter op amp makes the noise come back (touching the other side of the feedback resistor doesn't.

I think that, in any case, I should reconsider using an op amp for the negative supply here!!! I'm actually embarrassed I ever did.

Wave amplitude and centering

The output from the CEM is 0 to 8V for saw and 0 to 4V for triangle:


The datasheet says 0-10V for saw and 0 to 5V for triangle. In other words, using +12V instead of +15V has reduced the amplitude by 20%, which screws up my centering and amplification. D'oh.

The output from the pcb is -3 to 5V for saw and triangle, -4.4 to 4.8V for square. Unfortunately, since we're using the 0-crossing of the triangle for pulse width generation, the pulse width is also wrong.


Fixing it:

- Ok with positive summer but must have high input impedance. Same when using saw for pwm


Running the CEM3340 from +/-12V instead of +12/-5V

The CEM3340 datasheet uses a 820Ohm resistor from pin 3 to -15V. This works with my version as well (and the hard sync transistor may be connected to -12V instead of -5V without any issues).

However, I had a hard time getting the oscillator to track - I increased the 2k7 resistor on input 1 all the way to 22k (=22k+24k total), and while this made things better, I just couldn't get back to the 1V/oct expected. To stop wasting time I've decided to go back and use a 79L05 to generate -5V on the PCB itself.

However - this gave an unexpected error. Without a 100nF cap on the 79L05 output, the CEM just would not start oscillating!

With -5V from an inverting op amp, it works:

Red is saw out, orange is -5V from op amp

 

With a 79L05 without a cap on the output, the CEM3340 just doesn't start oscillating:

Red is saw out, orange is -5V directly from 79L05 (without a 100nF cap to gnd)

Adding the cap makes the CEM3340 start as it should

Red is saw out, orange is -5V directly from 79L05 (WITH a 100nF cap to gnd)

Final values

After a lot of measuring I've ended up with the following values:

- 5V negative PSU (79L05)

- 39k CV input resistor 

- 2.7k + 24k tracking resistors (Though a pot may still be a good thing)

- 270k to 12V pitch offset resistor


With these params I'm able to get 12Hz to 20kHz, 20kHz is at a little more than 4V CV so still room for tuning.

I tested two different AS3340s, and they differ slightly in both tracking and base note (CV=0) so it may still be necessary to use a trimmer in place of the 2k7. 

Tracking is pretty similar

Frequency is fairly even too

Actual values


Tracking with a 25k CV input resistor, 0.25V gives almost exactly 2 x frequency, meaning 1V/octave at 100k is pretty accurate.

Sunday, February 11, 2024

FM and tracking

Just a quick thought about filter frequency modulation and tracking.

Since I've removed tracking-tuning and do CV lookup instead to get good filter CV tracking, FM may be an issue. 1V of exponential FM may not be 1 octave up anymore. 

However, I assume that the tracking across octaves will be pretty much stable, at least within the middle ranges. If for example +1V increases the pitch by 0.8 octaves (instead of the correct 1 octave), -1V should reduce the pitch by 0.8 octaves. This means that tracking correction can be done in the FM VCA. Also, this means tracking VCA should have a range > 0-5V.

As for linear FM, that changes the exponential converter's reference voltage and that is unaffected by the tracking pot anyway, so no issue there.

Tuesday, March 7, 2023

Filter FM and a dash of VCO linear FM research

It's time to hook up the FM inputs on the low pass filter.

I have an option to use both linear and exponential FM.

The most common option is exponential (v/oct) as this is readily available by mixing oscillator output with filter cutoff CV.

I found a nice post earlier about the use of both types but cannot find it right now, but here is a thread about linear FM at least:

https://modwiggler.com/forum/viewtopic.php?t=119415

FM off

I did initially design the FM input with two SPST (on/off) switches. This allows me to disconnect the input completely, as I was unsure how far down I could get the VCA to go.

Now I've done some calculations:

At 0V, the VCA has -80dB attenuation. That means that a 5V input signal would give a 0.5mV output.

If we've set the modulation to 1V/octave, 1 semitone would be 83.3mV, in which case 0.5mV = 0.6 cent. The input is bipolar (+/-5V) so the total change is 1.2cents.

For VCO tuning/tracking, I've assumed that a relative pitch change of about 3cent is at the limit of human hearing - and that's for VCOs. I think it is probably quite safe to use the VCA as a switch in this case. 

That leaves me with two options 

- either I use a DG413 as an SPDT switch, switching between lin and log - that saves me a single digital control signal. 

- or I use only exponential FM, in which case I don't need a switch at all.

I am currently breadboarding this. Both lin and exp FM works fine, but +/-5V linear FM seems to saturate something so the wave is cut off in some way. I will do a recording of it and add soon. Then I have to simulate the same to see what is actually going on. If I cannot make it work well I will just go for an exponential FM only.

Filter out: DCO1 is filtered, DCO2 modulates filter cutoff. Before red line: Linear FM, after: Exponential (v/oct) FM


Self resonance and exponential FM settings

Self resonancce and exponential FM output

Self resonance and linear FM output



Observations

Lin FM makes the filter "flatline". when the CV (DCO2) is low enough, the filter reaches a zero Hz cutoff, but the CV still goes lower, meaning the cutoff stays at 0Hz for some time - the filter does not support "through zero" modulation. 

PS: The output flatlines when input CV is positive, this is because the reference current is negative and any positive cv "negates" the reference current. Once the sum reaches 0 we cannot go any higher and the output flatlines.


Linear FM: When DCO2 is above a certain level,  the output "flatlines", presumably because cutoff reaches 0Hz before DCO2 reaches its peak.





Some measurements of linear FM CV vs I_abc

I_ref without any modulation is -12V / 1.2MOhm = -10uA (NB: mislabeled as -15V in captures)

With a +/-5V CV and a 120k input resistor, we will get 5V/120kOhm = 41.7uA, or approximately +/-4x the original I_ref. But since we cannot use an I_ref > 0, we get a flat line when the input from the linear FM CV reaches +10uA.


Cutoff CV: 0V, Lin FM CV: +/-5V


Cutoff CV: 2.5V, Lin FM CV: +/-5V


Cutoff CV: 3.5V, Lin FM CV: +/-5V


Cutoff CV: 4.5V, Lin FM CV: +/-5V


In my simulation I have written that we should use an input resistor that is approximately 10x the one used for the reference current, as that is what Yusynth.net uses for his VCO. That is not true.

Yusynth generates his reference current from a 5V source through a 1M resistor, giving a reference current of 5uA. For the linear FM input, he uses a 100k resistor, so a +/-5V input gives a +/-50uA output, which is 10x the normal reference current.

I, on the other hand, has used a CV that gives 4x reference current.


Cutoff CV: 0V, Lin FM CV: +/-5V, but this time we use a 50k lin CV input resistor


Calculations

To get a better feeling of the lin FM range I've done some simulations on the filter circuit. Here is the Frequency CV vs cutoff frequency vs I_control vs A/Hz (through a single cell):

1.0V:    10Hz    259nA    25.9nA/Hz

1.5V:    37Hz    1.03uA    27.8nA/Hz    

2.0V:    150Hz    4.18uA    27.8nA/Hz

2.5V:    604Hz    16.4uA    27.15nA/Hz

3.0V:    2.3kHz    63.6uA    27.7nA/Hz

3.5V:    8.2kHz    223uA    27.2nA/Hz

4.0V:    22.4kHz    639uA    28.5nA/Hz

4.5V:    42kHz    1.3mA    31.0nA/Hz

1.3mA is the highest possible value before we reach a flat top.


If we disregard the first and the last two (>= 4.0V) as we already know that they are not tracking that well, we get an average of 27.5nA/Hz


From my previous work I have that: 

R_linfm is often selected so that I_linfm = I_ref when linfm CV is at its highest (often 5 or 10V), which means that the frequency can be modulated by +/- 100% (the reference current will be between  0V and 2 * I_ref).

This is only true as long as we do not use through zero modulation. 

Also, looking at the Yusynth VCO with its 10x FM, this is clearly not what everyone does.


What are others doing. VCOs:

Rene Schmitz: 

https://www.schmitzbits.de/vco2.html

VCO 1-3: 15V / 1M ref current, 5V / 220k lin FM (15uA vs 23uA, ca 1.5x mod)

VCO 4 (TZFM) 15V / 470k ref current, 5V / 220k lin FM (32uA vs 23uA, or 0.72x mod)


Yusynth VCO

https://yusynth.net/Modular/EN/VCO/index.html

5V / 1M ref current, 5V / 100k lin FM (5uA vs 50uA, or 10x mod)


CEM3340

Pin 13 on the CEM3340 is the reference current summer. The datasheet has a 1.5M resistor to 15V and a 1M + 0.1uF cap to lin FM. In the last paragraph of the datasheet it says "The value of the input resistor should be selected so that the maximum peak to peak input signal produces a plus and minus current equal to the reference current". This is exactly what I have written in my own research on VCOs, so I guess this is where I got it from (?).

15 / 1.5M ref current, 5V / 1M lin FM (10uA vs 5uA, or 0.5x mod. Or, could it be they expected a +/-10V lin FM CV? In that case they follow their own doubling rule.


Ian Fritz

https://ijfritz.byethost4.com/sy_cir2.htm

6.9V / 690k ref current, 5V / 100k lin FM (10uA vs 50uA, or 5x mod)

https://ijfritz.byethost4.com/sy_cir16_teezer.htm

Hard to tell as lin FM is done differently


MFOS

https://hackaday.io/project/47158/gallery#ecedc0e5555ada3907345e3c0c4cda3d

A bit hard to tell, lin FM enters through the middle of a voltage divider??

12V / 1M ref current, 5V / (1M || 100k) lin FM (1M til summer) 


JJ Clark

https://electro-music.com/wiki/pmwiki.php?n=Schematics.XR2207VCOByProfessorJamesJClark

12V / 68k ref current (!), 5V / 10k lin FM (176uA vs 500uA, or 2.8x mod)


Thomas Henry

https://electro-music.com/wiki/pmwiki.php?n=Schematics.ACD4046BasedVCOByThomasHenry

15V/1.5M ref current, 5V / 100k lin FM (with AC/DC switch) (10uA vs 50uA, or 5x mod)


Lots of VCOs here: 

https://electro-music.com/wiki/pmwiki.php?n=Category.VCO


Ken Stone CGS48 VCO and VCF-ish thingie with built in VCO

https://electro-music.com/wiki/pmwiki.php?n=Schematics.Bi-N-TicFilterByKenStone

https://sdiy.info/wiki/CGS_VCO

15V/150k ref current, 5V/100k lin FM (100uA vs 50uA, or 0.5x mod)



Linear FM and "amplitude" in Hz

As described in more detail here, increasing the base frequency also increases the "amplitude" of the modulation (if you think about the FM as a bipolar signal). The higher you get the larger the change is. 

So, what to choose

That's the hard question, isn't it... Right now I'm having a hard time understanding why anything more than a 0-to-doubling of the reference current is used on a non-through-zero FM VCO/VCF. Once we go lower than 0 the average frequency starts to drop and the VCO goes flat. I guess that's an effect as well, but why do we want it? And why on earth would we want 10x the input as is the case on the Yusynth VCO? Hmm.... I guess the only way of finding out would be a proper test.

Update: After a little thinking I think (...) I will try this: Select an R_linfm that gives a I_linfm that is 4x the reference current. That way I can just divide the CV by four (= shift right 2) to get an I_linfm equal to I_ref, meaning that the output of the exponential divider will never be below 0. 

Juno filter FM

Incidently, for the juno filter with a 10uA I_ref, this whould mean a 125k resistor. My current design uses a 120k, which gives a 41.7uA max, or 10.4uA after division by 4. This is very close to the ideal. One could argue that a 130k would be better, making us not quite reach I_ref, but again, it's better to test. It is also possible that a 5V input to the VCAs does not give exactly a unity gain, so 120k, being a standard resistor value, may be good enough anyway.

VCO lin FM

As for the VCO, we have a slight issue. My current design expected a 15V input using a 1.5M resistor, giving a 10uA I_ref. Now, hopefully, I'll be able to tune away the difference, but selecting the proper R_linfm depends on whether I match it with the current design or with a possible updated/corrected design. Anyway, here are the two options:

For 10uA, I could use the same 120k or 130k resistor as for the juno VCF.

For 12V / 1.5M = 8uA i will need 32uA. The correct value would be 156k. The closest standard value is 150k which gives 33.3uA - again, a little high (3.5% vs 4% for the juno filter) but it may work anyway.

Jupiter 6 filter lin FM

This uses the same expo converter as the juno filter. Right now they both use 15V and 1.5M R_ref, giving an I_ref of 10uA. As I've already redone the Juno filter for 12V with a 1.2M R_ref I will probably do the same with the JP6 version. That means that I can use a 120-130k R_linfm here as well.

Moog filter lin FM

The current 15V version has a 1M R_ref, giving I_ref = 15V / 1MOhm = 15uA 

If we switch to an 800k version (or 820k perhaps) for the 12V version, we will keep the I_ref the same.

I_linfm would then be 60uA and we would need an 83.3k resistor.

If we continue using the 1M R_ref, I_ref would be 12uA. I_linfm would be 48uA and we would need a 104k resistor


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")