rsc3/oregano/examples/gui-example.rkt

28 lines
504 B
Racket
Raw Permalink Normal View History

2014-05-22 17:39:35 +00:00
#lang racket
(require oregano)
(display "in example.rkt")
2014-05-29 17:03:53 +00:00
;(sleep 0.1)
2014-05-22 17:39:35 +00:00
2014-05-29 17:03:53 +00:00
(define my-sin (make-note "saw-inst" 880))
2014-05-22 17:39:35 +00:00
(param-slider "change frequency" 300 1000 400
(lambda (val)
2014-05-27 23:36:56 +00:00
(set-note-param my-sin "freq" val)))
2014-05-22 17:39:35 +00:00
(param-check-box "synth on" #f
(lambda (v)
(if v
2014-05-27 23:36:56 +00:00
(note-on my-sin)
(note-off my-sin))))
2014-05-22 17:39:35 +00:00
(show-gui)
;; example:
(sleep 0.5)
; (note-on my-sin 500 1)
; (note-off my-sin)