Spring Synth
It has been a while. I've been working on something quite fun, it is a physical modelling synth. It is a bit bigger than the usual hackish programs I put up here, and ties lots of different things together. I wouldn't say it is ready for primetime yet, but it is at a stage where it is fun to use.

So it is an audio synth with a 3d wireframe view of the model it is synthesizing. So this particular model sounds like this:
To drive it, you create a lua script which builds up the model, saying where to put points, how heavy they are and how the points join together. The joins are all springs, with a fairly simple model. The lua script can also define events, at the moment I bind these to keypresses, so you might have something like this:
function event.key_a(s)
apply_force_set(s, "hit_me", 0.0, 0.0, -250.0);
end
Which applies a force of 250 units, in some particular direction (either down or up I suspect) to all of the points that have been labeled "hit_me" whenever the "a" key is pressed.
As a heads up, don't use models/scripts from people you don't trust, they are programs in their own right and can do bad stuff like deleting files.
Any springs that are labeled as "air" are used for getting sound out of the model. Since I don't model actual air, I can't model a real microphone. The raw signal is the total displacement of all the springs labeled "air". This is then filtered and limited a bit to allow you to make pretty much anything and get useful sound out of it without having to tweak numbers. However, if you have a loud thing and a soft thing, then the soft thing probably won't be audible. This layer is all a bit of a hack.
So, there was the OpenGL wireframe for output, but you might also want to be able to hear what is going on. I've been a bit busy here too, and made 3 dynamically loadable output plugins. Firstly, it can output a wave file using libsndfile. Then it can also output over PulseAudio. Then it can also output over Jack. Having written these three plugins, I must say that I do like these APIs. They were quite pleasant for what I wanted to do.
The source code ( is all C (except for the demo lua file) and GPL3. It should compile cleanly, but given that is has a few dependencies you might need to poke it a bit. There is a readme which tells you what packages you need, and how to drive it.

RSS