chain word and better save/load UI

This commit is contained in:
2026-01-23 23:36:23 +01:00
parent a1ddb4a170
commit f75ea4bb97
20 changed files with 775 additions and 132 deletions

View File

@@ -428,6 +428,13 @@ pub const WORDS: &[Word] = &[
example: "pattern => 0",
compile: Context("pattern"),
},
Word {
name: "pbank",
stack: "(-- n)",
desc: "Current pattern's bank index",
example: "pbank => 0",
compile: Context("bank"),
},
Word {
name: "tempo",
stack: "(-- f)",
@@ -621,6 +628,13 @@ pub const WORDS: &[Word] = &[
example: "140 tempo!",
compile: Simple,
},
Word {
name: "chain",
stack: "(bank pattern --)",
desc: "Chain to bank/pattern (1-indexed) when current pattern ends",
example: "1 4 chain",
compile: Simple,
},
// Lists
Word {
name: "[",
@@ -1550,6 +1564,7 @@ pub(super) fn simple_op(name: &str) -> Option<Op> {
"ramp" => Op::Ramp,
"range" => Op::Range,
"noise" => Op::Noise,
"chain" => Op::Chain,
_ => return None,
})
}