fixed on my fork of the sdk, also updated inputs to be in1/gain1, in2/gain2 etc.
no functional change, but I guess makes code easier to understand (kind of ;))
the simplistic approach to panning/crossfading is to use
n and 1-n , where n = 0…1
we can now say n = 0 , n=0.5 = centre, n= 1
(ofc, I can use pan = -1 to 1 for user facing, such that n = (pan + 1) / 2 )
you can then see sigL = sig * (1-n) , sigL = sig * n;
is this going to work?
well not in this form, but thats because the second part is detailing a linear vca (as qvca is)
and linear scaling is not going to sound right, you’d want a pan curve
a common one is to use sin/cos for right/left, but there are others
(even some daws will allow users to select the pan curve type)
however, the above IS useful for cross-fading esp, cv rather than audio signals.
BUT if you use an exponential vca, then it will kind of work, as the cv input is converted to an exp curve, which is another possibility for a pan curve.
edit: (updated)
I mis-remember, I thought VCA was exp vca, but checking code its a linear vca.