Low Frequency Oscillators
These functions are implementing low-frequency oscillators whose period is based on a selectable number of clock beats. They offer another better flavor to the basic technique involving sin()
or cos()
functions.
Function | Arguments | Description | Return type |
lsin | period | sinusoïdal low-frequency oscillator (-1, 1) | int|float |
ltri | period | triangular low-frequency oscillator (-1, 1) | int|float |
lsaw | period | sawtooth low-frequency oscillator (-1, 1) | int|float |
lrect | period, PWM/Duty | rectangular low-frequency oscillator. Argument for pulse width modulation. (-1, 1) | int|float |
alsin | period | unipolar sinusoïdal low-frequency oscillator (0, 1) | int|float |
altri | period | unipolar triangular low-frequency oscillator (0, 1) | int|float |
alsaw | period | unipolar sawtooth low-frequency oscillator (0, 1) | int|float |
Remember that you can do math operations on these oscillators such as clamping (clamp
), scaling (scale
), etc. You can also pattern the period
or pwm
for extra weirdness or for doing custom shapes. Folding and wrapping operations can be very useful to generate interesting shapes on a large time scale.