From 417ebc04afe1fb98c6df4480be8725877697069a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 16 May 2021 11:40:47 +0200 Subject: Restore effects using clocks --- examples/demo.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/demo.scm b/examples/demo.scm index 11f0803..a49bf7b 100644 --- a/examples/demo.scm +++ b/examples/demo.scm @@ -93,15 +93,14 @@ ;; Functions can be assigned to parameters -;; (temporarily disabled - time parameter is gone, should use -;; clock objects instead) -;;(at foh1 'intensity (lambda (time) -;; (* 50 -;; (+ 1 (sin (* 2 time)))))) +(let ((clock (make-clock))) + (at foh1 'intensity (lambda () + (* 50 + (+ 1 (sin (* 2 (elapsed-time clock)))))))) ;; Effects library -(at floor2 'intensity 100) +(at floor2 'intensity (flash 1.3)) (at floor2 'colour (make-colour-cmy 0 0 100)) (at floor2 'pan 0) (at floor2 'tilt (sinewave 0.5 100 170)) -- cgit v1.2.3