From aee7433641d5c9766ce5f2b9d5b0d45cd82eef21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Fri, 30 Jan 2026 01:55:40 +0100 Subject: [PATCH] WIP: words for wavetable synthesis --- crates/forth/src/words.rs | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/crates/forth/src/words.rs b/crates/forth/src/words.rs index a0b59b3..3b062b5 100644 --- a/crates/forth/src/words.rs +++ b/crates/forth/src/words.rs @@ -1087,6 +1087,56 @@ pub const WORDS: &[Word] = &[ compile: Param, varargs: false, }, + Word { + name: "scan", + aliases: &[], + category: "Wavetable", + stack: "(f --)", + desc: "Set wavetable scan position (0-1)", + example: "0.5 scan", + compile: Param, + varargs: false, + }, + Word { + name: "wtlen", + aliases: &[], + category: "Wavetable", + stack: "(n --)", + desc: "Set wavetable cycle length in samples", + example: "2048 wtlen", + compile: Param, + varargs: false, + }, + Word { + name: "scanlfo", + aliases: &[], + category: "Wavetable", + stack: "(f --)", + desc: "Set scan LFO rate (Hz)", + example: "0.2 scanlfo", + compile: Param, + varargs: false, + }, + Word { + name: "scandepth", + aliases: &[], + category: "Wavetable", + stack: "(f --)", + desc: "Set scan LFO depth (0-1)", + example: "0.4 scandepth", + compile: Param, + varargs: false, + }, + Word { + name: "scanshape", + aliases: &[], + category: "Wavetable", + stack: "(s --)", + desc: "Set scan LFO shape (sine/tri/saw/square/sh)", + example: "\"tri\" scanshape", + compile: Param, + varargs: false, + }, Word { name: "begin", aliases: &[],