Skip to content

Instantly share code, notes, and snippets.

Avatar

D. Reyburn davidreyburn

View GitHub Profile
@davidreyburn
davidreyburn / lfo.pde
Created Aug 5, 2017
a simple function in processing which takes a float, uses that as the amplitude of a wave, and returns a smoothly undulating value
View lfo.pde
float lfo(float amplitude) {
float x = sin(theta) * amplitude;
theta = theta + 0.01;
if (theta > 2 * PI) {
theta = 0.0;
}
return x;
}
You can’t perform that action at this time.