lfo
-
- Posts: 640
- Joined: Mon Nov 15, 2021 9:23 pm
Re: lfo
It strikes me that you're trying to write a complete instrument without knowing how to write any of its subparts. Nonetheless, to trigger both adsrs just send the same signal to each.
For the LFO, create a simple ramp wave by starting a counter at zero and, each sample time, increment it by frequencyHz/sampleRate. When it overflows the range, set it back to zero, corrected by the amount it overshot. To get other waveforms, you can do some jiggery pokery to derive them from the ramp wave. Except for the sine wave; for that you'll actually have to calculate a sine wave, or something resembling one. I used a parabolic approximation in Quadrature VLFO. You can find that algorithm easily on the web.
Reid
For the LFO, create a simple ramp wave by starting a counter at zero and, each sample time, increment it by frequencyHz/sampleRate. When it overflows the range, set it back to zero, corrected by the amount it overshot. To get other waveforms, you can do some jiggery pokery to derive them from the ramp wave. Except for the sine wave; for that you'll actually have to calculate a sine wave, or something resembling one. I used a parabolic approximation in Quadrature VLFO. You can find that algorithm easily on the web.
Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
Re: lfo
Just use the DigitalOscillator class in Voltage Module Designer.
There is even an example of how to create an LFO module in the SDK:
______________________
Dome Music Technologies
Dome Music Technologies