aboutsummaryrefslogtreecommitdiffstats
path: root/lib/time.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-01 21:29:10 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-01 21:29:10 +0000
commitf4b5543b33de9ce6e5c3a1bcc65db36eb3eb5b03 (patch)
tree636cbcbbcd8be60d39cba2e4cf04b4edc7011233 /lib/time.moon
parentfix README typo (diff)
downloadalive-f4b5543b33de9ce6e5c3a1bcc65db36eb3eb5b03.tar.gz
alive-f4b5543b33de9ce6e5c3a1bcc65db36eb3eb5b03.zip
first-class scopes
Diffstat (limited to 'lib/time.moon')
-rw-r--r--lib/time.moon4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/time.moon b/lib/time.moon
index f2ad70c..4fe5d7c 100644
--- a/lib/time.moon
+++ b/lib/time.moon
@@ -6,7 +6,9 @@ class lfo extends Op
super ...
@phase = 0
- setup: (@freq, @wave=Const 'sin') =>
+
+ default_wave = Const 'str', 'sin'
+ setup: (@freq, @wave=default_wave) =>
update: (dt) =>
@phase += dt * @freq\get!