From 55f96fbe9e6affbd8f3fee4aa79008d8c300ee5c Mon Sep 17 00:00:00 2001 From: Mustafa Date: Thu, 12 Jun 2014 09:20:20 -0700 Subject: [PATCH] modified some stuff --- oregano/TODO.md | 16 ++++++++++++++-- oregano/examples/filters.rkt | 4 ++-- oregano/instrument.rkt | 23 ++++++++++++++++++----- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/oregano/TODO.md b/oregano/TODO.md index fa4733d..8427265 100644 --- a/oregano/TODO.md +++ b/oregano/TODO.md @@ -1,5 +1,17 @@ +## Wed + +- envelopes + * learn how envgen works. + * make preset envelopes? + +- load samples + +- sequencing (at) + + + ## DAW-like model @@ -30,7 +42,7 @@ Oregano will have these concepts/objects: - 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/examples/filters.rkt b/oregano/examples/filters.rkt index b6d0ae6..fde9682 100644 --- a/oregano/examples/filters.rkt +++ b/oregano/examples/filters.rkt @@ -4,8 +4,8 @@ ;; press 'a' (make-instrument "my-inst" ([freq 500]) - (mul (sin-osc ar (mul-add (lf-pulse ar 15 0 0.5) 200 freq) 0) - (mouse-button kr 0 0.1 0.1))) + (mul (sin-osc ar (mul-add (lf-pulse ar (mouse/x 5 500) 0 0.5) 200 freq) 0) + (mouse-button kr 0 0 0))) (define phone-note (play-note "my-inst" 600)) diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt index 601c4bb..e232ae0 100644 --- a/oregano/instrument.rkt +++ b/oregano/instrument.rkt @@ -124,6 +124,10 @@ (send-msg (n-run1 (note-id the-note) 0)) (void)) +(define (delete-note the-note) + (send-msg (n-free (note-id the-note))) + (void)) + (define (set-note-param the-note name val) (if (eq? name "freq") @@ -165,10 +169,19 @@ (show-gui) ;; example: -(sleep 0.5) -; (note-on my-sin 500 1) -; (note-off my-sin) -|# - \ No newline at end of file + +; (synth-on my-sin 500 1) + +; (synth-off my-sin) + + +(note "weird-synth" 400) + +(play-note-at 50 mynote) + +(envelope A S D R) + + +|# \ No newline at end of file