"Happy as a clam? You know what? I've never seen a happy clam. In fact, most of them were pretty steamed!" - Buck Borasky, Frontier Programmer
I'm putting this project on hold for a little while. The reason:
A few days ago, a small group of well-known folks in the computer music
industry went public with something awesome that they've been working on
called sndstation. Here are the links:
This is a game changer (pun intended) and my plan is to start developing some more advanced music creation tools for their platform as soon as I can get my hands on a compatible device and they post their open source platform code.
I've held off (another pun intended) getting a handheld gaming device until now because
- I'm not a gamer, I'm a Linux and computer music nerd, and
- Hand cramps suck.
But an open source handheld Linux platform I can develop applications for is worth an occasional hand cramp.
In short, sndstation looks like it can free me of platform development
efforts so I can spend time developing applications and computer music.
Win-win!
The goal of CLAMS is to get the most possible computer music out of the smallest possible computers. The current version is aimed at Raspberry Pi single-board computers, compute modules and microcontrollers. CLAMS features
- A minimalist command line approach based on Alpine Linux,
- Multiple connection options - USB, HDMI, wired / wireless Ethernet and Bluetooth,
- Up-to-date Linux audio plumbing:
- PipeWire with ALSA, JACK, and PulseAudio compatibility support,
- WirePlumber,
- rtkit,
- The FluidSynth SoundFont-based synthesizer,
- The Faust functional music programming language and development toolchain, and
- The GCC 15 and LLVM 20 toolchains.
CLAMS is primarily intended for use on a Raspberry Pi Zero 2 W or larger as a software platform, either stand-alone with a monitor, heyboard and mouse, or headless on a network with a wired or wireless connection. I'm not a hardware maker in any sense. If you are, and want to build a musical device using this software with a Pi board inside, I'd love to hear about it, but I cannot offer any practical support on hardware issues. The closest CLAMS will ever get to the Pi hardware is 64-bit Arm assembly language.
The primary target for CLAMS is the Raspberry Pi Zero 2 W. The available RAM on a freshly-booted Zero 2 W with a wireles connection is almost 100 megabytes more for 64-bit Alpine Linux than for 64-bit Raspberry Pi OS Lite.
-
Alpine Linux 64-bit:
$ free -h total used free shared buff/cache available Mem: 415.7M 45.1M 108.9M 340.0K 261.7M 360.0M Swap: 0 0 0 -
Raspberry Pi OS Lite 64-bit:
$ free -h total used free shared buff/cache available Mem: 415Mi 152Mi 81Mi 2.5Mi 235Mi 262Mi Swap: 414Mi 0B 414Mi
Faust is an optimizing compiler for computer music programming. Target environments include the Daisy Seed, PJRC Teensy, Bela, Rust and WebAssembly. There is a vibrant Faust community, including AI toolmakers. Faust comes with many examples and has an extensive online manual. See also Audio Signal Processing in FAUST and Faust and AI Programming.
The CLAMS command line uses the standard Linux bash shell instead of
the minimalist ash shell Alpine Linux provides as a default. The
Starship cross-shell prompt generator is
included. For best results you will need a nerd
font in your terminal emulator. The
Cascaydia Cove nerd font is installed with CLAMS if you're using CLAMS
on a stand-alone console, and you can copy it to your host for a
headless system.
Also installed:
This is the first alpha release, v0.7.5. It has most of what I want
and can be installed on a Raspberry Pi Zero 2 W or any larger Raspberry
Pi. It is currently based on Alpine Edge and uses some packages, most
notably Faust, from the Alpine testing
repository.
A formal release candidate will not happen until at least Faust has
migrated out of testing into an Alpine stable release.
For the road map, see https://github.com/AlgoCompSynth/CLAMS/issues and https://github.com/orgs/AlgoCompSynth/projects/26. My near-term plan is mostly testing the Faust examples to see what will and what won't run in the limited-capacity Zero 2 W. There are a couple of upstream issues that I need to document that are blocking some planned features as well.
I'm actively looking for feature requests and, to a lesser extent, testers. Setting this up is a bit tricky; see ./getting-started for the details. For feature requests, questions about usage and bug reports, open an issue at https://github.com/AlgoCompSynth/CLAMS/issues/new.
There are numerous music software packages for Linux already. The ones I've included are the ones best suited to a command line environment. I'd love to include Pure Data, SuperCollider and trackers, but they depend on graphical user interfaces that might be problematic on the Raspberry Pi Zero 2 W with only 512 MB of RAM.
CPU and RAM capacity are unlikely to be an issue for MIDI or audio. The Zero 2 W has four 1 GHz 64-bit Arm cores that include the Neon SIMD instructions. And the available RAM is more than enough for most conceivable audio processing. Many commercial musical instruments use microcontrollers with much less CPU and RAM capacity than the Zero 2 W.
Where the rough edges are is RAM usage during compilation. Faust is a
compiler, and most of its outputs need to be compiled with the target
device's compiler. Optimizing compilers use a fair amount of RAM. As a
result, on the Zero 2 W, using multiple cores in compiling is often
problematic, and some code won't even compile with a single make
job.
So there are going to be some interesting musical artifacts that can't be produced for the Zero 2 W on the Zero 2 W. If you're interested in cross-development of musical software / firmware with CLAMS, you might well need a larger Raspberry Pi. I have an 8 GB Pi 4 and a 16 GB Pi 5 I can use to determine the requirements of large examples that break in the Zero 2 W. Nobody will stop you from developing for the Zero 2 W on your Pi 500+.
There is also a GPU on the Pi Zero 2 W and by default Alpine reserves 64 MB of RAM for it. There is quite a bit of software for it but I do not have using it on the road map yet.
If you want to experiment with CLAMS, see the following. Note that as I
noted above, a formal release candidate won't happen at least until
Faust moves from the testing repository to a stable release.