From 6e125ef878082abf9ee010eefd868e3a0dcc8b46 Mon Sep 17 00:00:00 2001 From: Mustafa Date: Sat, 17 May 2014 11:37:08 -0700 Subject: [PATCH] set bus before linking it in slider. added notes --- oregano/TODO.md | 13 ++++++++++++- oregano/instrument.rkt | 5 +++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/oregano/TODO.md b/oregano/TODO.md index d2e1e57..65730fb 100644 --- a/oregano/TODO.md +++ b/oregano/TODO.md @@ -8,7 +8,6 @@ Oregano will have these concepts/objects: - track: like a "track" in renoise. can have notes and a list of filters - - instrument: instrument defenitions or presets, and actual instantiated instruments. - I should make some instrument presets, like sine, saw, square, triangle waves. @@ -17,11 +16,23 @@ Oregano will have these concepts/objects: ## Functionality + +### Instruments + +- [Done] preset instruments + +- custom instruments + + + - adding filters to tracks - ability to change filter parameters - playing a note from an instrument on a track. + * [done] can play a note from an instrument on bus 0 + + * - load sound files into buffers, and play them using notes. - create instruments diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt index 74ff0ef..eeaec6a 100644 --- a/oregano/instrument.rkt +++ b/oregano/instrument.rkt @@ -9,6 +9,7 @@ (require (prefix-in gui: racket/gui)) (define frame (new gui:frame% [label "Sliders"])) +(gui:send frame show #t) ;; parent should be a frame (new gui:slider% [parent frame] @@ -20,7 +21,6 @@ [callback (lambda (s event) (send-msg (n-set1 1001 "freq" (gui:send s get-value))))]) -(gui:send frame show #t) ;; hypothetical usage #;(add-filter track2 (lpf #:resonance .3 @@ -39,6 +39,7 @@ [callback (lambda (s event) (send-msg (c-set1 bus-id (/ (gui:send s get-value) 1000))))]) + (send-msg (c-set1 bus-id (/ init 1000))) (in 1 kr bus-id)) @@ -140,7 +141,7 @@ ;; example: -(sleep 0.1) +(sleep 1) ; (note-on my-sin 500 1) ; (note-off my-sin)