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.