Help and advice needed: Aliasing oscillators
Posted: Tue Nov 08, 2016 5:48 pm
Guys, I could do with a little bit of help and advice with aliasing issues.
I was inspired by tulamide’s interest in the idea of a vector oscillator. I knocked up a basic idea and experimented, but realised I knew little about aliasing, which is a big problem for my oscillator (attached in a test synth).
I’ve learnt that since any frequency-based ramp will have different values throughout, depending on the frequency produced, and this causes bad jitter for any level-based action within the DSP process, as well as producing frequencies above nyquist.
I imagine that musical pitches do not relate directly to the sample rate in a nice wholesome way so the artefacts vary with pitch considerably. I can hear dreadful changes by holding a high note and adjusting the fine-tune very carefully. I also hear this and see it with a naïve ramp so I don’t think it’s purely down to my code.
I’ve looked into BLEP and BLIT techniques and it seems this only works when you know where the fast transitions will occur (square and saw waves). I’ve read about PTRs and EPTRs but I know nothing about how to implement such things, and indeed if they would work with any procedural arbitrary oscillator like mine.
Is it possible to add a block of DSP code before the signal is output to remove the crap? Or does the processing have to be within the steps of each action?
I made a smoothing module using 6 x 1-sample delays for averaging (included in the test synth) and it does make the transitions less steep but it doesn’t get rid of the horrible jitter which is happening in the DSP code.
The oscillator in the test synth is by no means final but I need to address the artefact issue before I try to progress further. At the moment I could use something like this osc in a bass synth but not much more.
If anyone could offer any input (that I could understand and use!) I’d really appreciate it very much.
(I never had these problems with op-amps you know )
Cheers
Spogg
I was inspired by tulamide’s interest in the idea of a vector oscillator. I knocked up a basic idea and experimented, but realised I knew little about aliasing, which is a big problem for my oscillator (attached in a test synth).
I’ve learnt that since any frequency-based ramp will have different values throughout, depending on the frequency produced, and this causes bad jitter for any level-based action within the DSP process, as well as producing frequencies above nyquist.
I imagine that musical pitches do not relate directly to the sample rate in a nice wholesome way so the artefacts vary with pitch considerably. I can hear dreadful changes by holding a high note and adjusting the fine-tune very carefully. I also hear this and see it with a naïve ramp so I don’t think it’s purely down to my code.
I’ve looked into BLEP and BLIT techniques and it seems this only works when you know where the fast transitions will occur (square and saw waves). I’ve read about PTRs and EPTRs but I know nothing about how to implement such things, and indeed if they would work with any procedural arbitrary oscillator like mine.
Is it possible to add a block of DSP code before the signal is output to remove the crap? Or does the processing have to be within the steps of each action?
I made a smoothing module using 6 x 1-sample delays for averaging (included in the test synth) and it does make the transitions less steep but it doesn’t get rid of the horrible jitter which is happening in the DSP code.
The oscillator in the test synth is by no means final but I need to address the artefact issue before I try to progress further. At the moment I could use something like this osc in a bass synth but not much more.
If anyone could offer any input (that I could understand and use!) I’d really appreciate it very much.
(I never had these problems with op-amps you know )
Cheers
Spogg