Runt
Overview
runt
is a stack-based glue language used with monolith.
Similar to Forth
, Runt implements a global stack and
dictionary. User-defined procedures are technically
possible, but are virtually unused in the context of
Monolith.
Runt is used on top of the graforge C API
to create a stack-based audio language very similar
to sporth
, the author's project before Monolith.
Both Graforge and Monolith add hundreds of words to Runt's dictionary. Most of these are unit-generators, or ugens, which are graforge nodes wrapped inside of a Runt word defined in C.
In practice, runt code is usually evaluated from inside of
a scheme REPL
.
Runt In Scheme
Runt is typically run from inside scheme.
At startup, the Runt dictionary must be populated with
words. This is done with the command monolith:runt-loader
.
(monolith:runt-loader)
From there, runt code can be evaluated with
monolith:runt-eval
.
(monolith:runt-eval "'hi' say")
If monolith.scm
is loaded (it is by default when used in
the REPL), monolith:runt-eval
is abbreviated as rvl
.
(rvl "1 2 + 3 * p")