Problem with controlling LFO

Software questions and issues with the FV-1

Moderator: frank

Post Reply
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Problem with controlling LFO

Post by ZibiSound »

Hello,
I got a problem with controlling LFO (sin0). Here's the code:

Code: Select all

skp	run, 1
wlds	sin0, 0, 32767

rdax	pot0, 0.1
wrax	sin0_rate, 0
cho	rdal, sin0
wrax	dacr, 0
And, when I set pot0 to 1 (sin0_rate = 0.1), period of generated sinwave is ~340ms. But when I set pot0 to 0.1 (sin0_rate = 0.01), period isn't 3,4s as I expected, but 5,7s. Why?
How to control it linearly?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Problem with controlling LFO

Post by frank »

Have you looked at the equations and mapping of bits for sinX_rate in AN-0001?
Frank Thomson
Experimental Noize
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Re: Problem with controlling LFO

Post by ZibiSound »

You mean 2^17/(2*pi*f/R) formula?
If the rate register is 9-bit, there are only 512 frequency change "posibilities"?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Problem with controlling LFO

Post by frank »

It is a limited range LFO designed for things like chorus, etc. If you want a really wide ranging sin generator with lots of resolution you will have to code it up by hand and maybe use 2 POTs for a coarse and fine adjustment. In most effects the absolute frequency is unimportant, it is what sounds good that is important so a limit of 512 steps is fine, after all how many steps do you need between 0.1 and 20hz?
Frank Thomson
Experimental Noize
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Re: Problem with controlling LFO

Post by ZibiSound »

Honestly, I need 1ms accuracy. It will be beat-synced fx.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Problem with controlling LFO

Post by frank »

Then you will probably need to code it by hand to get the desired range and resolution and not use the built in LFOs.
Frank Thomson
Experimental Noize
Post Reply