Waveform tables

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

mistertoast wrote:Assuming I stick with straightforward wave representation (which I surely will for my current synth), are there any interesting ways to eliminate aliasing in osc sync?
No really good ones spring to mind. Linear crossfade yields some aliasing (because you have to do it on a quite short time scale), but less objectionable than naive sync. There's a continuum of options from there to blep. (I was thinking of a half-cosine step at one point - continuous, continuous in slope, but lacking higher order continuity - but once I have to calculate or table a cosine, might as well go blep).

There's Urs's solution: compute the spectrum expected from the sync slave, IFFT, and use that as wavetable. (He IFFTs to a single cycle waveform periodically and then crossfades between the resulting tables; this takes care of sync and of eliminating aliasable upper harmonics, could be used for FM and probably other things as well.) See this thread for a discussion.
I'm currently using the Casio filter trick to eliminate osc sync aliasing. The side effect is that the result ends up low-pass filtered. I wonder, does the minBlep osc sync solution also end up low-passing the signal?
No, it shouldn't.
Image
Don't do it my way.

Post

I'll probably stick with what I'm doing then.

Post

mystran wrote:Differentiated parabolic is a strange name for sampling integral of the waveform, and then taking finite difference on the result. Name comes from doing this for saw wave synthesis (single period of saw is just a line, and it's integral is parabolic).

This can be done for any waveform though, as long as care is taken to generate the integrated version such that it's periodic as well (namely, that DC doesn't build up). I've tried it for variable ramp triangle among other things and it works fine for pretty much anything when you get the details of integral generation fine.
The sawtooth case is interesting because it makes direct use of the normalized phase of the osc, so is very cheap to compute. Are there other good forms for that? Square/pulse are straightforward but require a few more conditionals.
Image
Don't do it my way.

Post

" does the minBlep osc sync solution also end up low-passing the signal?"

yes, that is the whole point. what you're doing is applying a very steep slope fir lowpass filter to the naive/infinite waveform. exactly what your resulting spectra looks like depends upon what type of filter you use. using bleps you can actually apply fir filters with action over nyquist, although this isnt useful since it results in aliased output.

Post

aciddose,

Thanks. Then I think my solution holds up fine.

Post

the filter applied is static, so what you get is the continuous time signal (with harmonics into infinity) filtered before sampling. that means the sync'd signal is filtered by the same amount as the unsync'd signal.

http://xhip.cjb.net/temp/public/perfect_sync.wav

this is nearly perfect, if i were to apply a better quality sinc pulse (i'm using only a 10 sample length pulse) the results would be better than what is possible even with an analog generator and a high quality adc. same results for every waveform with xhip's oscillators. the pulse waveform can even sync and change phase multiple times per cycle which is important for audio rate pulsewidth modulation.

there is only a minor problem where the phase sometimes isnt lined up exactly due to the fact i'm using an aproximation. the result is the buzzyness at higher carrier frequencies. this occurs in analog generators too though, the sync pulse does not always reset exactly and in my experiance the buzzy effect is actually more pronounced in some systems, depending upon the sync pulse width. using 2x oversample would eliminate this effect completely.

Post

Yes, aciddose. That's very sweet sounding.

Post Reply

Return to “DSP and Plugin Development”