added custom instrument totorial section
This commit is contained in:
parent
7de4af814b
commit
6599178e5f
1 changed files with 7 additions and 2 deletions
|
@ -74,13 +74,18 @@ You can either use a preset instrument or define your own instrument
|
||||||
;; create a custom instrument
|
;; create a custom instrument
|
||||||
;; can use oscilators and envelopes
|
;; can use oscilators and envelopes
|
||||||
;; "freq" is the frequency parameter
|
;; "freq" is the frequency parameter
|
||||||
(make-instrument "my-inst" ([freq 500] [modulaion 20])
|
(make-instrument "my-inst" ([freq 500] [mod 20])
|
||||||
(mul (sin-osc ar modulation 0)
|
(mul (sin-osc ar mod 0)
|
||||||
(sin-osc ar freq 0)))
|
(sin-osc ar freq 0)))
|
||||||
|
|
||||||
|
(define weird-note (play-note "my-inst" 440))
|
||||||
|
|
||||||
|
; change frequency
|
||||||
(set-note-param my-note "freq" 808)
|
(set-note-param my-note "freq" 808)
|
||||||
|
|
||||||
|
; change modulation
|
||||||
|
(set-note-param my-note "mod" 40)
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue