diff --git a/oregano/examples/instrument-example.rkt b/oregano/examples/instrument-example.rkt new file mode 100644 index 0000000..830d1f5 --- /dev/null +++ b/oregano/examples/instrument-example.rkt @@ -0,0 +1,24 @@ +#lang racket + +(require oregano) + + +(define my-sin (preset-instrument "sin-inst")) + +(param-slider "change frequency" 300 1000 400 + (lambda (val) + (set-inst-param my-sin "freq" val))) + +(param-check-box "synth on" #f + (lambda (v) + (if v + (inst-on my-sin) + (inst-off my-sin)))) + +(show-gui) + +;; example: +(sleep 0.5) +; (note-on my-sin 500 1) + +; (note-off my-sin) \ No newline at end of file diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt index c46b34c..f506068 100644 --- a/oregano/instrument.rkt +++ b/oregano/instrument.rkt @@ -1,16 +1,15 @@ #lang racket + + (require rsc3) -;; --- gui stuff +(provide (all-defined-out)) +;; TODO - remove. using "signal-slider" for testing (require "gui.rkt") -; ------- end of gui stuff - - - (define current-node-id 1000) (define (gen-node-id) (set! current-node-id (add1 current-node-id)) @@ -98,7 +97,7 @@ ;; ======== example useage =========== - +#| (define my-sin (preset-instrument "sin-inst")) (param-slider "change frequency" 300 1000 400 @@ -119,5 +118,4 @@ ; (note-off my-sin) - - +|# diff --git a/oregano/main.rkt b/oregano/main.rkt new file mode 100644 index 0000000..0652319 --- /dev/null +++ b/oregano/main.rkt @@ -0,0 +1,13 @@ +#lang racket + + +(require "instrument.rkt" + "gui.rkt" + "sample.rkt") + +(provide + (all-from-out "instrument.rkt" + "gui.rkt" + "sample.rkt")) + +