Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
a simple function in processing which takes a float, uses that as the amplitude of a wave, and returns a smoothly undulating value
float lfo(float amplitude) {
float x = sin(theta) * amplitude;
theta = theta + 0.01;
if (theta > 2 * PI) {
theta = 0.0;
return x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.