SQLar is an experimental archive format built inside of SQLite. Monolith has bindings for SQLar that allow it to be used to read/store samples.
A version of the
sqlar CLI is embedded with the monolith
distribution, and can be run with
Alternatively, one can go into the sqlar directory and
install it separately.
Adding a WAV sample
foo.wav to the sqlar archive
foo.sqlar is a matter of running:
sqlar foo.sqlar foo.wav
This sample can then be loaded using the scheme function
The scheme code below loads
foo.wav from archive
and loads it into an ftable, then
stores the ftable into register 0,
where it can then be used in ugens like
osc (assuming a power-of-two size).
(regset (sqlar-load "foo.db" "foo.wav") (param 0))
This is equivalent to the following runt code:
"foo.db" "foo.wav sqlar_load 0 regset
Because runt is stupid with strings, be sure to evalulate both strings on the same line. Or, just use the scheme function, because it handles this for you!