From d507a0695ff51c99ed8a02db12a14d49b3ecd389 Mon Sep 17 00:00:00 2001 From: Mustafa Date: Wed, 21 May 2014 11:07:11 -0700 Subject: [PATCH] Update Tutorial.md --- oregano/Tutorial.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/oregano/Tutorial.md b/oregano/Tutorial.md index 99bf5d7..b7460ef 100644 --- a/oregano/Tutorial.md +++ b/oregano/Tutorial.md @@ -46,17 +46,19 @@ 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 (preset-instrument 'piano)) - - ;; create a custom instrument - ;; can use oscilators and envelopes - ;; "freq" is the frequency parameter - (define-instrument my-custom-inst (mul (sin 20) (sin "freq"))) +```clj +;; this uses the piano preset +(define my-piano (preset-instrument 'piano)) - ;; add envelope to instrument - (define my-inst (preset-instrument "sine" - (envelope A S D R)) +;; create a custom instrument +;; can use oscilators and envelopes +;; "freq" is the frequency parameter +(define-instrument my-custom-inst (mul (sin 20) (sin "freq"))) + +;; add envelope to instrument +(define my-inst (preset-instrument "sine" + (envelope A S D R)) +``` ### 2. Playing a note