2014-05-22 17:39:35 +00:00
|
|
|
#lang racket
|
|
|
|
|
|
|
|
(require oregano)
|
|
|
|
|
|
|
|
|
|
|
|
(display "in example.rkt")
|
|
|
|
(sleep 0.1)
|
|
|
|
|
2014-05-27 23:36:56 +00:00
|
|
|
(define my-sin (make-note "sin-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)
|