Hey Frank, is there any way to reset the phase of a sine LFO?
I had hoped that executing another WLDS instruction would set the sine value to zero and the cosine value to one (or the amplitude value). But it doesn't seem to work that way.
I suppose I can build my own oscillator and reset the initial conditions. Is this what I need to do?
Thanks,
Don
Resetting a sine LFO
Moderator: frank
-
- Posts: 53
- Joined: Thu Jan 07, 2010 2:29 pm
- Location: Windsor, Colorado
Resetting a sine LFO
Don Stavely
No, there isn't. They are initialized at start up and run continuously so I think you will need to write your own if you need to reset an LFO in the program.
Frank Thomson
Experimental Noize
Experimental Noize
Sorry for re-opening an old topic, but here we go!
Setting the LFO to 0Hz on initialization like this:
Am I correct to assume that I'll output a zero (or half supply)? I don't have my multimeter handy so I can't check the result.
If I was able to read the cosine of SIN0 would that read as one, or 3.3v? If I were to keep sin0_rate at zero, but adjusted sin0_range would that alter the cosine value? [/code]
Setting the LFO to 0Hz on initialization like this:
Code: Select all
; 0Hz LFO test
;
skp run, START
wlds SIN0, 0, 32767 ; Write & Load sin0 at 0Hz
sof 0, 0.0
wrax sin0_rate, 0
START:
;
cho rdal, SIN0 ; Should read as 1.65 volt??
wrax dacr, 0 ; Write result to output
If I was able to read the cosine of SIN0 would that read as one, or 3.3v? If I were to keep sin0_rate at zero, but adjusted sin0_range would that alter the cosine value? [/code]
He asked to reset the phase to 0 degrees, not the frequency to 0Hz.
Frank Thomson
Experimental Noize
Experimental Noize