organized in a package. moved examples from library

This commit is contained in:
Mustafa 2014-05-20 12:07:04 -07:00
parent e8464bca98
commit 83e931612d
3 changed files with 43 additions and 8 deletions

View file

@ -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)

View file

@ -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)
|#

13
oregano/main.rkt Normal file
View file

@ -0,0 +1,13 @@
#lang racket
(require "instrument.rkt"
"gui.rkt"
"sample.rkt")
(provide
(all-from-out "instrument.rkt"
"gui.rkt"
"sample.rkt"))