I am trying to write a small synth code that goes something like this, I have an abstract symbolic sound representation, sine/square/saw waves. To generate final sound and make it sound good I thought of the following steps;
- At first oversample the abstract symbolic representation
- apply noise shaped dither
- apply anti-aliasing algorithm
- last. downsample to local devices sample rate or FLAC sample rate
Point is that the input is not going to be quantized, but more of a symbolic representation to allow arbitrary-precision oversampling. The way I think of it is something like an abstract representations of unit generators, which can run at arbitrary rate depending on the output selected.
In general, I am trying to minimize quantization errors and lower perceived noise within the context of working over symbolic sound, but only once I know the target sample rate.
I am confused about ordering of the middle 2 steps. What order should noise shaped dither and anti-aliasing be applied? Is placing downsampling last the correct idea or should it maybe be reordered too?