produce Lfo
A composable function that produces a Low-Frequency Oscillator (LFO) value as a State. The LFO generates a sine wave value that oscillates between -1.0 and 1.0.
Return
A State object that holds the current LFO value as a Float. The value is updated on every frame.
Parameters
frequency
The frequency of the LFO in Hertz (Hz).
gate
When the gate transitions from false to true, the LFO's phase is reset to 0, causing the sine wave to start from the beginning.