bandlimited antialiasing in synthedit?

Modular Synth design and releases (Reaktor, SynthEdit, Tassman, etc.)
Post Reply New Topic
RELATED
PRODUCTS

Post

not sure if i'm phrasing this correctly, but:

i have a 'comparator square' oscillator running in SE,
that produces some harsh artifacts at high pitches, which
i assume is 'aliasing'.

can anyone suggest how to correct this?
i read that aliasing is corrected by bandlimiting, so how
could i achieve this using standard SE modules? BPF/BEF with
band or gain controlled by input pitch? or would there be a
start point, and a specific scaling needed to tame things down
to an acceptable level at higher pitches?

would this apply to a similarly generated saw/ramp?

Post

lazydog wrote:not sure if i'm phrasing this correctly, but:

i have a 'comparator square' oscillator running in SE,
that produces some harsh artifacts at high pitches, which
i assume is 'aliasing'.

can anyone suggest how to correct this?
i read that aliasing is corrected by bandlimiting, so how
could i achieve this using standard SE modules? BPF/BEF with
band or gain controlled by input pitch? or would there be a
start point, and a specific scaling needed to tame things down
to an acceptable level at higher pitches?

would this apply to a similarly generated saw/ramp?
SE 1.2 has oversampling. This feature reduces the aliasing generated by naive square waves. The wave is genereted at a higher sample-rate, then filtered to remove artifacts. You can specify 2 times, 4 times...32 times oversampling.

SE 1.2 is not finished yet, but a preview is available to registered users.

Best Regards,
Jeff

Post

hi Jeff, i'm still using v1.017!
in fact, i'd quite like to get some understanding of
how it could work using a 'naive' method. eg: now
going to do a bit of research on what is involved ;)
want to mess around and see what i come up with.

maybe this isn't even aliasing; i just get harsh
upper pitches from a 'very square' wave, and want to
correct it a bit.

Post

if you need to ear if oversampling solve your problem
sent me a prefab to test, i will export from latest v1.2 alpha
at the requested O.S. coef (2,3,4,8,16,32)

(visit my website for contact/email)
Image

Post

there are many methods, with various considerations eg. how effective you want the bandlimiting to be vs. application (eg. are flat tops important for modulation, or is some of the gibbs effect/wiggly overshoot acceptible.. modulation or audio..)

you're best fixing it in the waveform generation rather than trying to post filter it. otherwise, you can get some bandlimiting by postfiltering, using the various available filters or building a simple one in synthedit, eg. averaging the last n # of samples.. unless you're using the sdk, then you should check the dsp forum for links and start researching.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

nope: i'm just using stock v1.0x modules :)
a LPF seems the quickest, according to some stuff i read.
but intuitively i sense that we're not talking about some
linear graduation, and that it will have to only start at
a certain point. and all that will do is make the sound
less bright eg LPF.
some kind of targeted bandfiltering might work as a hamfisted
bodge-job, perhaps, governed by input pitch, somehow. 'amount'
would be a gain parameter on the bandfilter>

i'm afraid you may assume i have more knowledge than i do,
and i don't. no samples are used here, unless you are
refering to samplerate. i'm not even sure i am getting aliasing,
per se. the sound just gets harsher the higher up it gets>
not specifically a problem for me, but someone commented, so...

Post

novaflash wrote:if you need to ear if oversampling solve your problem
sent me a prefab to test, i will export from latest v1.2 alpha
at the requested O.S. coef (2,3,4,8,16,32)

(visit my website for contact/email)
ok: we'll do this, since it woz eric wot complained :)

Post

mztk wrote:
can anyone suggest how to correct this?

would this apply to a similarly generated saw/ramp?
There is a quasi-bandlimiting scheme that you can implement in Synthedit - without the need to go all c++. It ain't perfect - but it can help, it's called "differentiated parabole wave". The naive sawtooth is the easiest to explain - firstly - take a NON-bandlimited sawtooth(a counter that wraps or a LFO saw - if you have a module like that) - now -> add it to both inputs of a level Adjust module(ringmod it) -> add that to another Level Adjust(pin1), rename it scaler -> now take that first ringmod signal again and delay it by exactly 2 samples and invert it and add it to the same pin1 of the level adjust - basically add the delayed and non-delay copies together. And voila - a semi-bandlimited sawtooth. But you'll find that the volume is all whack - you need some sort of scaling - now -> the formula goes Samplerate/(frequency * scalefactor) can be in Hertz or kHz - now plug-in the answer of that formula into pin2 of your scaler. The only thing you have to tweak in the formula - is "scalefactor". There is a block diagram of it in this paper:

"Design of a Scalable Polyphony-MIDI Synthesizer for a Low Cost DSP"
by Antti Huovilainen.

It might seem a bit complicated - but it's quite simple really. Considered a cheap trick by developers. There is also a pulse wave diagram in Antti's paper - so that can become your square wave. The 2 sample-delay might be tricky - but I think there is a free KDL module that can do samples->whatever(plug it into delay2 - no interpolation) and there was a free 1sample delay a long time ago by EVM - don't know if it's still available. Sorry that I can't help any further - I actually did do it in c++ as a sub-osc SEM (not publicly avaibable - so the scale factors would be different) but I'm 100% sure that it would work in Synthedit. Also - if you can wrap your head around the whole "parabole" thing, some other waveshapes become available:

Normal Triangle
Bright Triangle
Vintage Saw (use a rectified sine and skip the ringmod)
Organ Ramp
Pulse-Width Saw (my favourite)

P.S - if you figure out any other waveshapes - give me a shout-out and we can talk...

Cheers
Andrew

Post

wow. that's a whole new area of time consumption i can get into!
thanks, for the very specific directions. this method looks like
something i can get into. copied and pasted for offline reference.
i take it that's ainslie? :D

Post

mztk wrote:wow. that's a whole new area of time consumption i can get into!
thanks, for the very specific directions. this method looks like
something i can get into. copied and pasted for offline reference.
i take it that's ainslie? :D
Yip. Hope it helps!

Post

sure does, and predictably it took me off on a
whole new tangent for the day's session when i got
it hopelessly wrong - but i may have a new synth
on the go :lol:

Post Reply

Return to “Modular Synthesis”