Kitaab

Setting up Clojure through Pipewire on NixOS

audio generative overtone clojure

published 2022-04-02 11:42

updated 2022-04-02 11:42

There was a lot going on here. I had already installed Pipewire on Nix and needed a way to access the jackdbus through Overtone, and even though I thought I had jackd installed (which I did), the bus wasn't active. I had to enable it manually through qjackctl (I think?), and also had to install the jack_lsp package which I believe comes from pkgs.qacklib2 -- This was wrong, Sorta, I did have jackdbus working, but I didn't have the lsp extensions available for overtone to connect to jack. Pipewire really does solve linux audio Once I had those setup, and Overtone was able to find the jack server, I still had to route it. I could load things up in qjackctl but still wasn't able to produce sound, so I switched to just using pw-link on the cli and wrote a lil script to connect channel 1 to my alsa output automatically (which I believe is the sink jack is using? Who even knows how audio routing works on linux) Then it turned out overtone's internal synth engine was pretty flaky, so I swapped to using an external instance of scsynth Then it turned out the nrepl is also prone to breaking when running functions that return sound Then I couldn't figure out how to record the audio output of alsa because I was running pipewire

Then I finally had a "complete" setup. I recorded some demo music :)

I hope to record at least some noodle everyday. I'm scared of "finishing" so I'm going to keep finishing things until it becomes normal.

Something about learning nix, clojure, scsynth, and linux audio hell all at the same time feels really satisfying. Look! "Real" "engineering". Declarative configuration management for reproducible (sorta) environments for niche audio adventures