Files
Cagire/docs/wavetables.md

1.1 KiB

Wavetables

Control wavetable synthesis parameters for scanning through waveforms.

Scan Position

The scan parameter controls which waveform in the wavetable is active:

"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:

"wt" s 2048 wtlen .  ( standard wavetable size )

Scan Modulation

Animate the scan position with an LFO:

"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

"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