aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/effects.scm
blob: d908a52fe63faa4c56a85db123f647c5745acec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(define-module (starlet effects)
  #:use-module (starlet base)
  #:export (flash))


(define pi (* 2 (acos 0)))

(define (square-wave time hz)
  (if (> (sin (* 2 pi hz time))
         0)
      100
      0))

(define (flash hz)
  (lambda (time)
    (square-wave time hz)))