Hello, I am looking for a little help with something that is probably pretty basic.
Some of the “Rack math” is causing me a little confusion.
In trying to understand the relationship between volts and frequency in Rack, I took a look at the VoltageStandards. From these, I understand the expectation is that input “voltages” don’t exceed 0V to 10V or \pm{5} V.
The frequency formula given is f = f_{0} \cdot 2^{V} which seems to mean that I should expect that f = 2 \cdot 2^{V} for an LFO and f = 261.6265 \cdot 2^{V} for a “normal” oscillator. Ok, so far so good.
When I started looking at the Fundamental LFO (mainly because I would like to translate an LFO that I have working outside of Rack into a Rack module), I began thinking that I might be in trouble. The frequency parameter is defined like:
configParam(
paramId = FREQ_PARAM,
minValue = -8.f,
maxValue = 10.f,
defaultValue = 1.f,
name = "Frequency",
unit = " Hz",
displayBase = 2,
displayMultiplier = 1
);
This is confusing firstly due to the range, which appears to be 18 rather than 10. When I plug these values into the frequency equations above thinking that -8 and 10 are describing the voltage range I get the following:
- Volts of -8 = 0.0078125
- Volts of 10 = 2048
These appear to be too small and too big respectively. I was expecting to see a range of about 0.1 to 20 Hz.
Question 1: How do these values (-8 and 10) relate the voltage and frequency?
The next question may be related to whatever I am missing here…
In the frequency calculation,
void setPitch(T pitch) {
pitch = simd::fmin(pitch, 10.f);
freq = dsp::approxExp2_taylor5(pitch + 30) / 1073741824;
}
Question 2: Where do the “magic numbers” 30 and 1073741824 come from?
I would be very happy with direct answers of if there is something anyone can point me to which describes what boat I am apparently missing.
Thank you!