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

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

CONTINUATION OF PREVIOUS THREAD: What is the "perfect" digital sound synthesis technique?
*Note: Please don't take this thread too seriously.

Aciddose, I was never trying to discuss perfect anti-aliasing... maybe the title thread title is misleading. I'm only trying to discuss perceivable aliasing. Even good(?) anti-aliasing techniques simply limit aliasing rather than removing it completely.

I can only guess at what point aliasing is perceivable, be it via modulation of frequency or amplitude or whatever other modulation. I don't know who does what in terms of preventing aliasing in their VST products.

Alright, just... just... bare with me. Can you tell me if there's aliasing in a sound, can you take a look? I know the original intended waveform is not obvious and this is a poor scientific test in general due to lack of information, and my samplerate is 96000 which is maybe cheating, but check this out, just listen/see it for what it is.

So the point is that it fulfills the requirements of the first post. Not using an anti-aliasing technique (ok not really, I am intentionally limiting the rate of change of the waveform dependent on the frequency by adjusting the sound generating parameters), it's simple, and flexible enough to create a variety of timbres (not proven in this demo, just take my word for it for now).

http://www.elanhickler.com/_/elanhickle ... s_test.wav
Image
Architeuthis wrote:Is there a synthesis technique that naturally limits the rate of change of the waveform?
To make it so you can't create waveforms that with foldover harmonics: requires designing the synth patch so that any frequency you intend to play, you've set it up so that it doesn't create harmonics above a certain frequency. Unlike conventional sound generation techniques, you actually have a decent amount of reliability in removing harmonics. In essence, the anti-aliasing is intertwined with the sound you are trying to create. You have to make some sacrifices of course, you have to discover the sound you are trying to create, just like in FM, you can't know what you are going to get. You have to play around till you get something you like. Then adjust the sound to fit your intended frequency range.
Last edited by Architeuthis on Wed Jul 01, 2015 4:05 pm, edited 5 times in total.

Post

Limiting rate of change is like slew rate limiting. Slew rate limiting is not transparent, or alias free.

Post

hmm maybe i should post another example. :wink:

http://www.elanhickler.com/_/elanhickle ... _sweep.wav
Image
(later in the sample you can see some foldover harmonics, but not every setting can have a perfect sweep from 10 to 10khz)

Being a bit lacking in knowledge in the subject of aliasing, maybe what I really am talking about is strictly foldover harmonics rather than aliasing.

Post


Post

Jupiter8, nice!

Aciddose, I'm very much interested in your zero-aliasing technique, the link to the audio sample is dead. Plz re-upload!

Post

IMO there is always problems above the sampling frequency divided by 4. That last octave causes almost all the problems with aliasing. Third harmoric distortion aliasing is caused by frequencies above fs/6. Using 96 khz is a great advantage, because it gives two octaves for frequency foldover. The third harmonic aliasing will be above 24khz, and this can be filtered out for listening purposes. It can also be minimized during the production/mixing process with a standard lowpass filter (aka bandlimiting).

So jupiter8, while it might not be fun to use 96khz, it's really a whole lot better sounding. :)

Oversampling is doing exactly the same thing, except for taking the sample rate down immediately after the process completes. If there wasn't problems working at 48khz or 44.1khz, oversampling would never be required. It's that last octave always causing problems.

Post

camsr wrote: So jupiter8, while it might not be fun to use 96khz, it's really a whole lot better sounding. :)
mystran wrote:
GeckoYamori wrote:Can't you just "solve" the aliasing by working at a higher sample rate?
Yeah, and you can "cook food" by ordering pizza.

Post

I have another idea i have never tested (and knowing me, probably never will): an oscillator based on "gravity". Modelling with forces instead. Having the output voltage be a "planet" that is dragged up and down. I think you should be able to model filters this way too.

Could be awesome,could be crap.

Post

jupiter8 wrote:I have another idea i have never tested (and knowing me, probably never will): an oscillator based on "gravity". Modelling with forces instead. Having the output voltage be a "planet" that is dragged up and down. I think you should be able to model filters this way too.
Heh, not stupid. I have similar thoughts of using car parts as distortion units :lol:

Post

jupiter8 wrote:I have another idea i have never tested (and knowing me, probably never will): an oscillator based on "gravity".
That's actually a good idea, allow me to fill in the gaps:

Imagine circles on an X/Y graph to represent planets, and as with an X/Y oscilloscope, you have left and right channels. You set a starting point. Your "modulatability" will be in the form of modulating the planet sizes (and positions perhaps?). Heck, you could have a Z axis as well for a 3rd output channel, and mix X/Y/Z in mono/stereo arbitrarily.

Post

I was thinking more along the lines of the "points" in a wavetable having gravity and the voltage is a "spaceship/meteorite/" passing thru being dragged towards the "points". Or the other way around rather perhaps.

More or less the modeled inertia would prevent aliasing. How effective/"correct" i don't know. I imagined oversampling it either way for a more accurate model and the calculations are really lightweight.

You can make pwm and wavefolding pretty easy too. Just move the "points" accordingly.

Post

jupiter8 wrote:I was thinking more along the lines of the "points" in a wavetable having gravity and the voltage is a "spaceship/meteorite/" passing thru being dragged towards the "points". Or the other way around rather perhaps.

More or less the modeled inertia would prevent aliasing. How effective/"correct" i don't know. I imagined oversampling it either way for a more accurate model and the calculations are really lightweight.

You can make pwm and wavefolding pretty easy too. Just move the "points" accordingly.
This is familiar with an article I saw on gamedev.net, heres the link: http://www.gamedev.net/page/resources/_ ... dies-r3885
Make sure to watch the example video, the rocket in it behaves similarily to how you describe (it's at 3:25 roughly)

Post

camsr wrote:
This is familiar with an article I saw on gamedev.net, heres the link: http://www.gamedev.net/page/resources/_ ... dies-r3885
Make sure to watch the example video, the rocket in it behaves similarily to how you describe (it's at 3:25 roughly)
Yeah that's the idea. Though it would only move upwards/downwards. The speed on the X-axis would be the pitch. It would be interesting to hear what happens if you "break" the physics slightly. I'm imagining all kinds of cool effects. I'm thinking you could get really "alive" oscillators, never settling never repeating themselves.

Post

https://en.wikipedia.org/wiki/Wavelet

The audio clips and images you've posted do not demonstrate "alias free" synthesis, merely a very simple method by which you adjust the content generated to reduce the bandwidth of the signal so as to avoid increasing the level of aliasing. By this definition FM/PM (DX7) is also "perfect" and "alias free".

Your method have many issues, the top of the list being that the spectra changes not just near nyquist but far below and in an audible way as the base frequency is increased.

This is not a new method of synthesis or "alias free" by any means, it is a very simple and for the most part useless solution to a problem we have solved long, long ago.

For example back when I was 14 years old I was playing with something like this:

cos(cos(x*pi*2)*pi/2)*2-1

So, your basic waveform is the sine/cosine: cos(x*pi*2)
The shaper/feedback function is: fbfunc(x) = cos(x*pi/2)*2-1
input = cos(x*pi*2);

From this point, we loop and feed-back the output like so:
output = fbfunc(input + last_output * feedback)

By changing the number of stages you can "fold" the input signal differently to produce different "harmonics". You can produce odd or even harmonics and you can for the most part correct for the single sample phase issue by adding a bias to the feedback!

Is this alias free? Actually, yes. You only create the number of harmonics you want. The per-sample feedback optimization isn't required, in which case you can directly control harmonic content by using a single equation.

(Try placing different "taps" on the feedback with a multi-part equation. Consider this only one "step" of feedback, try five or six and play with different mixtures of different taps.)

(Note I've just typed this quickly and I'd have a hard time experimenting again with something I did as a youth, can hardly remember and know for a fact to be useless to me. My equation may not actually work, but it only serves to prove a point.)

Now you just need to realize some things:

  1. This is only a step part-way between generating a single sine and many, aka additive. They're both cumbersome methods and the "optimized" or "simple" version is far less flexible and accurate.
  2. This isn't all that useful on its own. You can go ahead and build a whole instrument from something and that would be great, but this isn't a whole instrument.
  3. It isn't really different from methods known for a long time to generate band-limited impulse trains.


http://www.music.mcgill.ca/~gary/307/we ... mited.html

Then, a bit later you should realize that these methods are all extremely primitive. We can in fact generate any spectra with any content using slightly more advanced methods like blit, blep, blamp and so on.
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

aciddose wrote:By this definition FM/PM (DX7) is also "perfect" and "alias free".
Good!
aciddose wrote:Your method have many issues...
I'm generating a sound, I can't hear aliasing, I like what I hear (in a musical sense), mission accomplished. Granted, I wish I could throw on oversampling and an anti-aliasing filter but I don't care to attempt that in Jesusonic (JS).

The point of this thread is to offer another paradigm to the solution of generating sound for musical purposes: Whereby spectra, waveshape, and character (changes over time and frequency) of the sound is COMPLETELY arbitrary. If this paradigm is too limited in the number of characters you can create or too difficult to get usable sound, then it's a failure, but I've already proven to myself that this is "complete instrument" material.

You want a zero-delay filter? Then don't design a filter at all, forget about filters! Tell me aciddose (or anyone else) does this sound like a saw wave going through a filter (with lots of nice resonance characteristics)?: http://www.elanhickler.com/_/elanhickle ... lation.wav

This is just AM, FM, and waveshaping. No delay! The sound isn't perfect (the clickiness for example), but the concept is really simple, and that simplicity allows for flexibility of sonic character and time to be spent improving the details. I think it's a good start. I think it's possible to add convincing chaotic behavior as well. This doesn't actually have anything to do with aliasing, but it has to do with throwing out the analog synth paradigm.

I am recreating the waveshape to simulate the behavior. I am NOT recreating the behavior to get the waveshape.

Ok, wait, let me try to explain this another way. Take Harmor for example. It's an additive synth with subtractive synth features. How about a "waveshaper synth" (a synth that only uses waveshaping) that is made to function/sound like subtractive synthesis? How about a PM synth that is made only to sound like subtractive synthesis? (It's easy to create a saw-like waveform with PM/FM.) Do you see where I'm going with this? Don't try to recreate the behavior to create the waveshape, just skip the behavior step and go straight to creating the waveshape. This, I believe, is embracing the digital paradigm, the fact that you can write arbitrary logic/instructions/algorithms instead of "coding with resistors, capacitors, diodes, op amps, etc."

I have tried so many VST synths. I'm convinced that digital synthesis has largely been a failure because of the analog synth paradigm. Both a failure in sound and interface. There are a few exceptions, one being Microtonic. The interface and feature set isn't perfect, but it does the whole "digital synth/sound generation" paradigm REALLY well. I came to this conclusion after the years spent using it and just yesterday I even looked at the output waveforms and I thought "wow, no wonder I like how it sounds." It's a step in the right direction, but it needs to be taken further!

I will end with this with a startling opinion: Digital synthesis has the potential to sound better than analog when it embraces its digital environment (in some, maybe most aspects, maybe not all! Analog synths will always have the advantage of running at the speed of electricity [unless we get quantum computers]. BTW, the experience with my analog modular synth has been absolutely invaluable, I've owned a modular for years now).

Post Reply

Return to “DSP and Plugin Development”