diff options
Diffstat (limited to 'lib/time.moon')
| -rw-r--r-- | lib/time.moon | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/time.moon b/lib/time.moon index 567b16f..dac5063 100644 --- a/lib/time.moon +++ b/lib/time.moon @@ -1,6 +1,14 @@ import Const, Op from require 'core' class lfo extends Op + @doc: "(lfo freq [wave]) - low-frequency oscillator + +oscillates between 0 and 1 at the frequency freq. +wave selects the wave shape from the following (default sin): +- sin +- saw +- tri" + tau = math.pi * 2 new: (...) => super ... @@ -22,6 +30,9 @@ class lfo extends Op else error "unknown wave type" class tick extends Op + @doc: "(tick freq) - count ticks + +counts upwards at freq and returns the number of completed ticks." new: (...) => super ... @phase = 0 |
