From b808668687ac3099a1ac56246c300a446eb68043 Mon Sep 17 00:00:00 2001 From: Mustafa Date: Fri, 16 May 2014 12:16:08 -0700 Subject: [PATCH] changed some names. added name param to slider --- oregano/Tutorial.md | 2 +- oregano/instrument.rkt | 15 +++++++-------- oregano/notes.md | 7 +++++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/oregano/Tutorial.md b/oregano/Tutorial.md index 8b17b30..c3cd057 100644 --- a/oregano/Tutorial.md +++ b/oregano/Tutorial.md @@ -47,7 +47,7 @@ The purpose of playing notes on different tracks is we can have different filter You can either use a preset instrument or define your own instrument ;; this uses the piano preset - (define my-piano (make-instrument 'piano)) + (define my-piano (preset-instrument 'piano)) ;; create a custom instrument ;; can use oscilators and envelopes diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt index 7abc4b2..438746c 100644 --- a/oregano/instrument.rkt +++ b/oregano/instrument.rkt @@ -6,7 +6,7 @@ (require (prefix-in gui: racket/gui)) -(define frame (new gui:frame% [label "Example"])) +(define frame (new gui:frame% [label "Sliders"])) ;; parent should be a frame (new gui:slider% [parent frame] @@ -20,16 +20,16 @@ (gui:send frame show #t) - ;; hypothetical usage #;(add-filter track2 (lpf #:resonance .3 #:cutoff (slider 300 800 500))) -(define (slider min-n max-n init) +(define (slider name min-n max-n init) + ;; TODO - determine available bus (define bus-id 16) (new gui:slider% [parent frame] - [label "amp"] + [label name] [min-value min-n] [max-value max-n] [init-value init] @@ -66,7 +66,7 @@ (define sin-instrument (letc ([bus 0] [freq 440]) - (out bus (mul (slider 100 800 200) (sin-osc ar freq 0))))) + (out bus (mul (slider "amplitude" 100 800 200) (sin-osc ar freq 0))))) (define saw-instrument (letc ([bus 0] @@ -76,8 +76,7 @@ ;; setup ;; show osc messages on server -(with-sc3 (lambda (fd) - (send fd (dump-osc 1)))) +(send-msg (dump-osc 1)) (with-sc3 reset) ;; send synthdefs @@ -117,7 +116,7 @@ ;; example: -; (note-on my-sin 500 1) +(note-on my-sin 500 1) ; (note-off my-sin) diff --git a/oregano/notes.md b/oregano/notes.md index 3b63609..6cb2841 100644 --- a/oregano/notes.md +++ b/oregano/notes.md @@ -14,6 +14,13 @@ ### Installation/setup + +scsynth in + /Volumes/SuperCollider/SuperCollider/SuperCollider.app/Contents/Resources/scsynth + +or /Applications/... + + #### Ubuntu 12.10