Showing posts with label AS3360. Show all posts
Showing posts with label AS3360. Show all posts

Saturday, March 13, 2021

AS3364 quad linear VCA

Since I want direct control of my VCAs I consider using linear VCAs instead of the exponential quad x2164. 

Alfa Rpar has come out with the AS3364, a quad version of their CEM3360 clone (AS3360). It drops the exponential input in favour of more VCAs in the same package.

One very unfortunate thing about the 336x is that it cannot be run from a +/-15V supply, which is what I intended to run my synth on. Now, I am considering switching to +/-12V anyway since it may save some power, but still.

Anyway, synths from the 80s, like the OB-8, used the CEM3360 with a +15V Vcc rail. As the chip can have a Vcc-Vee = 26V at max, they used Vee = -5V.

What I wanted to find out was how this affected the signal, especially, would the voltage still swing around 0V?


I breadboarded this tonight, and read the datasheet. The chip has a Vref connected to ground via a 100Ohm resistor and a 5nF cap, I presume that is for centering. 

Here is what I figured out:

  • The voltage swings around 0V even when Vcc and Vee do not have the same absolute value.
  • The maximum swing is to within 1.5V of each supply rail, so with a +15V down to -5V the lowest the VCA can go is -3.5V, anything after this is cut off. 
  • The chip can be run at +15V/-9V, so a 18Vp-p signal is still possible.
  • CV range is 0 (-80dB) to 2V (unity gain). Absolute max VC is 2.5, so be careful!

When connecting the output (as configured in the datasheet) directly to my scope, I saw quite a lot of low pass filtering on the output (but later testing showed that this went away when attaching a non inverting buffer).

I then connected the output to the negative input of an opamp, and put the 47k resistor as negative feedback. This got rid of the LP but introduced a lot of ringing/overshoot. This was removed using a 33pF cap. I got an even cleaner square output with a 15pF so I guess I should do a little calculation here.

I do however see that neither the crumar spirit, nor the OB-8 do any kind of filtering here, presumably it's taken care of later (or by using different op amps). The Jupiter-6 uses 22pF/100k feedback. The Prophet 600 uses a 20k resistor to ground plus a non-inverting buffer.


Update: While at it I've tested the following:

Increasing the feedback resistor 

The output is a current that is fed to the negative input of an op amp. Changing the feedback resistor would have the same effect as in a regular inverting amplifier configuration, but there is no input resistor. However, we know that a 47k resistor gives unity gain, so for example doubling to 94k will double the output voltage, adding a 22k will almost give a 1.5x gain etc. I tested this and it's correct.

Using a non-inverting buffer

Using the circuit in the datasheet, and attaching a non-inverting buffer directly afterwards works very well. No need to filter the output it seems. Increasing the resistor from 47k to 47k+22k gives 1.5x gain. BUT - we still can't go below the negative power rail, so the output is clipped at -3.5V (it looks like 4 on the scope though).

CV Linearity

There is very little response for the first 250mV, the rest seems fairly linear.

Top: CV, 0 to 1.5V. Bottom: Response on a 3V constant input. Notice that nothing happens in the beginning, but then the rest is fairly linear (slightly dropping but not too bad).



CV resistor voltage divider

The maximum CV input is 2.5V, and full range is 0-2V. By using a resistor voltage divider at the input we can transform a 5V CV to a 2V CV for example by combining a 33k from CV to CV input and 22k resistor from CV input to GND. This worked nicely. One could also use two equal resistors to get 2.5V which makes slight maximum adjustments possible.

There is no effect on the linearity so using a voltage divider seems perfectly fine.

Other interesting things

The chip doesn't seem to self destruct immediately if CV is > 2.5V (yeah, that happened, chip still works)

My chip seems to give max gain at CV = 1.5V, not 2V. 

Same as above but with 1.8V max CV. Notice how gain maxes out before the CV reaches its peak.


Friday, January 22, 2021

Exponential VCA v2164 and CV response

A quick note on the effect of a linear CV on the V2164. I connected a pot between 3.3v and 0. When turning the pot, nothing is heard until the pot is 2/3 of the way to max (CV drops from 3.3 to 0 as the v2164 expects a reversed CV, 0 being max on/unity gain).

Measuring the CV at this point shows as expected, around 1.2V. This means that for the rest of the pot's travel, it has no audible effect. This further strengthens my belief in using linear VCAs for the XM8. Alternatively, one could use a 0 to 1.5v cv, but it will never fully turn off the VCA. 

I'm looking forward to testing the same with a CEM3360/AS3360


Update: This article says that the effective CV range is 2V, which is more like what I experienced:

http://www.sdiy.org/philgallo/mgbvca.html

Tuesday, January 19, 2021

Envelopes, VCAs and linear vs exponential

TL;DR: 

  • Use linear VCAs when controlling them digitally, even when controlling audio. That lets you generate whatever control slope you want in software.
  • The VCA response is always exponential, not logarithmic. The only time we're actually talking about something looking more like a logarithmic response is in classic "RC" envelopes where the attack part is more logarithmic. Logarithmic control signals are generally only used to linearise an exponential VCA.

The full text

Through testing the digital envelopes in combination with the v2164 VCA, I realised that all is not good. It was particularly hard to dial in the sustain level as it dropped so fast when turning the pot due to the exponential nature. This made me realise that I had to revisit the topic of envelopes to fully understand how it is done in practice.

My initial confusion stems from the fact that people keep saying that you should use exponential VCAs for audio because they more closely approximate the way our hearing works. While this may be true when using the VCA as a volume control alone, it isn't necessary true elsewhere in the synth.

There is a lot of confusion about the use of the terms log(arithmic) and exp(onential) in the synth world, both when talking about potentiometers, VCAs and envelopes. I'll not go into detail, but just conclude that the slope/response is almost always exponential, not logarithmic. The only time we're actually talking about something looking more like a logarithmic response is in classic "RC" envelopes where the attack part is more logarithmic, and even here it is just an exponential response turned "upside down" (charging a cap instead of uncharging it). Logarithmic control signals are generally only used to linearise the response of an exponential VCA.

Another thing that is repeated is that using an exponential envelope with a linear VCA is the same as using a linear envelope with an exponential VCA. That is almost true, but with an exponential envelope controlling a linear VCA, you get direct control of the sustain level whereas when a linear envelope controls an exponential VCA, we get the "mapped" version of the sustain level which is significantly lower than the control voltage - which may be what you want but I found it hard to actually get the necessary control.

There's another point to be made though. When people talk about exponential envelopes, I suspect they mean the classic ones that is the result of charging and discharging capacitors, "RC" response. Those have a rapid increase upwards at the start of the attack and a rapid decrease at the start of decay. Using a linear envelope with an exponential VCA would give you a slow attack. 

A better name for the stages in an "RC" response envelope seems to be concave upwards and concave downwards. This is not what you get with an exponential VCA controlled by a linear envelope. 

Top: A linear envelope. Middle: The effect of feeding the linear envelope above through an exponential VCA. Note that the attack slopes downward and that the sustain level is significantly lower than the linear input as an exponential VCA drops very fast in the beginning. An exponential envelope would have the same shape but you would of course control the sustain level directly. Bottom: "RC" response, the classic envelope shape you get from charging/discharging a capacitor.


A lot of other versions exists. When you dive into the realm of digitally generated envelopes you find stuff like the Alpha Juno multi stage envelopes where the slope changes on a per-stage basis.

Alpha Juno lets you set envelope by specifying Time and Level for each stage. Slope varies from stage to stage, sometimes being linear (1, 2) and sometimes exponential (3, 4). These envelopes are purely digital.


One question was still unanswered for me - with an exponential envelope, should one make it control an exponential or a linear VCA? I've concluded that it has to control a linear VCA. The issue with sustain level speaks clearly of this. You want the response of the envelope, not an exponential version of it - especially when doing digital envelopes as you can pretty much do whatever shape you like. Hopefully, the resolution of the CV is high enough to mimic exponential growth with a fairly good quality even at low volumes.


What VCA chip to use in the XM8

Having to use linear VCAs kind of sucks. I was hoping to use the v2164 quad VCA extensively because it offers four VCAs in a compact package and at a reasonable price. If envelopes should control linear VCAs, and if I want to be able to patch envelopes anywhere, I also need to use linear VCAs everywhere. My best option seems to be the AS3330, which is a dual lin/exp VCA costing almost twice that of the V2164 meaning I have to spend four times as much on VCAs. That in itself kind of suck, but it will also take twice the space on the PCB which REALLY sucks. 

I will give the V2164 a final try though. If I can generate a logarithmic control signal, the output response will be linear. There is a very standard circuit going around that does this by combining two 2164s, but that sort of defeats the purpose. I have to do it digitally. This may result in very low resolution for the higher volumes, we'll just have to see.

Update: AS3364 is a quad linear VCA, that may be a good option. Unfortunately it's +/- 12V, not 15. I've ordered 10 of them for testing. I also realised that I have both AS3330 and AS3360 chips that I can try if I want. The AS3364 seems to be a dual AS3360 but with the exponential inputs removed, the text and specs in the datasheet is almost identical. This is good as it makes it possible to replace the AS3364 (which is an Alpha Rpar specific chip) with two 3360s on an adapter board later, should one fail and no replacements be available.


Resources

https://www.muffwiggler.com/forum/viewtopic.php?t=217707

https://www.muffwiggler.com/forum/viewtopic.php?t=115675

https://www.gearslutz.com/board/electronic-music-instruments-and-electronic-music-production/984069-embarrassing-question-explain-alpha-junos-envelopes.html

https://musicianonamission.com/adsr/

https://www.muffwiggler.com/forum/viewtopic.php?t=102357