From the original SynthMaker forum (2004–2014), with its members’ names and dates.
unkargherth ·
OK., girls and boys, here it come...
Oversampling is one of the things that , as far as not directly implemented in core SM, is opened to approximations to make it work
What i'm looking ofr in this this topic is to open a discussion on what is the better way to implement it
I assume that, if you read this post to here, you are barely interested in it: so, for the sake of establishing a starting point for the debate, Here comes a basic scenario:
.- you have some process that you want to optimize quality, mainly in one of theis situations
a) The process shows high level of "sound artifacts" produced by aliasing
b) You want the general quality increase thet oversampling provide
the b) situation seems dificult to resolve inmediately because as far as i know,SM does not provide a way to work at diferent Sample Rates in diferent parts of schematic
Is the a) situation that i want to discuss
Basically you could build a piece of code that do as follows
1.- Wall filter the incoming signal ( not applicable to oversampled osc's)
2.- insert 0's as many as desired oversampling level required
3.- do the process
4.- WAll-filter the resulting signal
5.- Discard the inserted zeroes
Well. the above is obvious for a trivial process ( with the exception of wall-filtering - more on this later), like aplying a formula to the signal,etc. But if the process became complex (or you have some kind of complex filter for Wall-filtering), the code becames a mess
What i'm asking is you opinion about the above procedure ( is correct, is optimizable) or any other type of approximation to oversampling (What is better for wall filtering? FIR ? a csacede of biquads?) that youu are willing to share with comunity. There are many open questions on this (Any way to implement above steps modularly, ie in ddiferent code modules?)
Waiting your comments
stefan ·
Polyphase filters are popular for these things.
I guess you actually could have a code module that applies the sound process you're oversampling and let it have separate outputs for each "oversampled" sample. That is, at 4x it would have four outputs.
These would be fed into a polyphase filter module that would take care of the downsampling. This way you would atleast separate the different stages of the process, otoh you would have to do deal with several outputs for the "oversamples" instead of just one.
Might atleast be worth considering. Or not. Not sure 🙂
rl ·
I'm currently about to try 2x oversampling for a stereo effect plugin to leverage 4 SSE channels. I'm going for a polyphase IIR filter (less latency than FIR). Basically I have a chain of processing modules with an upsampler at start and a decimator at the end connected through a stream wire. At musicdsp is an example of a polyphase that should be adoptable to SM code.
dasdeck ·
i made an attempt to sheme the music dsp source code archive polyphase filter example. (not all coeff. variations done yet). at least the 104 db rejection one seems to do what i've expected.
can you please confirm that this is the right sheme to replicate the music dsp filter ? would be nice as im'n not shure wether this is even a filters (im shure it filters thought 😉 )(i never learned the underlying math, but i'mlooking forward to learn it at school soon).
thanks.
D3CK
P.S.: so is a this FIR polyphase? would be interested to see a IIR polyphase then (or vice versa).
rl ·
having a short look: perfect brickwall-looking pulse response. The 104 db one is the best! (They are IIR filters BTW).
cheers,
R2L2
dasdeck ·
yeh, very nice and steep, a bit to low, could be a bit brighter i think. ah. IIR. came to the conclusion myself today, since i just multiply the value by a number wich is not zero , zero (or any target value) is never reached, or you could say, reached in the infinity.
also i bit cpu heavy for realtme usage. i would like to find a solution with 2 or three cascades.
can someone point me to a FIR solution?
BTW. schouldn't it be possible to loop a section instead of using 4 signal pathes?
cheers.
D3CK
Kingston ·
dasdeck wrote: also i bit cpu heavy for realtme usage. i would like to find a solution with 2 or three cascades.
can someone point me to a FIR solution?
BTW. schouldn't it be possible to loop a section instead of using 4 signal pathes?
cheers.
D3CK
even 12th order cascade is perfectly adequate for realtime usage. It's really fast with the stream coding methods, especially since you can use a feedback loop with it. Heck, even latency is negligible that way. You get to have 2X oversampled stereo signal "for the price of one".
Me and sambean did just this in a great oversampling thread (search for it) last spring and it worked like a charm. I thought the resulted (10th order) highlevel oversampling module was included with the SynthMaker distribution?
I guess it's not anymore. I'll re-post it here in a few days.
[edit]
Oh hey look, sambean still had it online http://magalov.myweb.hinet.net/toolkit/IIRPP3.osm
It's an optimised version of the musicdsp.com polyphase allpass filter cascade, ie. the halfband and decimating filters in a neat package.
Our original discussion here:
Could use some help with this interpolator for resampling...
Wrote something here? To have a post removed or your name hidden, write to [email protected].