Poseidon is my attempt at creating a virtual analog synthesizer. The primary purpose of this is to learn how those things work.
Despite it being a "work-in-progress", there are already some things I think are pretty nifty. The first thing is that whereas most such synths are based around two oscillators, filters, amplifiers, etc., this one is architectured around three of each. All objects interact with each other in complex ways - this is probably a little too abstract for real-life users, but I wanted to experiment with all the possibilities.
I have recorded a few MP3s that you can listen to to get an idea of the various effects.
You can start by listening to the sound from the picture : "Pumping Bass".
The Detune function (top left) makes each of the three oscillators follow a random frequency around the supposed frequency. With sine-waves, you get some cancellations sometimes, but with square or sawtooth waves, it really makes the sound more living. Here's a sound to hear the Detune function in action.
The filters have three modes : low, high and band-pass. They are standard state variable filters. Their cutoff frequency can be controlled by the LFOs, which is how I got that sweeping wind noise in "Pumping Bass". It can also follow the keyboard pitch, and if you combine that with the envelopes, you can get a pretty cool swelling-up sound. The Q, or resonance, can currently be controlled by the keyboard velocity and/or by the envelopes.
Each filter sends its sound down to the corresponding amplifier. The amplifiers are controlled in gain and in panning by two envelopes and two LFOs each.
The envelopes are standard ADSR generators. They generate a sample-by-sample envelope for smooth transitions between the notes. A short attack time with sine-waves give some sort of electronic piano.
Finally, the LFOs generate positive sine-waves to control the other objects (and to control each other, although that's not implemented yet!)
When tweaking a little more, you get to produce quite funny sounds. With little work, you get a complete psychedelic hymn to the rhythm of nature. Yes, I like square waves !
Version 1 won't be a real soft synth with all that it implies. It will be a rather feature-poor softsynth, but with audio that sounds correctly. I'll worry about all those MIDI-pedal and preset-library stuff at a later stage.
My strategy for developing Poseidon was to get something (anything, really) that would make the right kind of sound up and running as fast as possible. You see, that's the only way to know if you're on the right track. I chose an object-oriented design because that's what I do best, and that's how I got a working prototype in less than three days.
Performance was never a goal until now. Actually, I think many softsynths go for that all-the-audio-engine-in-one-big-hand-coded-assembler-function, which lets them squeeze out about 200 or 300 simultaneous voices for the reasonably fast ones. Before I even started worrying about performance, I was at 10 voices. With compiler optimization turned on, I get up to 25. My first goal is 100 - when I get there, I'll stop optimizing and get back to work on the features.
The point is : this is a synth by an application-developer, not by a DSP-hacker, so bear with me here : I will make it better and faster, but that's not the point.
So, therefore, the source code is fairly clean, which is a good thing.
One last thing : the user-interface is not a user-interface. It's a prototype designed to make my life testing the parameters easier. I'm very fond of user-interface design, and I wouldn't use such an uggly synth in my whole life. But again... first things first.
The whole beast is written using Lazy C++, which really really really makes life easier. The LZZ executable is included for Linux.
Given the dependencies to Linux-specific sound drivers and other libraries (ALSA and Jack, and GTKmm and such), Poseidon is really not meant to run on Windows. That's why I include a picture and samples. Here are some of the major dependencies to build and run Poseidon :
I do have a hand-crafted Windows executable somewhere, but it comes on demand and there's a whole bunch of DLLs following it.
If you want to take a peak at the guts, feel free to download the source code. The main file explains the architecture of the synth.
Enjoy !
Carl