CLAMS live coding Raspberry Pi Pico zeptoforth

CLAMS overview

M. Edward (Ed) Borasky https://www.algocompsynth.com

“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:

Thus, CLAMS consists of three sets of Forth words:

Inspirations from previous Forth musical systems

Although ChucK is the primary inspiration for CLAMS, two early musical systems that used Forth are also inspirations:

More about live coding

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.

Anderson, D. P., and R. Kiuvila. 1991. Formula: a programming language for expressive computer music.” IEEE Computer 24 (7): 12–21. https://doi.org/10.1109/2.84829.
Anderson, David P., and Ron Kuivila. 1989. “Continuous Abstractions for Discrete Event Languages.” Computer Music Journal 13 (3): 11–23. http://www.jstor.org/stable/3680007.
Blackwell, A. F., E. Cocker, G. Cox, A. McLean, and T. Magnusson. 2022. Live Coding: A User’s Manual. Software Studies. MIT Press.
Brodie, Leo. 2022. “Starting Forth.” FORTH, Inc. https://www.forth.com/starting-forth/0-starting-forth/.
Salazar, S., A. Kapur, G. Wang, and P. Cook. 2014. Programming for Musicians and Digital Artists: Creating Music with ChucK. Manning.



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

  author = {Borasky, M. Edward (Ed)},
  title = {AlgoCompSynth by znmeb: About CLAMS},
  url = {https://www.algocompsynth.com/posts/2023-02-21-about-CLAMS/},
  year = {2023}