madskjeldgaard / portedplugins

A collection of plugins for the SuperCollider sound environment, all of which are ported / remixed from elsewhere
GNU General Public License v3.0
180 stars 13 forks source link

replaced VCAAmount mapping with the more recent reactor implementation #3

Closed LFSaw closed 3 years ago

LFSaw commented 3 years ago

Thanks for this implementation of the Parker et al LPG, it works quite nicely and the code is oh so readable!

dunno if this is of interest to you but in case it is, here's a little update/change of the VCA amount:

I changed the amount mapping to follow the reaktor 6 Blocks implementation of this LPG, also I found (by looking at the reaktor code) that a non-linear mapping of the VCAamount (I currently do this in the sclang SynthDef itself) results in quite reasonable linear behaviour when it is attached to a linearly mapped fader:

vca = (1+vca).log2.sqrt

Another thing I was considering adding (but haven't looked into it so far) is to account for non-exact values of resistors etc, by providing a random seed at UGen creation and vary resistor values randomly at instantiation time... this might be interesting when working with several LPGs in parallel/sequence.

again, great work!

madskjeldgaard commented 3 years ago

Amazing ideas. Thank you! Will test asap

madskjeldgaard commented 3 years ago

This sounds great and makes a lot of sense. Thanks so much!

Regarding resistors. This is definately something that could be fun to try out. Depending on the "originality" (for lack of better word) of the sound, it would probably be reasonable to expect a 5-10% tolerance in the original circuit and some of the clones (I have 5% tolerance in my Buchla clone here) so I definately feel like this could be fun to experiment with!

madskjeldgaard commented 3 years ago

https://github.com/madskjeldgaard/mkplugins/releases/tag/v0.1.0

The changes have been released here. Thanks again - would love to see another PR if you feel like it.

LFSaw commented 3 years ago

cool!

I forgot:

the paper mentions that the original circuit had an amplification of the input signal depending on the VCA setting like so:

    var input = sig * (vca.linlin(0, 1, 0, 10).dbamp);
    vca = (1+vca).log2.sqrt;

this works quite well