Best technique for antialiasing
-
- KVRer
- Topic Starter
- 1 posts since 25 Jul, 2009
I'm quite new to SonicBirth, and DSP in general.
I'm trying to remove the aliasing from very high notes on a simple Synth I have built.
I am wondering what the best method is to remove the aliasing, and also, where should the antialiasing be done? I've tried putting a double sampled low pass filter right after the saw generators, and also right before the final output, but I still get rather bad antialiasing.
Another question, would it be possible to build a saw wave from sine waves, and would that eliminate aliasing?
Any tips would be appreciated!
-SimonW
I'm trying to remove the aliasing from very high notes on a simple Synth I have built.
I am wondering what the best method is to remove the aliasing, and also, where should the antialiasing be done? I've tried putting a double sampled low pass filter right after the saw generators, and also right before the final output, but I still get rather bad antialiasing.
Another question, would it be possible to build a saw wave from sine waves, and would that eliminate aliasing?
Any tips would be appreciated!
-SimonW
-
- KVRist
- 277 posts since 3 Apr, 2007
Hi Simon,simonwittber wrote:I'm quite new to SonicBirth, and DSP in general.
I'm trying to remove the aliasing from very high notes on a simple Synth I have built.
I am wondering what the best method is to remove the aliasing, and also, where should the antialiasing be done? I've tried putting a double sampled low pass filter right after the saw generators, and also right before the final output, but I still get rather bad antialiasing.
You can reduce alias frequencies by oversampling and filtering the result. If you are using the builtin oscillators, they are not anti-aliased (well, except sine, of course). Ideally, they would output the bandlimited waveform. Since waveform generation is computationally expensive, the best approach to this would be to create elements which are antialiased (i.e. in C++). We should add it to the todo list.
Yes, this is the basis of additive synthesis. In additive, a saw is composed of audible partials at every multiple of the fundamental frequency. In actuality, there are a few commercial synths that use 32 or 64 partials with decent results. I know of a few that can generate from 64 to hundreds or thousands of partials. Due to the density of partials in a saw wave, the saw is computationally expensive to generate. The partial count for a saw wave is determined as: (HighestPartial/FundamentalFrequency)-1. So you are looking at 400 sine oscillators for a 50Hz saw. Partials are linearly spaced, and the partial frequencies are multiples of the fundamental: [50, 100, 150... 20000]. Since SB won't allow you to create oscillators dynamically, you must choose a fixed partial count (again, 32 and 64 are common) and work from there. 64 will often sound 'good, but dull' for the 50Hz note because the dominant frequencies will be present with 64 partials, but the high frequencies will be absent. Using 64 partials will sound exactly like an obscenely high quality digital oscillator, with an obscenely high quality brickwall filter at 3.2kHz. This partial ceiling (i.e. filter), begins at around 300 Hz when using 64 partials at 20kHz ceil. All notes below that frequency will be missing hf content.simonwittber wrote:Another question, would it be possible to build a saw wave from sine waves, and would that eliminate aliasing?
The frequency domain oscillator or a sample/wavetable approach may be worth investigation.
I hope that helps,
J
- KVRAF
- 14985 posts since 26 Jun, 2006 from San Francisco Bay Area
Wait... shouldn't it be un-aliasing instead of anti-aliasing? Anti sounds like we can somehow combat it, but we can't. It's already happened and all we can do is try and undo it.
Zerocrossing Media
4th Law of Robotics: When turning evil, display a red indicator light. ~[ ●_● ]~
4th Law of Robotics: When turning evil, display a red indicator light. ~[ ●_● ]~
-
- KVRist
- 277 posts since 3 Apr, 2007
I prefer 'counter-alias' and 'retro-alias':zerocrossing wrote:Wait... shouldn't it be un-aliasing instead of anti-aliasing? Anti sounds like we can somehow combat it, but we can't. It's already happened and all we can do is try and undo it.
"In addition to 3 new filter modes, this major update rounds out the aural artillery by providing an additional retro-alias oscillator which... uhm.. it rocks... just set your expectations high and prepare to experience "
- or -
"We've improved upon our flagship convolution reverb processors by developing our counter-alias synthesis engine (patent pending). This technology allows us to resize and resynthesize IRs in realtime, with an astounding 179 dB signal to error ratio. It's available by digital delivery, though it won't last long since we expect the server's hard drive to fail from the demand of this release. our server dood starts vaca in 2 hours ( )... buy it now!"
-
- KVRAF
- 2054 posts since 3 Jun, 2001 from Not far from Australia
-
- KVRist
- 277 posts since 3 Apr, 2007
I agree. Though I don't see the technology available soon, I think it is mentioning that element creations/additions are easy, if you are or know a developer.Midiworks wrote:Jokes aside,
it would be great to be able to change the reverb time of an impulse response and also being able to add an envelope over it.
This would be a great and useful addition!
Cheers
Rene
Regards,
Justin