In the last post we delved in to the math of the non-aliasing oscillators. Now it's time to make some noise with them.
The importance of avoiding aliasing is best demonstrated with an example:
Aliased blitsong by frostburn
Sounds weird doesn't it. I rendered the song with a low sampling rate (8000 Hz) to accentuate the effect. Now let's try the same song with the same sampling rate but this time without the offending frequencies.
Non aliased blitsong by frostburn
Much better. Sure it's missing in brightness due to the low sampling rate but the "metallic", broken sound is gone and we're left with only pure tones that can be faithfully reproduced. Here's the same piece once more but now with CD quality audio and a different instrument.
Blitsong with saw1 by frostburn
The sound is quite thin but that's plain bandlimited oscillators to you. They'll get more body once we pass them through a few filters in a future blog post about subtractive synthesis.
Status of the Python Library
As can be heard from the above sound clips the sound synthesis library exists and can render output. I just don't feel that it's ready for a release yet. I want to make sure that the approach I'm taking works and suits my (overambitious) needs. Besides, there are already plenty of audio synthesis libraries out there. I'm creating my own just for the challenge of it.
The general idea is to use the generators in Python to, well, generate sound. They are reasonably fast but not fast enough for serious synth work. Right now I'm looking for a way to speed things up. Processing the audio streams in chunks using numpy looks promising but such an approach precludes certain feedback effects so it wont work for everything.
With the library in limbo I'll have to make these blog posts and the accompanying audio clips without referring to the actual implementations.
No comments:
Post a Comment