Search found 3 matches

by busboy
Tue Apr 20, 2021 2:49 pm
Forum: Support and Development
Topic: [SOLVED] Changing frequency while synthesising sine wave
Replies: 7
Views: 7099

Re: Changing frequency while synthesising sine wave

pgimeno wrote: Tue Apr 20, 2021 10:56 am

Code: Select all

    return function(freq)
        phase = phase + tau * increment * freq
        generator.phase = phase
        return math.sin(phase)
    end
This is dead on, thank you so much.
by busboy
Tue Apr 20, 2021 4:38 am
Forum: Support and Development
Topic: [SOLVED] Changing frequency while synthesising sine wave
Replies: 7
Views: 7099

Re: Changing frequency while synthesising sine wave

Thanks for your reply! Haven't had time yet to look at it too much, but one thing you might try is to limit the phase in the returned generator function to the range/domain (i get these mixed up) of [0,1] with something like: phase = (phase + increment) % 1.0 Unfortunately all this seemed to do is a...
by busboy
Mon Apr 19, 2021 8:20 am
Forum: Support and Development
Topic: [SOLVED] Changing frequency while synthesising sine wave
Replies: 7
Views: 7099

[SOLVED] Changing frequency while synthesising sine wave

Hello, I've been stuck for days on changing the frequency of a sine wave oscillator over a period of time, and I'm completely stumped. https://i.ibb.co/Q6nztLs/Screenshot-2021-04-19.png I've tried it many number of ways, but what always ends up happening is that the frequency over the lerp of its du...