ScriptNode OverSample & FixXX_Block containers - When to use
-
I'd love some guidance as to when and when not to use both these containers. Can anyone share some basic principles please?
-
Aliasing happens when a waveform contains high frequency content above half the sample rate.
The Oversample node runs at a high sample rate, does a low pass filter (above the audible range), and then down samples. This allows us to push aliasing higher up and then attempt to filter it out. It's usually used for removing aliasing from distortions. Aliasing results in harsh spiky digital sounding harmonics mixed in with the original sound.
Another reason to Oversample is that you simply want a higher sample rate, this is useful for 'accuracy' in the highs. High frequencies are the fast parts of a waveform and therefore will become more detailed if we have more samples. Filters become more accurate in the highs when oversampled, else they lose their shape a little. Oversampling by 2x roughly doubles cpu.Fix block is for processing samples in smaller batches. It lowers the latency but also prevents the optimization you get by passing larger blocks of data around. Instead, the program now has to send lots of smaller batches to process, which means you use more CPU.
Many DSP programs use 'per block' processing, for example a compressor may calculate gain for every block instead of doing it per sample. So making the blocks smaller will mean you get higher detail.
However if your node is already doing things per-sample it practically makes no difference. -
@griffinboy amazing, thanks.
So on a practical level, Distortions inside Oversampling.
Filters?
Modulation?
-
For fast modulation, fixed block may help, assuming that the code isn't already doing per sample updates.
For filters, oversampling can help. It's best to try with and without. Same with distortions. You won't know if you need it until you test it. High frequencies will reveal the differences.