Best technique for antialiasing

Official support for: sonicbirth.sourceforge.net
Post Reply New Topic
RELATED
PRODUCTS

Post

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

Post

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.
Hi Simon,

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.
simonwittber wrote:Another question, would it be possible to build a saw wave from sine waves, and would that eliminate aliasing?
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.

The frequency domain oscillator or a sample/wavetable approach may be worth investigation.

I hope that helps,

J

Post

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. :hihi:
Zerocrossing Media

4th Law of Robotics: When turning evil, display a red indicator light. ~[ ●_● ]~

Post

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. :hihi:
I prefer 'counter-alias' and 'retro-alias':

"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 :love: "
- 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 ( :roll: )... buy it now!"

:hihi:

Post

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
Image
DSP with attitude

Post

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
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.

Regards,

Justin

Post Reply

Return to “SonicBirth”