This is a question I have seen asked on the Synthedit group, and the Forum, so I thought it would be a useful sub-control & conversion prefab post to save others the hassle of re-inventing the wheel as it were. Whilst it’s a definite advantage in SE, not everyone is a mathematics wizard (including me!)
Converting voltage to time for the ADSR2 module.
The heart of the process of adding a time readout for the Knob is using this small prefab Volts2-ADSR-Time. The conversion takes place in the Waveshaper2B module using the formula (10^(x * 0.4-3))*10 – (note the order of the brackets).
This method is not 100% accurate, but is close enough for our purposes.
once the input Voltage has been converted to the correct curve it’s then converted to a GUI float value, and from there to on converted to a text string, and displayed in the ED Text Entry box. By connecting the second text box to the PatchMemory Float3 module and changing its name to the appropriate Attack/Decay/Sustain label we have a convenient way of adding a control name to the Knob.
You don’t have to use one of the Vector knobs, you can just as easily use the standard sub control Image2 as a control knob.
I have made the prefab available as a download here but as you can see from the screenshots you will need some third party modules, and the vector control is only for V1.5.