Fix: update docs about snd

This commit is contained in:
2026-03-06 08:40:41 +01:00
parent f273470eaf
commit d055d2bfc6
23 changed files with 228 additions and 200 deletions

View File

@@ -19,7 +19,7 @@ Play something -- a pattern, a live input, anything that makes sound. When you'r
The recording is now available as a sample:
```forth
drums s .
drums snd .
```
## Playback
@@ -27,10 +27,10 @@ drums s .
Recorded samples are ordinary samples. Everything you can do with a loaded sample works here:
```forth
drums s 0.5 speed . ;; half speed
drums s 0.25 begin 0.5 end . ;; slice the middle quarter
drums s 800 lpf 0.3 verb . ;; filter and reverb
drums s -1 speed . ;; reverse
drums snd 0.5 speed . ;; half speed
drums snd 0.25 begin 0.5 end . ;; slice the middle quarter
drums snd 800 lpf 0.3 verb . ;; filter and reverb
drums snd -1 speed . ;; reverse
```
## Overdub
@@ -70,7 +70,7 @@ Record a foundation, then overdub to build up:
"loop" dub
;; 4. play the result
loop s .
loop snd .
```
Each overdub pass adds to what's already there. The buffer wraps, so longer passes layer cyclically over the original length.
@@ -80,16 +80,16 @@ Each overdub pass adds to what's already there. The buffer wraps, so longer pass
Once you have a recording, carve it up:
```forth
loop s 0.0 begin 0.25 end . ;; first quarter
loop s 0.25 begin 0.5 end . ;; second quarter
loop s 0.5 begin 0.75 end . ;; third quarter
loop s 0.75 begin 1.0 end . ;; last quarter
loop snd 0.0 begin 0.25 end . ;; first quarter
loop snd 0.25 begin 0.5 end . ;; second quarter
loop snd 0.5 begin 0.75 end . ;; third quarter
loop snd 0.75 begin 1.0 end . ;; last quarter
```
Combine with randomness for variation:
```forth
loop s
loop snd
0.0 0.25 0.5 0.75 4 choose begin
0.5 speed
.