I'm trying to map a scaled value of some other parameter to adjust the SIN LFO.
What are the decimal values that correspond to setting LFO rate to 25 and 125 (out of 511) using the WLDS instruction?
e.g.
SOF 0, 0.25
WRAX SIN0_RATE, 0
Similar question as regards the width. What would be the values to write to SIN0_WIDTH that would correspond to using values of 16 and 64 in the WLDS instruction?
Many thanks,
DL
Writing values directly to SIN0_RATE and SIN0_WIDTH
Moderator: frank
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
Kf = 2^17 (2 pi f / R)
f: Desired LFO frequency in Hz
R: Sample rate in Hz
Kf range: 0 to 511
Kf decimal = Kf / 512
25/512 = 0.048828125
125/512 = 0.244140625
--------------------------------------
Ka = N (32767/16385)
N: Delay length in samples
Ka range: 0 to 32767
Ka decimal = Ka / 32768
16/32768 = 0.00048828125
64/32768 = 0.001953125
the word is RANGE not WIDTH btw
f: Desired LFO frequency in Hz
R: Sample rate in Hz
Kf range: 0 to 511
Kf decimal = Kf / 512
25/512 = 0.048828125
125/512 = 0.244140625
--------------------------------------
Ka = N (32767/16385)
N: Delay length in samples
Ka range: 0 to 32767
Ka decimal = Ka / 32768
16/32768 = 0.00048828125
64/32768 = 0.001953125
the word is RANGE not WIDTH btw
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact: