Write some amount of documentation
This commit is contained in:
55
docs/wavetables.md
Normal file
55
docs/wavetables.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Wavetables
|
||||
|
||||
Control wavetable synthesis parameters for scanning through waveforms.
|
||||
|
||||
## Scan Position
|
||||
|
||||
The `scan` parameter controls which waveform in the wavetable is active:
|
||||
|
||||
```forth
|
||||
"wt" s 0.0 scan . ( first waveform )
|
||||
"wt" s 0.5 scan . ( middle of table )
|
||||
"wt" s 1.0 scan . ( last waveform )
|
||||
```
|
||||
|
||||
## Wavetable Length
|
||||
|
||||
Set the cycle length in samples:
|
||||
|
||||
```forth
|
||||
"wt" s 2048 wtlen . ( standard wavetable size )
|
||||
```
|
||||
|
||||
## Scan Modulation
|
||||
|
||||
Animate the scan position with an LFO:
|
||||
|
||||
```forth
|
||||
"wt" s 0.2 scanlfo . ( LFO rate in Hz )
|
||||
"wt" s 0.4 scandepth . ( LFO depth 0-1 )
|
||||
"wt" s "tri" scanshape . ( LFO shape )
|
||||
```
|
||||
|
||||
Available shapes: `sine`, `tri`, `saw`, `square`, `sh` (sample & hold)
|
||||
|
||||
## Example
|
||||
|
||||
```forth
|
||||
"wavetable" s
|
||||
60 note
|
||||
0.25 scan
|
||||
0.1 scanlfo
|
||||
0.3 scandepth
|
||||
"sine" scanshape
|
||||
.
|
||||
```
|
||||
|
||||
## Words
|
||||
|
||||
| Word | Stack | Description |
|
||||
|------|-------|-------------|
|
||||
| `scan` | (f --) | Set wavetable scan position (0-1) |
|
||||
| `wtlen` | (n --) | Set wavetable cycle length in samples |
|
||||
| `scanlfo` | (f --) | Set scan LFO rate (Hz) |
|
||||
| `scandepth` | (f --) | Set scan LFO depth (0-1) |
|
||||
| `scanshape` | (s --) | Set scan LFO shape |
|
||||
Reference in New Issue
Block a user