Update Tutorial.md
This commit is contained in:
parent
6775d8dfb8
commit
7f55200481
1 changed files with 21 additions and 3 deletions
|
@ -42,11 +42,29 @@ The purpose of playing notes on different tracks is we can have different filter
|
|||
|
||||
## Example
|
||||
|
||||
- Creating an instrument
|
||||
### 1. Creating an instrument
|
||||
|
||||
You can either use a preset instrument or define your own instrument
|
||||
|
||||
;; this uses the piano preset
|
||||
(define my-piano (make-instrument 'piano))
|
||||
|
||||
;; create a custom instrument
|
||||
;; can use oscilators and envelopes
|
||||
(define my-instrument (make-instrument ...)
|
||||
|
||||
;; add envelope to instrument
|
||||
|
||||
### 2. Playing a note
|
||||
|
||||
Now that we have an instrument, we can use it to play notes on a specific track.
|
||||
|
||||
;; this plays the key C#, octave 3 on track 2.
|
||||
(note-on my-piano C#3 track2)
|
||||
|
||||
;; to stop playing
|
||||
(note-off my-piano C#3 track2)
|
||||
|
||||
;; this uses the preset
|
||||
(define my-piano (make-instrument 'piano))
|
||||
|
||||
TODO:
|
||||
- use an instrument to play a note on a track.
|
||||
|
|
Loading…
Reference in a new issue