Showing posts with label svf. Show all posts
Showing posts with label svf. Show all posts

Friday, November 13, 2026

Testing filter fixes

I've implemented my intended fixes on a breadboard and combined them with the two current versions of the SVF and juno filters. 

All voltages noted here is to be read as the +/- voltage of a signal swinging around 0V.
 

Changes 

That should be implemented in the updated software/hardware

Max input 2.5V

Set input to 2.5V max (in reality, the input used during testing was a single square wave which currently has an amplitude closer to 2.2V). In hardware these will be the result of making the output from the pre filter mixer peak at 2.5V. Summing two 5V signals will result in an output of max 2.5V.

No BP Gain

Removed band-pass post filter gain for both cells, and updated AP and notch circuits to take this into consideration.  

Changes to AP and notch circuit when removing BP gain (op amp is still there to keep phase)


Reduced Juno post filter gain 

Gain is reduced in hardware from 100/18 = 5.56 to 100/39 = 2.56. We have measured the output from the Juno filter directly, not post gain, so the filter is expected to clip when its core output is 10.3 / 2.56 = 4.02V

Limit max SVF resonance

Set max resonance to 80% for SVF and also measuring both resonance at 0.51 and 1 for Juno. This is a software change.

Limit max Juno cutoff and/or resonance

Set max cutoff for Juno to 0.68, which gives a self-resonating sine of around 20kHz, this should be the highest audible signal. Higher than this and the self-resonation should go silent for humans (poor dogs though). Tests were primarily done with resonance at 1. If it turns out that we need a higher cutoff we should reduce the max resonance. We've also tested max amplitude with a resonance at 0.51. These are software changes.

 

Testing

Circuit used for testing

I have not used the voice card's input selectors, instead moving wires on the breadboard. All cell 1 and cell 2 outputs are fed through the voice card's LP2 input which has a 47k input gain resistor. To get correct gain for the cell 1 direct I've added 35k (33k + 2.2k) to the breadboard output when measuring cell 1 direct (12dB) signals, making the total 82k.

Software settings for testing

  • Osc 1 Waveform: Square wave 
  • Osc 1 Pulse width: 0.48 for the best 50/50 duty cycle, without this the signal won't be centered properly during peak measurements.
  • Pre filter mixer: All muted except oscillator 1 which is routed to SVF only
  • Filter routing: Series, which routes the output of SVF1 to the input of the Juno filter


Probe placement 

Probes placed at 

  • LP1
  • BP1
  • HP1
  • AP
  • Notch
  • SVF chain (on pre filter mixer, equals SVF output)
  • Juno out (on filter card, before post filter gain on voice card) 


How were measurements done

Measured at SVF chain

  1. Signal through SVF, no resonance, cutoff set at the point where the output is the highest.
  2. Signal through SVF, resonance set at 0.2 (=80%), cutoff set so that resonant frequency is in sync with (has same frequency as) with the signal, generating the highest possible peaks.

Measured at Juno low pass filter output 

  1. 1 and 2 from the SVF, with Juno cutoff set to max, e.g. fully open so that signal passes unchanged through the filter. 
  2. Juno resonance set to 1 and cutoff to 0.68, giving the max "normal" resonance
  3. Juno resonance set to 1 and cutoff set so that resonant frequency is in sync with the signal, generating the highest possible peaks.
  4. Both SVF and Juno resonance and cutoff set in sync with the signal. 

 

How is possible clipping evaluated

For the SVF output, anything not visibly clipping on the scope is fine. It won't clip on the updated voice card either.

For the Juno filter, we take the new post filter gain of 2.56 into account, meaning anything measured to > 4.02V is expected to clip.

 

Results

These are based on the tests above. There may still be corner cases or other effects at different pitch, but it should be an indicator:

  • Nothing clips in the SVF, even with resonance (up to 80%)
  • Nothing clips in the Juno filter, including any tested output from the SVF
  • For a Juno filter with max resonance, only the HP outputs (without resonance) from the SVF may clip very slightly. 
  • A Juno filter with in sync resonance will clip for almost all inputs, but most clipping is very slight. 
  • With both filters at in sync resonance, we will see massive clipping.
  • With a resonance set to 0.51, which still gives a lot of resonance, just not self resonance, the Juno filter won't clip even at in sync resonance.  

Cases to be careful about

When using resonance set to 1 on the Juno filter, high cutoff (> 0.68) may lead to clipping, though this happens at frequencies higher than 20kHz. Most likely, a resonance of less than 1 will be more than enough and reduces the chance of clipping.


Unrealistic cases

- When using max resonance for both filters, and hitting in-sync resonance points on both simultaneously, we will get massive clipping. This is not a very likely use case though.

- Juno resonance should not be set to max in practice 

 

Conclusion

All general cases look good. We may still see some clipping, but limiting the resonance output on the Juno filter to less than 1 may make things even better.

Tuesday, November 10, 2026

SVF, clipping and fixes

The SVF and Juno filters still clip, and that's the last big blocker before ordering more voice cards. This incredibly boring post tries to document everything that clips, what the max input levels are and to answer how we can adress it/what solution to choose.
 

Design goals

 
Here are the goals I've decided on after testing everything
 
SVF: 
  • Unity gain through SVF (needed for chaining)
  • Input: 2.5V max 
  • No clipping with normal input
  • No clipping with in sync resonance when resonance is < 80% 
  • Remove BP gain (to prevent clipping.  NB: removing gain will invert phase and ruin AP/Notch s don't do that!). 
  • Redesigned AP/Notch using non-gained BP
  • Separate board from Moog filter to be able to change it later. 
  • Consider if possible to move AP/Notch on-board 
  • In software: Limit resonance to 80% and change taper law to logarithmic 

Juno:

  • 50% attenuation through filter (needed to prevent clipping resonance)
  • Input: 2.5V max in normal operation
  • No clipping with input <= 2.5V, including in sync resonance
  • No clipping with input < 10V if not using internal resonance (or specifically in sync reso) 
  • Clipping OK if fed for example in sync reso from SVF and using in sync reso internally
  • Keep current phase output to match Moog
  • Move post filter gain on-board (to make adding a soft clipper possible later without changing mainboard)

Pre filter mixer:

  • default to 2.5V max output
  • allow 5V max output if cutting or soldering jumpers, for future-proofing - must put two 100k in series for normal operation, and have solder jumper for one of them to reduce resistance to 100k.

Output mixer:

  • add 2x gain for Juno, to allow making up for attenuation? Default to unity gain in software. May clip when extra gain but that's a choice, not a bug. Can consider doing this with two 47k in parallel and a cuttable jumper to make gain drop back to normal

 

Input should be max 2.5V

This goal massively reduces clipping. It can be achieved either through changing the internal gain in the mixer OR by changing the wet/dry pan CVs. The CV generation is on the main board and unfortunately fixed, if we should change it we would need both to be 0-2.5V and 2.5V to 0, which isn't possible without another HW revision. The on-mixer change IS possible with the new slim version, perhaps even a switchable version could be made.

If doing the change on the mixer, we can increase the input resistors to 200k, or reduce the gain resistor for the two outputs. 

 

Tests

 

Cell 1 

Without resonance 

Tested with a direct input through a 100k resistor, no resonance, full filter sweep:

Max input triangle

LP1: -9.6 to 8.5 in, -8.5 to 9.3 out (but with slight compression)

HP1: -9.7 to 8.5 in, -9.3 to 8.6 out

BP1: -9.6 to 8.5 in, -4 to 5.5 out (no clipping at all)

BP1 gained: no clip either

Max input saw

LP1: -9.6 to 9.4 in, -9.1 to 8.9 out

HP1:-4.9 to 4.7 in, -4.9 to 6.1 out

BP1: no clip, also gain is not possible to measure properly

BP1 gained : -6.9 to 6.7 in, 

Comment: HP is very high above 0 but not very much below. 

Max inputs square

LP1: -9.1 to 8.6 in, -8.6 to 9.1 out. Locks up with too high input!

HP1: -4.3 to 3.9 in, -5.9 to 4.8 out.

BP1: No clipping 

BP1 gained : -6.8 to 6.3 in, -9.3 to 0.8 out (but not proper measurement as no square out)


With resonance at 0 (= full):
- NB: The clipping we see is always at 10V so it may be that it clips in the probes/logic analyzer before actually clipping. Op amp clipping is still fairly close though.

With resonance 

square: 

In general: self oscillation in sync, with freq as low as 4 x base freq, may clip. 

Also, self resonance at base frequency, once started, is unaffected by input amplitude. 

LP1: 

"normal reso": -9.8 to 9.7 in: -4.4 to 4.9 out

"in sync reso": Self reso, in sync, clips slightly. Independent of input signal amplitude

BP1:

"normal reso": -10 to 10 in: -4.8 to 4.9 out

"in sync reso": Self reso, in sync, clips slightly. Independent of input signal amplitude

HP1:

"normal reso": -10 to 10 in: -5.2 to 5.3 out

"in sync reso": Self reso, in sync, clips slightly. Independent of input signal amplitude

 

Saw: 

LP1:  

"normal reso": Self reso clips slightly when at a multiple of signal frequency, is not affected by changing input amplitude. When more than four times base frequency, no clip. For higher frequencies: -9.5 to 9.3 in: -3.5 to 5 out.

"in sync reso": -4 to 3.8 in, -10 to 10 out.

BP1:

"normal reso": -9.3 to 9 in, -2.5 to 2.5 out

"in sync reso": -4 to 3.8 in, -10 to 10 out, very slight clipping

HP1:

"normal reso": Clips when in 'sub sync', four times base freq for example.  

"in sync reso": -9.3 to 9 in, -4 to 3.8 out


Tri

LP1: 

"normal reso": -9.5 to 8.5 in, -2.9 to 1.9 out

"in sync reso": Hard to get a stable error, but clips a tiny bit sometimes when input is -9.5 to 8.5

BP1:

"normal reso": veldig lav output

"in sync reso": Hard to get a stable error, but clips a tiny bit sometimes when input is -9.5 to 8.5

HP1:

"normal reso": -9.9 to 8.5 in, -3.8 to 3 out at most.

"in sync reso": -2.5 to 2.0 in - very hard to get a stable error but clips a tiny amount at almost at any input. 

 

Cell 2 

Without resonance 

Tested with a direct input that has not been through Cell 1. First, no resonance:

Max input triangle to cell 2 through 150k that does not clip internally during normal filter sweep:

LP2: -9.6 to 8.6, out as -5.4 to 6.4 (inverted)

HP2: -9.6 to 8.6, out as -6.2 to 6 (inverted)

BP2: Doesn't really clip visibly but mostly because it never passes a clean triangle 

  

Max input saw to cell 2 through 150k that does not clip internally during normal filter sweep:

LP2: -9.7 to 9.5, out as -5.4 to 6.4 (inverted)

HP2: -8.1 to 7.9, out as -4.6 to 6.3 (inverted)

BP2: Doesn't really clip visibly but mostly because it never passes a clean triangle 

 

Max input square to cell 2 through 150k that does not clip internally during normal filter sweep:

LP2: not possible to see any clipping since output is also completely square. Output stops changing when input is +/-10V

HP2: -7.3 to 7.2, out as -6.4 to 5.3 at start, slants. (inverted)

BP2: Doesn't clip visibly, 10V in is -5.9 to 5.8 out.

 

So, max -7.3 to -7.2 in for a clean signal for all waveforms, that does not clip normally. 

 

With resonance 

With resonance at 0 (= full):
- Clipping is always at 10V so may be clipping in probes

square: 

LP2, BP2: 

"normal reso": -5.3 to 4.9 passes 

"in sync reso": -3.9 to 3.6 passes 

HP2: 

"normal reso": -5.4 to 5.8 passes

"in sync reso":     -2.7 to 2.4 passes 

 

Saw: 

LP2: 

"normal reso": -6.9 to 6.8 

"in sync reso": -6.7 to 6.6 

BP2:

"normal reso": -8.6 to 8.5 

"in sync reso": 5.7 to 5.5 (a bit unsure about this one)

HP2:

"normal reso": -6.4 to 6.2 

"in sync reso": -4.3 to 4.2 

 

Tri

LP2: 

"normal reso": +/- 10V approx

"in sync reso": -5.5 to 4.8

BP2:

"normal reso":: +/- 10V approx

"in sync reso": -4.4 to 3.8

HP2:

"normal reso":: +/- 10V approx

"in sync reso": -4.9 to 4.3



A possible fix, testing

 

Reducing output of mixer to +/- 2.5 instead of +/-5
 

Testing first with a square wave, -2.7 to 2.34 in

Measuring max output

Cell 1 

LP1

Normal: -2.9 to 3.3

Normal reso: < 5x base self osc: max +/-5V, normal reso -2 to 1.7 max

In sync reso: clips very slightly

HP1

Normal: -6.5 to 6.5 at max normal, but some kind of self oscillation when cutoff is too high

-- This is probably the param to watch, if this does not clip we can perhaps accept that reso clips? 

Normal reso: Up to around +/-6 at extremes.

In sync reso: Clips slightly

BP1

Normal: Around +/-2.5V (Normal with gain: -3.5 to 4)

Normal reso: Around 2-3V (With gain: Up to 8 but never clipping)

In sync reso: Clips slightly (With gain, clips more but still only at sync)

AP: 

-7.9 to 7 - but uses gained BP. Try again with non-gained BP?

 

Cell 2

 Measured at the output of the SVF, before the post filter gain stage. The post gain stage is 100/65 for LP and HP,  100/100 for cell 1 direct and 100/60 * 100/65 for BP

A 150k input resistor is used instead of 100k + 56k during testing, so gain is very slightly different. 

LP1 + LP2

Normal: -1.9 to 1.85

Normal reso: Above sync reso there are still tops up to 8V, but most max out at around 5 and "normal reso" is something like 2.5V

In sync reso: Slight clipping. Below sync frequency the output still high, up to 8.

HP1 + HP2

Normal: -4.75 to 4.6

Normal reso: Up to 8.5 at extremes. Never clips

In sync reso: Clipping starts much earlier than for HP1 alone

BP1 + BP2

Normal: -0.9 to 1

Normal reso: Maxes out at 7.5, more normal at 2

In sync reso: Clips the same places as BP1 but slightly harder

BP1 gained + BP2

Normal: -1.5 to 1.5

Normal reso: Maxes out at 9 but never clips

In sync reso: Clips slightly earlier.

 

Lower resonance

Resonance set at 0.2 in software (which is really 80% since pot is backwards).

Input: 2V square wave. 

Output without resonance: 2.2V


Cell 1

LP1:

Normal resonance: peaks at around 0.8V, flat part at around 0.3V

In sync: 3.2V 

BP1:

In sync: 3.2V 

HP1:

In sync: 3.2V 

 

Cell 2: NB: Raw outputs, no post cell gain: 

LP1 + LP2:

No reso, fully open: 1.5V NB! Means we have to have a post gain that will make in sync output higher!

Normal: 1.5V

In sync: 4.9V

BP1 + BP2 (no BP1 gain, raw output of BP1 fed into Cell 2 through 150k resistor) 

In sync: 5.1V

HP1 + HP2:

In sync: 6.2V 

 

Gain

Gains outside the SVF itself

Post cell 1: 

  • BP 1 gain: 1.47 

Post cell 2 gains are as follows:

  • Cell 1 direct: 1
  • LP 2: 1.54
  • HP 2: 1.54
  • BP 2: 1.67 * 1.54  (67 to make BP 2 unity gain I guess) 

 

Estimated outputs of cell 2 with gain:

LP1 + LP2:

Normal: 2.31

In sync: 7.55

HP1 + HP2:

Normal:  ?

In sync: 9.55 

BP1 + BP2:

In sync, NO additional gain: 7.85

In sync, WITH additional gain after Cell 2: 13.1 - clips massively.

 

In other words, without BP2 makeup gain, all pass fine.

Also, it's highly likely that a normal output will never clip in a (modified) Juno filter. In sync resonance will however likely clip. 


BP, AP and Notch with no extra gain

To prevent clipping, we reverse the additional gain for the BP output. That also requires changes to the AP and notch circuits: 

The current circuit:

Three resistors must be changed:

  • The input resistor to the BP inverter, R151, must be 100k for unity gain
  • The unfiltered input to the Notch circuit, R148, must be replaced with an 82k resistor
  • The unfiltered input to the AP circuit, R145 and R150, must be replaced with a single 75k resistor 


This leads to an approximate change of approximately -3dB for the BP/AP and notch outputs.  

 

Juno

 
Version 1.1.1 of the voice card has a Juno output gain of 100k/18k = 5.56, as the filter itself attenuates the input to 1/5. 
 
NB: version 1.1.3 of the voice card has changed the output gain circuit: output has a 100/39 = 2.56 gain op amp, so gain through the filter is at 0.5 (NB! Also inverts signal). This means output of core must be around 4V (10V/ 2.56) to not clip, including the in sync resonance. Previous measurements showed that in sync reso could get up to 6V, meaning it clips. This must be retested with a 5V and 2.5V max input.
 
Also, this means that even with a lowered input, we still need to attenuate both SVF and moog to match juno. 
 

Output before post gain:

 

Max input 

square: -1.6 to 1.7 at input of filter, -0.25 to 0.42 at juno output, would be 1.34 to 2.3 after post gain.

Can't get higher than 4.4V in from mixer. Will try chaining.
 

Things that may still clip, at least with 5V input

- 12dB HP filter chained through Juno if juno has resonance turned on - 12dB SVF filter outputs peaks at around 2x input. A 5V signal in will give 10V peaks around the cutoff frequency. This will appear at the Juno input which expects a max of 5V, and will likely clip there.

- SVF: Self oscillation with frequency same as signal base frequency will clip no matter the input amplitude (Cell 1 at least, and at full resonance. Lower resonance and 2.5V input does not clip.

 

Thoughts

 

If reducing to 2.5V max out of mixer, normal input to juno will also be 2.5V. Since we currently don't allow mixing chained signal with "bus B", whatever ends up at juno is what came out of SVF. 
 
The highest "normal" signal through the SVF is HP1 at 6.5, which after the final gain will be around 10V. This will probably still clip in the Juno filter. Test this.

Would reversing the order fix tings? Reducing input to max 2.5V, then reordering? What is the max out of the juno filter, and how would that affect the SVF? Also, what is the effect of changing the order, sound wise? It would require the juno filter to have unity gain (like it does now), so it depends on what happens if input is max 2.5V.

Friday, January 31, 2025

Filters clipping - current situation and solution

Edit: I've done a thorough testing of the situation here: 

https://atosynth.blogspot.com/2026/11/svf-clipping-and-fixes.html

and suggested fixes and tested them here:

https://atosynth.blogspot.com/2026/11/testing-filter-fixes.html

These fixes will be implemented on the 1.1.3 version of the Voicecard and onwards.

Filter clipping

All three filters clip but some are more extreme than others.

Juno clipping

The Juno filter has a major flaw, it has an output gain stage that clips for anything above 2V out. It outputs 2V from 10V in, which means that all resonance is clipped if it exceeds the max input signal.

JP6 clipping

The JP6 filter clips in the output selector/gain stage, but also slightly internally

Moog clipping

The moog filter clips the least as it has a fairly good soft clipping built-in. The output gain op amp still clips at extremes.


Fixes

I've worked a lot to find the best solution the last few days, and as such has come up with the following approach:

Bus mixer changes

Reduce amplitude from the bus mixer into the filters from max 10V to max 5V. This requires two changes:

- Double the input resistors to the wet/dry amps in the bus mixer, halving the output of the summer

- When turning on serial instead of parallel filters, disable input from sum B. 

- SVF must still somehow have unity gain, if not, chaining input will be too low.

This alone has a huge effect on most clipping, giving double the headroom. 


Reduce the post filter gain

Moog filter

For the Moog filter, this is simply done by using half the CV. It can be done in software for the current version. This stops any leftover clipping in the Moog filter.

Juno filter

For the Juno filter, we add a resistor to the output. This will end up in series with the 18k resistor in the post juno filter gain stage, and reduce the gain. A 22k resistor reduces gain from 5.5 to 2.5. This takes away most of the clipping, though the filter still clips when the resonance oscillation has the same frequency as the input signal. It does however require modification of the juno filter board. This requires some other mechanism, like soft clipping the signal. More on that later.

JP6 filter

For the JP filter, we need to keep unity gain through the filter, so we do the gain reduction in the output mixer. It does not prevent any clipping but is required to keep max levels the same as for the juno and moog filter. This is the simplest solution for now. 

 

Reducing JP clipping

Unfortunately, the JP filter clips very slightly at highest resonance at the point where oscillation is in sync with the signal. This is not easily changed as it happens inside the filter circuit, but it is also the least serious clipping. I will leave it as is for now. It also goes away if reducing the max input slightly, but requires at least another 20% reduction. Perhaps this is best done in software for now.

To prevent other clipping, we have to change the output gain that happens around the output selector. This can be done in two ways: 

- Changing the voice card. This is the correct solution, and should be done for future versions of the card. Gain for all but the BP2 cell is 100/65 = 1.54, so quite a bit of clipping can be removed here. We still may have to add some kind of soft clipping, though. If soft clipping is added, we may choose to reduce the input by the needed 20% and increase the output gain instead to get around the initial clipping.

- Making a drop-in-replacement for the IC56 DG408 mux that halves the output by adding more input resistors. Unfortunately, the maximum BP2 output is 8.6V, and this is followed by a 1.67x gain stage (IC52A) which immediately clips. This cannot be remedied by the card. Instead, we need to reduce the BP2 gain stage to unity by adding an output resistor > 39k (to make the sum of 56k + 3.9k + x = 100k) to the JP6 BP2 output. It may be possible to do with existing JP6 filter cards or we can order new cards with this modification, and use the current version with new voice cards.


TL;DR - these are the needed fixes

- Double the signal input resistors on the wet/dry mixer on the bus mixer board

- (fix the gain error on the bus mixer board)

- Reduce output amp gain for Moog, JP6 and Sines to 50% (in software)

- Set a max resonance for all filters to keep self resonance oscillation amplitude as low as possible.

 

To save the current voice cards

- Add a 22k resistor to the juno output boards (for this version).

- Double the Moog resonance CV somehow, possibly by adding a parallel resistor to the CV input to double the current.

- Create a drop-in for the DG408 JP output selector that reduces gain (and possibly adds soft clipping?)


For new version

- Replace the 18k juno post filter gain input resistor with a 39k one (or rather, move the post filter gain onboard the Juno filter PCB).

- Add soft clipping to the juno filter

- Fix Moog resonance CV on the moog board

- Update the circuit around the JP filter output selector to prevent clipping. May have to add soft clipping.


PS: Self oscillation with a very high frequency (>20kH<) makes what sounds like digital noise. Not sure exactly what to do with it, maybe a lower frequency output LPF would be a good idea.

PPS: There are a lot of weird things happening that may be caused by the ground plane noise from the waveshaper. 

PPPS: Knocking on the breadboard makes resonance wobble. I hope this is just poor connections but fear that some of the ceramic caps are picking it up. We'll see.

Monday, July 29, 2024

New PCBs from JLCPCB - Voice card ++

All new cards. Top left: Bus mixer, VCO and Juno filter. Top right: Moog and Jupiter filter. Center left: Voice mainboard. Center right: 2X waveshaper, FX module and bus mixer angled connector. Bottom: CV board
 
Everything mounted together. Looks a bit Frankenstein-ish but it fits!

Even the Juno filter, sandwiched between the voice card and the Moog/JP6 filter fits. I wonder how hot it will get though.

A true beauty!


Friday, August 18, 2023

Output phase, SVF Cell 1 and 2

Cell 1



LP, BP and HP are in phase with the filter input (which is NOT the cell input, but IS the summing point for feedback).

Notch, however, is reverse before and after the notch point. This means it will not work with feedback. I address this further down in this post.

Allpass is in phase before and after the cutoff frequency, and 180 degrees off at the cutoff frequency. I am not sure if this is wrong and has to be corrected, I need to check the expected behaviour, though I believe that adding AP and dry should give a notch, which is what would happen here as the 180 degrees off at cutoff would cancel out the dry signal.

Cell 2

Cell 2, all outputs are in phase with input


The outputs of Cell 2 (as seen by the mux) is in phase with its input (Holds true for LP, BP and HP, and of course for the Cell 1 direct as this is the same as the input to Cell 2).

The op amp after the mux inverts the signal so the output phase of the filter is inverted. 



This affects both the output itself and the filter feedback. The output phase is selectable so that's taken care of there. The feedback on the other hand, is inverted back in the feedback VCA (positive input + inverting op amp).

Feedback VCA inverts signal

Alternative notch

Combining dry (inverted) and BP (unity gain) can give me notch without having to add another op amp (as described here: http://atosynth.blogspot.com/2019/01/jupiter-6-all-pass-filter.html)


Simulating this shows a big difference in the offness of the notch - green is LP + HP, red is dry + BP.


From the simulation, LP + HP results in a -1.2dB down to -36dB notch. Dry + BP results in -19.5dB.




Measured in my circuit I see approx +/-150mV for LP+HP, though it looks a bit noisy. Dry + BP is +/-375mV.





Also, gain when no notch is a little low:


The output is +/-5V. To boost it to +/-5.5V which is the range of the other waveforms, we can use 56k + 3.9k in op amp feedback, making the gain 1.07

Here is the alternative notch circuit:


Thursday, August 10, 2023

Output levels, SVF Cell 1 & 2

Cell 1

I've measured the output levels of three different circuits for cell 1 of the SVF.

The results are fairly stable, within approx 0.05-0.1V between cells.

Output of LP, BP, HP and Notch are all around +/-5.5V when input is +/-5.0V. 

As I mix BP with input, and the output should be 2 x BP + Input, we have to reduce the input resistor for input to boost it from 5 to 5.5V approx. 

BP output is between +/-5.3 and +/-5.4 for all cards, so gain needs to be between 5.3/5 = 1.06 and 5.4/5 = 1.08 Experimentiation showed that using a 51k and 1.8k resistor in series, combined with the 56k feedback resistor, gave a good result. The calculated gain for this is 1.06.




Cell 2

I did the same for Cell 2, testing device 2, 3 and 4 against each other, and again they match fairly well.

Raw output is around +/-3.4V with a little offset. BP, however, was too low even after the 100k/67k boost and came out around +/-3V. After some experimenting I chose to replace the 67k resistor with 4.7k + 56k, which brought BP up to the same as the others.

The output after final amplification is +/-5.4 to 5.5V which is approx the same as from cell 1. Not sure if I should adjust this back to +/-5V, as the input is 5V, I guess unity gain is a nice feature so perhaps worth the extra work.


Sunday, July 23, 2023

I don't understand how to use AP

Now that the AP is working properly on the JP6 filter, I'm trying to understand how to use it.

Most places say that you should mix it with the original signal, but when I do that I get exactly what I get from my notch:

Red: Notch. Blue: 50% AP + 50% Dry


Sunday, July 9, 2023

JP6 gain through cell 2

In the simulation, cell 2 outputs a +/- 2.6V signal when output from Cell 1 is 4V. This in turn arrives at the output as 3.1V and is overdriven to 4V with a nice rounded shape. 

Now, the output gain feedback resistor is 100k. Let's do some calculations.

LP and HP are tapped through 33k + 47k = 80k. That should give a gain of 1.25, which should give an output of 2.6 * 1.25 = 3.25.

The output of the BP requires a gain of 1.33 in cell1 in the simulation, and 1.5 on the breadboard, to be equal to the LP and HP outputs

That means a total gain of 1.25 * 1.33 = 1.66 (or 1.88 on the breadboard)

Thus, we need 100k / x = 1.66, x= 60k (or 53k for the breadboard).

For the direct output from cell 1, which is at 4V in the simulation, to get it to 3.1 requires a gain of 3.25/4 = 0.81, or a 125k input resistor. 

Now, wait a minute. Gain < 1 is generally not something we do, we usually do it by using a resistor divider. But let's not, let's rise the output level from 3.25 to 4 instead, meaning we only need unity gain for cell 1.

That gives us the input resistor for LP/HP as

gain = 4/2.6 = 1.54, R = 65k

and for BP

gain  = 1.33 * 1.54 = 2, R = 50k (and 1.5 * 1.54 = 2.3, r = 43.5)

Let's see what this does in the simulation:

Well, LP still looks good, at just a tad below 4V. Then, turning up overload to max fivces a slightly more distorted wave, but still cool, and with an amplitude of 5.1.

Now for another check, what happens with a 20Vpp signal. Does it distort?

It definitely does, but that's not because of the feedback, it's just how the circuit works.

We could get around this by using a 200k input resistor instead of a 100k, and then double the gain at the end of the circuit instead. We'll just have to try this to see how it affects both a 5V and 10V signal when doing distortion.

On breadboard

I tried sending a 5V signal through cell 2, and I get 3.23V on LP, 3.32V on HP and 2V on BP, meaning we need a gain around 1.6 for BP. 

To get all up to 5V at the output would require gains of
HP/LP: 5 / 3.23 = 1.54
BP: 5 / 2 = 2.5
and unity.

100k / 1.54 = 65k
100k / 2.5 = 40k

So a combination of 47k and 18k, and 22k and 18k is a good starting point.

Testing: 
LP: Near perfect 5V out
HP: Output is 5.2V, so a tiny bit too high
BP: Damn close to correct.


This means I will try the following for cell 2 in "production":
HP and LP: 47k +18k
BP: 22k + 18k
Direct: 82k + 18k

For cell 1 I will use 56k for everything, but BP is boosted by 1.5 using a 150k feedback and 100k input resistor


Next things to try on breadboard:
- overdrive
- no resistor pre-mux for cell 1
- swap cells to see if they behave similarly
- output vca.
- polaritites for output VCA and overdrive, see if we should modify cell circuit

See "Jupiter 6 filter - no VCA - 12V - JOVE trials -overdrive"



Saturday, July 8, 2023

JP6 All-pass - inverting BP

In my simulations and breadboarding I added an inverting op amp for the input to get AP. But what if we instead inverted BP? It is already 180 degrees off compared to HP and LP. 

I simulated this, and it looks like it works well. Instead of going from -360 to 0 degrees it goes from -180 to 180, which is just to say that the output is inverted compared to the input - just like HP and LP.

As I'm already planning on having an invert button/switch on the SVF this doesn't matter :-D 

It also saves me one opamp.

As for the opamp gain, to keep the gain at 1.48 (or 1.5, it probably doesnt matter too much) we can go with 100k input and 150k feedback, or 68k/100k.

I will try this now.

JP6 All-pass tested

I've breadboarded and tested the AP-filter from my all-pass simulation, version AP-C: https://atosynth.blogspot.com/2023/04/jp6-filter-allpass.html

It only required minor tweaks.

During testing, my BP outputs +/-3.5V and the HP/LP outputs +/-5.2V. I assume that BP is affected the same way HP/LP is by the resonance feedback, so adjusting feedback so that HP/LP are normally +/-5V probably also affects BP amplitude.

Anyway, to get AP we need to mix 2x BP with the inverted input. But the BP needs to be unity gain.

If we assume that unity gain is +/-5V when properly adjusted, it is 5.2 when HP/LP is 5.2. That means that to bring it up from 3.5V to 5.2V we need a gain of 1.48. The simulated circuit has a gain of 1.33 when using a 100k/33k combination. Replacing the 100k with 68k gives us the gain of 1.48 that we want. 

Here is a video of turning the cutoff CV knob, see how the phase changes.




The resulting circuit is like this:


PS: We need to sum everything BEFORE it reaches the filter as we need input both for AP and normal input. But this affects the polarity of the input and probably also the feedback circuit.

PPS: I am not sure how we can use AP/Phasing. Do we need to be able to pan wet/dry to different channels? Should this be an option anyway for filter outputs?


Update: Here is an alternative circuit, the AP output phase is 180 degrees different from the one above but it saves one op amp that can be used to sum stuff before the filter



Thursday, July 6, 2023

JP6 filter oscillations and latch-up

I've had serious troubles with the JP6 filter since I started working on it again about a week ago.

- it latched up whenever the cutoff CV was > 1.5V
- it had severe high-frequency oscillations

Today, I finally got it working again (with the Jove CV generation circuits). Here are the three things I fixed:

- Cutoff and Resonance Iabc has to go to two cells, not only one (or they will be too large)
- I had messed up and used a 3pF instead of a 330pF cap
- And even after fixing that, I realised that the caps were probably not in contact with the connectors. I redid the wiring there and everything started working.

Back to the real testing!

Sunday, June 11, 2023

JP6 vs Jove revisited

As part of getting my JP6 filter working, I thought it would be a good idea to revisit the Jove JP6 filter (https://system80.net/product/jove/, https://github.com/minisystem/JOVE) to compare it to what I'm doing. It is especially interesting to see how the control signals differ, and what their ranges are.

The conclusion is that everything is very similar and my control signals cover the Jove signal ranges - but it is worth mentioning that the cutoff maxes out at around 23kHz on the Jove.

Here are my findings in detail:

Resonance

My simulation doc says the following about calibrating resonance CV:

Tune U30 until you get -125uA Reso I_abc per OTA (or to freq response is OK)

Tune U31 until you get -25uA or -4uA Reso I_abc per OTA (for similar response to 5 or 10V CV on the JP6)

Comparing to the Jove reso circuit, this is exactly what you get from trimmer extreme, -120uA to -4.2uA, so a range of -120uA to 0uA is what we want to be able to trim from software

In the following, the three lines correspond to min, center and max trimmer settings:

Jove resonance - voltage seen at expo converter input

Jove resonance 0-10V - I_abc in single 18k resistor


Jove resonance 0-5V

Jove resonance 0-5V, center trim only

Jove resonance response, 0V but trim min center max


Jove CV response 0, 5 and 10V CV

My own JP6 filter resonance I_abc. It has the same range as the Jove one but is of course not exponential, as this happens in software instead.

My resonance CV circuit

The Jove resonance circuit



Cutoff

Untrimmed, Jove maxes out I_abc at -600uA with a CV of 7V approx.

This gives a cutoff of around 20-25kHz.

The lowest current is -15.6nA


My trimmed version gives 169nA to 1.06mA, max is at approx 6V CV which gives a cutoff at 25khZ, similar to the Jove.

Jove expo converter input vs input CV

Jove I_abc in single 18k resistor

Jove I_abc for center only, shows max I_abc at approx 7V

Jove cutoff with CV 7.5V (center trim)

My version, I_abc from 0-10V CV

My version cutoff at around 6V CV


Buffer

Jove uses a transistor (J112, N-channel FET) as a buffer, with a 33k to gnd. Replacing the opamp buffer in my circuit with a nmos in the simulation gave a slightly lower gain out. Changing the 33k to 22k or 47k didnt affect the amplitude. 


Input vs output of first cell using op amp buffer


Input vs output of first cell using nmos-buffer

N-channel Mosfet buffer, pretty similar to what the Jove uses








Sunday, April 23, 2023

JP6 filter allpass

 Since breadboarding the first cell of the JP6 filter was successfull, it's time to revisit the allpass circuit. I sort of got this working in an earlier post: http://atosynth.blogspot.com/2019/01/jupiter-6-all-pass-filter.html, but had to remove resonance feedback it seems.

I tried the same circuit in LTSpice again, mixing Bandpass output with the input tapped after the input mixer. It gives a nice phase change but the response is -10dB for the "normal" case, up to 4dB at the cutoff frequency, not very usefull. 



I then realised that mixing with the input may refer to the original input, not what is seen after the mixer. However, the input at this point is inverted, so we don't get the phase reversal effect we're looking for

NB: Not original BP but unity gain one


This is easily fixed by inverting with unity gain. Now we're talking. We get a flat response with a -6dB notch and the phase reversal we're after



I started thinking that this could be the best option, but the notch made me uncertain. After a bit of googling, I once again found the multimode filter pages at electricdruid. There, the following is stated: 

"Phase shifters produce a notch in the frequency response by mixing this phase-shifted signal with the input, so technically they’re a type of notch filter." 

Ok, so a notch is to be expected. I then found the link to "Craig Anderton's Multiple Identity Filter" article. I thought for a moment this confirmed my -6dB notch as it says -6dB notch at the end, but I mixed up notch and allpass. It is worth a closer look though.

But then I realised, what if I make sure BP output is the same as HP/LP etc, though my non-inverting amplifier, just as I did with the BP output from cell 1?

That works great!



The closeup doesn't look that great until you look at the axis. The input is just very slightly attenuated (-170mdB). Looking at all combinations together shows that it is essentially flat:

Red line is unity BP + inverted input



Now, this is great news. Of course this is just a simulation, and as I have seen earlier, the actual result on the breadboard is different, but I think I have the best starting point at least - mix the inverted input with the unity gain BP and we get a good all pass version!

Saturday, April 15, 2023

JP6 filter debugging, part 1

 Trying to breadboard a single cell of the JP6 filter. Here are my mods:

Errata:

R to -12V in cutoff CV input is 3.9R, should be 390k

op amp + and - are mixed up in cell input mixer

Modifications:

Skipping the part of reso generator that reverses CV, and leave out trimmers in reso circuit.


I inject resonance CV at reso gain 2 to bypass the inversion, and leave the reso bal unconnected. This makes reso CV go from 5 to 0 instead of 0 to 5. I use a 27k input resistor. (TODO: Why did I do that again? plot in simulation looks good at least. Probably what it was set to before removing the CV reversing and stuff in LTspice).

The cutoff CV mixer has an error (3.9R instead of 390k to gnd), so instead of using it i use the reso input mixer and a 330k to -12V on the input, still leaving balance floating. I then connect the output to a 20k trimmer, set at approx 6k (8k really, but in simulation it is 6k) and connect the output to cutoff track 2, bypassing the cutoff CV mixer.

Reso CV is set to 5V by using a resistor divider - 100k on top and 68k + 3k3 = 71k (should have been 71.4k).

Input to the cell: The input mixer is fucked up here too, I flipped it so + and - are mixed up. I use an external op amp instead, with a 33k feedback and a 100k input resistor. The output is fed to the in+ (pin 2) of the cell.

NB: SOMETHING IS MISSING HERE! pin 4 should be connected to pin 2. Anyway:

Now I can see that all three modes working - LP, BP and HP, though the input is weak and BP never really cuts off much. Next up is re-adding pin 4:

Aaaah, much better!

This time output at LP/BP/HP works. BP has a very soft cutoff slope but it DOES attenuate both above and below somewhat.

With 3.6k input with 5V max amplitude and cutoff CV at 0:

HP outputs 7.1V, BP around 750mV,  LP at -150mV


With 100Hz input, cutoff at 5V:

HP outputs -30mV, BP around 650mV and LP 7.6V

With 100Hz input and cutoff at 0V:

HP and LP are less, BP is at its max, which is 3.5V

Filter sweep, CV 0 to 5V, 1kHz input:




Reso is not tested but at least cutoff seems to work fine :)

HP and LP outputs max out at almost the same level (7.1 to 7.6V) while BP is half of that. In my simulations it looks more like HP and LP are 5V max while BP is around 3.5V.

The fact that BP has a lower amplitude is to be expected. Looking at a simulation, we can see that the bandpass peak (purple) is where the HP (red) and LP (green) meet, as it is really just a combination of the two filters.


If we want to avoid a loudness drop when using BP, we can amplify the output slightly. In this case I've added a non-inverting op amp with a gain of 1 + 33k/100k = 1.33. The result is the blue line above and below.

An added bonus is that we can use the same input resistor (56k and 100k here) to the second cell (we could do this without the gain as well, it only leaves the BP at the low level). We can also tap all filter types after the mux and move the resistors to the mux output.


Update: Tried using a 27k resonance CV input resistor and the 1.33 gain BP op amp, turned out very well. I think I can get away with a single 56k + 100k resistor now.

I also tried the notch circuit, which works as it should.

An interesting thought:

What if we just skip the varying resistors and just make up for it in the VCA/gain section? 



Next up: 

Figure out if we should have the mix resistors before the cell 1 output mux or after, what gives the least amount of noise

See why we tap direct output after mux but before 100k res, shouldn't tapping be before the output resistors? or do we need to buffer the signal between? (Note: The JP6 uses this layout, with one 56k from HP and one from LP, and adds this to the 100k input, effectively using 156k input to the summer of cell 2). 

Check output polarity from cell 1, including notch.