CLAMS overview
“I’ve never seen a happy clam. In fact, most of them were really steamed.” ~ M. Edward (Ed) Borasky
CLAMS is a text-based interactive environment for composing and performing music on a Raspberry Pi Pico H microcontroller board. This board costs about $5US and includes soldered male headers and a debug connector. The initial release of CLAMS uses a Pimoroni Pico Audio Pack for audio output. The audio pack provides stereo headphone and line outputs, and costs about $18US as of 2023-02-11.
CLAMS is a domain-specific language built on a Forth real-time operating system / interpreter. The user connects to the board from a command line on a host computer and enters CLAMS code interactively.
The CLAMS language is designed to facilitate live coding. Using a mixture of pre-compiled code and real-time directives, the user creates a performance in real time. The philosophy of CLAMS is similar to that of ChucK (Salazar et al. 2014) - a single text-based language to implement both the definitions of synthesized instruments and the sequences of sounds they make, intended for live coding / algorave performances.
CLAMS is based on Travis Bemann’s zeptoforth. If you’re new to Forth and want to get started, Brodie (2022) is the place to start. There are a few PDF versions of Starting Forth on the web, but many are older versions. The one you want is the Forth, Inc. web version at https://www.forth.com/starting-forth/0-starting-forth/
If you’re already a Forth programmer, the zeptoforth words are documented at https://github.com/tabemann/zeptoforth/tree/master/html (HTML) and https://github.com/tabemann/zeptoforth/tree/master/epub (EPUB). For more details, see the zeptoforth wiki.
CLAMS is a domain-specific language implemented in Forth. Conceptually, you can think of CLAMS as ChucK
(Salazar et al. 2014) semantics with Forth syntax. CLAMS will have a single syntax and semantics to describe every part of the music creation process:
the unit generators that make and process digital audio,
the signal flow graphs that connect the unit generators, and
the score a composer writes and the gestures a performer makes.
Thus, CLAMS consists of three sets of Forth words:
low-level words: real time digital synthesis and microcontroller audio,
mid-level words: signal flow graph construction
high-level words: human interface for composition and live performance
Although ChucK
is the primary inspiration for CLAMS, two early musical systems that used Forth are also inspirations:
You can find more about live coding from
See, for example TOPLAP Historical Performances, 80s FORTH era for some references to HMSL and to Ron Kuivila.
Text and figures are licensed under Creative Commons Attribution CC BY-SA 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Borasky (2023, Feb. 21). AlgoCompSynth by znmeb: About CLAMS. Retrieved from https://www.algocompsynth.com/posts/2023-02-21-about-CLAMS/
BibTeX citation
@misc{borasky2023about, author = {Borasky, M. Edward (Ed)}, title = {AlgoCompSynth by znmeb: About CLAMS}, url = {https://www.algocompsynth.com/posts/2023-02-21-about-CLAMS/}, year = {2023} }