A Physical Model of Saxophone
Another example of bespoke software
I’ve always been a bit of a musician. I play many different instruments, none of them as a virtuoso, but professional players always treated me as one of their own.
My favorite live instrument is a Yamaha WX-5 MIDI controller plugged into Yamaha VL-70M synthesizer with Matt Traum’s voices. It is an old device, from the late 90ies, but I prefer it to everything new on the market.

One reason - it is not based on samples, it is a physical model that came out of Stanford research in the 80ies. As a former physicist, I get a kick out of physically modelled instruments. They are usually very small, and much livelier than sample based one. In fact, the instruments in the VL are fundamentally unstable, that’s what makes them alive!
The model in VL-70m uses two cylinders. A simple model. That’s what you could simulate with the older hardware.
I thought what the heck, you can now model a horn honestly, and use its conical shape correctly. Claude Code to the rescue! Let’s solve some differential equations numerically!
I collected the literature, from 80ies to the modern writing. I set up Agda specs.
We’ve got to work, and it was a highly interactive session. I read the papers, looked for information, played the intermediate models. Two days later, I can actually enjoy playing, and it’s not bad at all!
Here’s a web version. It is simplified, but it has a virtual keyboard, and can be a MIDI host, so you can interact with it.
https://openhorn.pixtorium.com/
It is open source, and you can look at it at
https://github.com/gazillion101/openhorn
If only I could make money off of it. Unfortunately, I have to tell my wife that her husband now has an expensive hobby of building bespoke software!
The whole exercise took about two days, a night of optimizations, and $250 in Anthropic tokens.


Discussion about this post