Fix: update docs about snd
This commit is contained in:
@@ -7,7 +7,7 @@ Cagire includes an audio engine called `Doux`. No external software is needed to
|
||||
When you write a Forth script and emit (`.`), the script produces a command string. This command travels to the audio engine, which interprets it and creates a voice. The voice plays until its envelope finishes or until it is killed by another voice. You can also spawn infinite voices, but you will need to manage their lifecycle manually, otherwise they will never stop.
|
||||
|
||||
```forth
|
||||
saw s c4 note 0.8 gain 0.3 verb .
|
||||
saw snd c4 note 0.8 gain 0.3 verb .
|
||||
```
|
||||
|
||||
## Voices
|
||||
@@ -24,7 +24,7 @@ Press `r` on the Engine page to reset the peak counter.
|
||||
After selecting a sound source, you add parameters. Each parameter word takes a value from the stack and stores it in the command register:
|
||||
|
||||
```forth
|
||||
saw s
|
||||
saw snd
|
||||
c4 note ;; pitch
|
||||
0.5 gain ;; volume
|
||||
0.1 attack ;; envelope attack time
|
||||
@@ -42,14 +42,14 @@ Use `all` to apply parameters globally. Global parameters persist across all pat
|
||||
```forth
|
||||
;; Prospective: set params before emitting
|
||||
500 lpf 0.5 verb all
|
||||
kick s 60 note . ;; gets lpf=500 verb=0.5
|
||||
hat s 70 note . ;; gets lpf=500 verb=0.5
|
||||
kick snd 60 note . ;; gets lpf=500 verb=0.5
|
||||
hat snd 70 note . ;; gets lpf=500 verb=0.5
|
||||
```
|
||||
|
||||
```forth
|
||||
;; Retroactive: patch already-emitted sounds
|
||||
kick s 60 note .
|
||||
hat s 70 note .
|
||||
kick snd 60 note .
|
||||
hat snd 70 note .
|
||||
500 lpf 0.5 verb all ;; both outputs get lpf and verb
|
||||
```
|
||||
|
||||
@@ -57,17 +57,17 @@ Per-sound parameters override global ones:
|
||||
|
||||
```forth
|
||||
500 lpf all
|
||||
kick s 2000 lpf . ;; lpf=2000 (per-sound wins)
|
||||
hat s . ;; lpf=500 (global)
|
||||
kick snd 2000 lpf . ;; lpf=2000 (per-sound wins)
|
||||
hat snd . ;; lpf=500 (global)
|
||||
```
|
||||
|
||||
Use `noall` to clear global parameters:
|
||||
|
||||
```forth
|
||||
500 lpf all
|
||||
kick s . ;; gets lpf
|
||||
kick snd . ;; gets lpf
|
||||
noall
|
||||
hat s . ;; no lpf
|
||||
hat snd . ;; no lpf
|
||||
```
|
||||
|
||||
## Controlling Existing Voices
|
||||
|
||||
Reference in New Issue
Block a user