How To Set Up Parent/Child Oscillator Pair With User Settable Ratio
For a few projects, I want to have two LFOs (or audio oscillators) whose frequencies are related by a user-settable ratio. For simplicity, I only want to expose two controls a knob for the frequency and a knob that sets the ratio of the parent and child oscillator frequencies.
I think have the right basic architecture. But I am unsure of the specific math needed to make the child oscillator's frequency an integer multiplier of the parent's.
For the time being, let's forget setting the ratio with a knob.
Let's say that I have and LFO called SHAPE and one called TRIGGERS
I set both to run at 1 Hz.
I have a knob. Let's call it Speed
Speed is set to modulate SHAPE's frequency. I have the modulation amount cranked to max.
Speed is also sent to a series of math modules so that it can be manipulated to result in a value that will set the Triggers frequency to the desired multiple.
What math do I need to do to the 'Speed' value to turn it to a number that will cause Triggers to have twice the frequency of of SHAPE. What math results in Triggers' frequency being 3 times the frequency?
If that description wasn't clear, I can post a picture to show the flow.
Comments
For the regular oscillators, the frequency scale is logarithmic, with 0.125 corresponding to an octave. So, to implement a frequency ratio R, you need to add 0.125 * log(R) / log (2) to the lower frequency to get the higher frequency. For example, if R=2, you add 0.125 to increase by one octave. For R=3, you would add 0.1981, but you'd just let the math modules do that. Haven't tried it, but that's the theory. Not sure about the LFOs; their frequency input might be linear, not logarithmic.
Thanks. I’ll try it out.
Related question. When you type in a number with 3 digits of precision, a value roumded to the nearest hundredth is displayed. Am I correct that is stores the full-precision number?
@uncleDave : that did it! Now, I just need to wrap up the modules into a rack-let so they don't take up much space.
I can tell from my own experience that the full precision seems to be stored, just not displayed.
As a consequence, it happens that if you enter the same number thar you see for a parameter you get a different effect, depending on the parameter (it's very obvious with pitches).
@rs2000 and @uncleDave
Thanks for the help. I have posted my StepLFOCompact to PatchStorage:
One more question.
What is the math needed to linearize the response so that at 9 o'clock the value will be -0.5 and at 3 o'clock the value will be 0.5?
@easelec Linearize what exactly? Do you maybe mean just scaling the output of a Knob? Also, the Graphic Shaper can be a one-stop shop for some of these problems.
Yes, the scaling of knobs output to that it is linear. I assume that there is some simple math that would do it.
Hmmm. I'm still mystified. As far as I know, the Knob module output IS linear, from -1 to 1, proportional to knob rotation. But it doesn't turn full circle, so the 0.5 points are about 10 and 2 o'clock. You could use a Scaler to scale it down to do what you ask, but then you'd lose full range.
Got it. You’re right. I had forgotten that that the knob doesn’t turn full circle.
Ratio module baked in would be very cool @giku . There’s a lot of fun to be had here, thanks @uncleDave @easelec
MISC/UTILITY Pitch (overtone) module is in fact pitch CV ratio.
When you use numbers to modulate the Pitch module's output, what is the numerical scaling?
@giku re:overtone...I did not know that