updated the example

This commit is contained in:
Mustafa 2014-05-27 16:36:56 -07:00
parent 549cbb398a
commit f8f0df7b85

View file

@ -6,18 +6,18 @@
(display "in example.rkt") (display "in example.rkt")
(sleep 0.1) (sleep 0.1)
(define my-sin (preset-instrument "sin-inst")) (define my-sin (make-note "sin-inst" 880))
(param-slider "change frequency" 300 1000 400 (param-slider "change frequency" 300 1000 400
(lambda (val) (lambda (val)
(set-inst-param my-sin "freq" val))) (set-note-param my-sin "freq" val)))
(param-check-box "synth on" #f (param-check-box "synth on" #f
(lambda (v) (lambda (v)
(if v (if v
(inst-on my-sin) (note-on my-sin)
(inst-off my-sin)))) (note-off my-sin))))
(show-gui) (show-gui)