Oversampling stuff inside SynC modular

let`s imaginate, we already have build some oscillators and want to modify them with a filter. We want to oversample this Filter to get a better sound quality. We can rise the whole project samplerate, wich works fine at all, but rises the CPU Costs since all other parts i.e. LFO`s Envelopes and whatnot are faster, too. in this example we only want to rise a specific part of our ensemble, like:


Ok. We don`t have such a magic "44100 to 88200" - box in SynC Modular at all ! but we can replicate exactly the same effect mathematicly, by multiplying the structure of that specific element. more on that later.

another element is the interpolation while up- and downsampling. Upsampling anything means creating new samples inbetween the existing ones. it wouldn`t make much sense to just duplicate samples twice, and afterwards taking only every 2nd sample out again by downsampling. so we need a proper interpolation to aproximate the samples inbetween the existing ones




the calculation of this is very simple:

("Actual Sample" + "Last Sample")/2 = the sample inbetween

in SynC Modular it looks like this:



you see, we have two outputs here, "1st" is the original sample and "2nd" is the newly calculated one. What we do next is process each path with the desired element:



Downsampling is kind of the same process in reverse:



the same process, a little CPU-Friendlier:



in the upsample-process we mathematicly delayed the 2nd path by a half sample. we cannot undo this delay, but we can adjust booth paths to have the same delay in the end. in this downsampling process, the 2nd Path is delayed another half sample, to get a total of one sample delay. as you can see the first path is delayed one sample, too. so they are equal again. thatīs it.

This method uses the linear interpolation, so it delays the audio by one sample no matter by wich factor we upsample. there exists other interpolation algorithms like "Hermite" or "Polyphase Filter" that applying cutting frequencies above the nyquist at the cost of more sample-delays and of course CPU.

Attached Examples:

2-pole Upsample x2.smm

2-pole Upsample x4.smm

Parabol Sat Upsample x4.smm

Saw AA Upsample x3.smm