Antialiasing by limiting rate of change (cont. of "perfect" synthesis)

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

here's more typical soft sync sound with triangle.
http://www.elanhickler.com/_/impulse_sy ... t_sync.wav (reverse direction on reset)


here's another version of soft sync! I'm on a roll! I think I've figured out every style of sync I've heard now. There's one more ingredient to soft sync, I believe the slave oscillator should be attempting to adjust its frequency to match the reset timings, some kind of frequency counter, which would add a little bit more nuance and chaos.
http://www.elanhickler.com/_/impulse_sy ... _sync2.wav (increment phase on reset)

no attempt made at interpolation or anti-aliasing, this is just for learning purposes.

Post

My 2 cents.(IMO)

This method is funny but I would never call it "perfect" rather digital buzzer :).

The beauty of analog filters and good VA is "the flow behind the scenes", how it behaves with varying parameters. e.g. 303 resonance warble or short stabilisation period after rapid cutoff change. Complex nonlinear energy transfer is just what happens in real physical resonating objects. That defines "the natural" sound and our ears love it since the beginning.

You may assemble puzzles and this may be interesting and funky, but most of us will still choice a Minimoog :)

Thats why I think additive synthesis is very limited as well
giq

Post

duplicate deleted
giq

Post

aciddose wrote:The way you make the edge smooth is to combine the wavelets with a length greater than a single cycle. So the wavelet continues to fade to zero smoothly, unlike in your case where the filter's response to the input signal contains a discontinuity.

Try using:

sinc(x) = sin(x) / x
(note you need to avoid x being zero)

...combined with a window function such as sinc(x).

Then you insert these "wavelets" or "impulses" at fractional positions using interpolation, and allow them to overlap.

This is how the saw waveform you're using to start with is anti-aliased in the first place.

So what you're doing is no different than anti-aliasing a more complex waveform and then filtering it. In fact you depend upon the blit/etc and filter to do what you're doing!
So you have a wavetable and its samples are used as wavelets inserted at fractional positions. This is beautiful you can literally scratch the wavetable. But one concern here...

How about high frequency phase jumps and cpu load? e.g. When phase jumps from 0 to 1 in 3 samples, with 512 sample len wavetable I have to insert 512 wavetables? Is there a way to reduce this? e.g. picking only some of them?
giq

Post

Sorry, didn't read the entire thread, so apologies if my comment is based on a misinterpretation of what is written above or due to the lack of context. Nevertheless, FWIW, I was worried by the statement that antialiasing a sawtooth is made by sinc-interpolating the samples of a sawtooth. There is a very important subtlety here. Given that the period of sawtooth is an integer number of samples, you indeed get a sawtooth without audible aliasing this way. However, unless the sawtooth was bandlimited prior to sampling, the spectrum of the resulting sawtooth is still "wrong" and does contain aliasing. It's just that the aliased frequencies all coincide with the sawtooth's harmonics and thus do not produce typical inharmonic aliasing noise.

Post

And this sounds sexy :)
giq

Post

Sorry, didn't read the entire thread, so apologies if my comment is based on a misinterpretation of what is written above or due to the lack of context.
It was used in the context of emulating something like Chua's oscillator which cannot use band limited waves.

https://www.youtube.com/watch?v=WRXP0ZeIrlM
~stratum~

Post

itoa wrote:How about high frequency phase jumps and cpu load? e.g. When phase jumps from 0 to 1 in 3 samples, with 512 sample len wavetable I have to insert 512 wavetables? Is there a way to reduce this? e.g. picking only some of them?
The usual method is to discard samples that contribute nothing to the audible range of frequencies.

So each time you double the frequency you drop half the samples.

Generally for something like a ramp waveform such a table would be generated via additive synthesis and a mixture of various methods (filters applied to amplitude and phase) to deal with ringing.

The lowest (zero) frequency table might be 1024 samples long but the highest will only be 2 samples long. If the frequency were to jump from 0 to 1 in N samples you'll spend half the time in the shorter cycles with less samples.

That might seem inefficient but it isn't: you're only inserting as much data as is required to produce the spectra desired. Any fewer impulses and you'd be missing out on elemnts of that spectra.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

How about rapid jumps, like in TZFM - say from phase=0.5 to 0.6 in the next cycle :). Should I pick up only one most prominent wavelet per sample?

"Normal" situations can be easily handled by good, old methods, like mipmaps.

The same with momentary slowing down, some holes can appear.

I thought this method could be a solution, or should I work with integrals?
giq

Post

I think you should try it and actually observe a problem before you simply assume one exists.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Of course, besides of theoretical divagations :), they are too pleasant to be omitted.

I wonder about variable wavelet width, this should help in case of low frequencies.
giq

Post

The problem with that is you'll quite radically change the spectrum past nyquist if you use different wavelets. It's entirely valid to do so but you may want to only use wavelets generated to produce a specific band-limited spectra such that the top end matches between all wavelets/impulses.

Another problem is that if the kernels/wavelets/impulses fit entirely in cache you'll get an order of magnitude better performance. Streaming from multiple locations at once has its limits and as you increase the bandwidth used performance will drop off.

It's a common complaint against using FIR kernels (minblep, blep, blit, whatever) that as you insert kernels more densely it requires more processing power. The stupid thing about this complaint is that it is pointing out the optimization that such a method uses to do as little as possible! Other methods do an equal amount of work per sample regardless of frequency because they are non-optimal and as a consequence they tend to use much poorer (shorter) kernels to "inefficiently do a half-ass job across the board". I can't really see that as being better.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post Reply

Return to “DSP and Plugin Development”