Showing posts with label synthesis. Show all posts
Showing posts with label synthesis. Show all posts

Tuesday, June 17, 2008

Still alive...

Some time has passed without any updates again. That's been because there has been enough other stuff happening I guess. Haven't had much to talk about too, because what I've been doing has either been not of general interest, or has been in a phase where it's not ready to be announced, or too damn technical to explain without some effort.

Anyway, situation is that Valo was kinda announced on KVR forums and got some feedback. Then I basically rewrote it's modulation stuff and some minor additions and whatever. Still haven't been making much noise about it though, because I still haven't got a website up for it. The other thing is that I'm currently reconsidering what I'm going to do with it, because I'm not sure if I have time right now to add those features that I would like to see done before I start messing with licenses to people. I'm trying to fix the most critical stuff as soon as possible, but whether I'm going to do a commercial release is open. I'd like to see it used though, so I'm keeping the possibility open that I just release the current version as freeware instead and then do some new stuff in a successor as some stuff wouldn't easily fit in Valo anyway.

In any case I managed to come up with some sort of a tune using (mostly) Valo, which gave me a better perspective of where it is currently. There's definitely a lot of things it could be doing, but at least I'm starting to believe that it actually already fills the initial design goals quite nicely. It can provide me some of the edge, but also warmth, that my previous attempt was incapable of. On the other hand adding the old filter from the previous project as an alternative might be a good idea, because the transistor-ladder-wannabe in Valo cannot quite do some of the sounds that I so liked about the previous project.

I'm going to allocate some more time for DSP development again though. I've got a lot of ideas, but Valo is still my priority, and after that I'm considering a small personal platform of some sort, so I can go faster from quick&dirty prototypes to quality product. This will take some thinking and trying and testing, but I might talk about those things in the future here, since as far as I know, there's not that much audience on this blog that I would alienate.

I'm also thinking of setting up a more generic website to collect and write about some stuff that is really hard to find on the web. Topics would probably fall between music theory, sound design theory and audio signal processing theory. I could write some of the stuff here, but I don't think a blog is necessarily the right format for that, and mixing my personal rants and proper content probably isn't such a great idea. I'm not going to build yet another open community forum though, because we've got enough venues for freeform discussion I think. Rather I'm thinking of focusing on editorial content.

Tuesday, January 22, 2008

More interesting example of my project synth's sound



[no-flash: mp3 here]
Drums are from FPC, rest is from 4 instances of the previously mentioned new project, effects are external, and mixing sucks. Turn volume up, it's not mastered.

Saturday, January 19, 2008

Valoa kansalle

I had to throw away my old synth, for various reasons. Well, I didn't really throw it away, but it will take ages to make anything sort of a product, 'cos certain things weren't really done the way you would want to do them in a reliable software synthesizer.

The good news though is that for past half a year or so, I've been working on a new codebase, and somewhat different concept. The new synth thingie I call 'Valo' and while it's nowhere near finished, it's got to the point where most things work (well, there's no PWM yet and modwheel/aftertouch/velocity support is missing, and MIDI side lacks quite a few things and...) and it makes sound.

At present it has a completely redesigned oscillators, new filter design (well, if you can call a ladder low-pass new anymore these days) and it does all kinds of fancy stuff like mm.. sawtooth and square waves (well actually triangle as well) and it can do stuff like oscillator sync (properly) and the signal path is so non-linear it's a pain to tune everything 'cos when the signal levels change in one place, everything behind it has to be retuned with proper levels again.. which fortunately is not that many things.

I can't say it sounds clean. With all the non-linearities causing intermodulation distortions and noise here and there making everything slightly unstable, it most certainly does not sound very clean. On the bright side, it can sound approximately as clean as your average analog synth.



[no-flash: mp3 here]
Yup, there's sample. Thought you'd like one. Some external effects (Kjaerhus Classic-series Chorus/Delay/Reverb) with pretty simple settings to make it sound less dry as the synth itself doesn't have any add-on effects (I'm not a huge fan of those) and currently only ever outputs mono-signal (that might change I think).

The patch itself is a "little of everything" thing with almost everything in the synth in use, including oscillators in synced mode, pitch envelope driving the slave, some (per-voice) distortion to trash it after filter, and finally both LFOs messing with the signal. No manual knob tweaking done. I'm sure you can tell I'm a very good sound designer.

Sunday, October 14, 2007

Audio from some recent code


[no-flash: mp3 here]
While I generally liked how my old code sounded, my last iteration of a sound engine had couple of problems. It wasn't nearly as "fat" sounding as I'd hoped, with a bit of too much noise. It'd still sound fine for lower sounds, but the high-end was never quite clear, and both the filter and the oscillators were quite dark and not very aggressive.

Well, I'll be throwing those oscillators away. The filter I might eventually fix. But I've been working with some new oscillators and a new filter, and this sample demonstrates what three triangle waves and a lowpass filter can sound. This is pure virtual analog, no wavetables or anything like that, everything is calculated realtime. Unfortunately, it IS quite heavy on the CPU as of now, so I'll have to see how to optimize it. Eventually that'll happen.

Oh, and I apologize that mp3-compression is somewhat audible.

Monday, January 8, 2007

Virtual Bending

There was some talk about circuit bending on a Finnish music site Mikseri.net, which got me thinking whether I'd have some stuff to try bend at home.

Well, I failed to find anything.

So instead I made some noise with my virtual analog software synth project. The tune, "Virtual Bending" can be found in my less-serious-music-project page in Mikseri.

Saturday, January 6, 2007

Filter singing


[no-flash: mp3 here]
Who needs oscillators when you have a filter. A bit noisy for now, will have to clean it a bit.

Friday, January 5, 2007

More sound


[no-flash: mp3 here]
Since the synth thingie has got some new features, I thought of posting another small sample of what it can sound like in wrong hands. That's a dry sample, with 2 voices unison for the stereo effect.

Monday, December 18, 2006

Sample of what I'm working on

Ok, here's a really quick sample clip of stuff my synthesizer project currently does.


[no-flash: mp3 here]
One sound, live playing, a touch of delay but no other effects.

Oh and the player (which hopefully works) is XSPF Web Music Player button version.

Saturday, December 16, 2006

Fast pow2 for pitch to frequency mapping

Ok, so I posted a thread about this in KVR, and obvious I'm not the only one to have thought about it (which was to be expected ofcourse), but I'm still posting this here for future reference, since I don't have anything else to post about today.

In synthesizers, being able to convert from pitch to frequency is necessary. In equal tempered scale this involves the relation f=b2p/12, where f is the frequency, b is the tuning base, and p is the pitch in semitones relative to the base tuning. This is trivially solved in C++ by f*pow(2.0,p/12). Trouble is, pow() takes an awful lot of time, so it's not really realistic if you want to do it on per-sample, per-voice basis.

One would expect to find some nice code that solves this problem reasonably accurate for the purposes of synthesizers, yet still reasonably fast. I've tried doing this a few times, but always failed. By reasonably accurate I mean something that gives resolution of about 1/100 semitones over the range of hearing (around 10 octaves). Most solutions I've seen are either

  1. wildly inaccurate or only accurate near 0
  2. only marginally faster (often slower than) than what gcc gives for pow
So all hope is lost? Not really, if one is willing to pay for a few lookup tables.

Now, looking at the facts, the accuracy requirements are measured in fractions of semitones. This suggests rounding before exponentiation should not cause problems, if the exponential itself can be calculated accurately. So how much accuracy does one need?

First of all, one only needs to consider one side, since 2-x = 1/2x. Let's say we say we want to go up and down 10 octaves, we need at least 4 bits for the integer part. As for the fractional part, 1 octave = 12 semitones, and 1 semitones = 100 cents. Hence there are 1200 cents to an octave. For 12 bits one gets 4096 tunings between octave. That's a total of 16 bits, and more than enough.

Full lookup table for 16 bits would ofcourse take 65536 entries, which for 32-bit floats takes a 256kB. Not huge these days, but exponentials have the nice property that a(x+y)=axay. And this ofcourse means one can do a separate table for the upper 8 bits and the lower 8 bits. That's 256 entries per table, both tables together taking 2kB of memory.

So the algorithm for pow2(x) with two tables of 8 bits each then goes:
  1. if x<0 recurse for 1/2-x
  2. multiply x by 212
  3. round/floor/whatever x into an integer (in C++ cast works fine)
  4. do table lookups with 8 lowest, and 8 next bits, and multiply them together
  5. return result
Ofcourse one can use more than two tables for more accuracy or lower memory requirements. How to populate the lookup tables is left as an exercise for the reader.