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

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Architeuthis wrote:What about if you modulate the frequency (LFO speed), wouldn't that throw off any attempt to solve the click before it happens?
Sine or triangle LFOs are no trouble.
Note to note pitch change in monophonic mode cause more trouble.

Also problems arise with other parameters with ADSR modulation or sawtooth LFOs
See you here and there... Youtube, Google Play, SoundCloud...

Post

After some testing, adding a tiny bit of frequency-dependent attack time to the sine amplitude (aka resonance) might end up sounding good. The attack time will naturally update with any frequency changes.

Post

It bandlimits the step. Instead of a discontinuous transient you get a continuous signal thanks to slew limiting.
You may go further and slew limit the first derivative too.
See you here and there... Youtube, Google Play, SoundCloud...

Post

Smashed Transistors wrote:It bandlimits the step. Instead of a discontinuous transient you get a continuous signal thanks to slew limiting.
You may go further and slew limit the first derivative too.
Well you COULD, but the floating point is only so precise.

Post

doubles have 52 bit mantissa
See you here and there... Youtube, Google Play, SoundCloud...

Post

Smashed Transistors wrote:doubles have 52 bit mantissa
Not to diminish from your point (made), but to be nerdy, it's a 53-bit mantissa (one is not stored, but implied in normalization). Even better news :lol:
My audio DSP blog: earlevel.com

Post

Yes, even better ! One bit doubles the accuracy :D

53 bits is a wide range... they can be used to differentiate up to the 4th degree.

See:
http://www.kvraudio.com/forum/viewtopic ... 8&start=15
(old post from one of my students... used to be a teacher in another life)
See you here and there... Youtube, Google Play, SoundCloud...

Post

Looking at a bunch of the waveforms from my favorite analog filters, they are doing all sorts of things that happens to lead to removing discontinuity, such as reversing phase depending on whether below or above the 0 line, sometimes resonance occurring only in the middle of the waveform. My favorite filter screams don't seem very difficult to replicate from a waveshaping standpoint.

If the discontinuity becomes too sharp, that's where the most chaotic behavior happens for self-resonating filters. Some of the chaos simply looks like soft sync or reversing direction irregularly. I wonder if there are simple ways to add chaos to a sound generation algorithm with one a sample delay.

This stuff just doesn't seem very difficult, so why does U-he, Native Instruments, and others spend so much time on analog modelling when I could get the same results with waveshaping and chaos (haven't figured out the chaos part quite yet)? Even without the chaos, my favorite filters would still sound awesome.

Post

Antialiasing and stability are the main issues.

Did you had a look to the chua oscillator ? it's one of the simplest chaotic circuit which makes it a nice starting point. But the parameters are quite tricky to set so that it remains "stable" and do not saturate.

A few months ago i experimented with nonlinear complex valued filters (based on Mathews filters) with jsfx ( http://forum.cockos.com/showthread.php?t=143816 ), they allowed me to keep the filters "stable" even with high nonlinearities.
See you here and there... Youtube, Google Play, SoundCloud...

Post

I wonder if a soft sync type algorithm would be useful to provide chaos. Chaotic filters tend to sound like soft sync. Hmm, looking further (at one of my analog filter recordings) it looks like simply doing reverse sync would be enough: https://en.wikipedia.org/wiki/Oscillator_sync (see reverse sync)

Does anyone know about a kind of soft sync that softly locks on to the harmonics of a sound? Ooh, I just thought of an answer to this. It would be harmonically synced if you do a threshold based sync: when the "reset" is sent to the oscillator, it only resets if it is within a time window of its own cycle. In other words, if the slave oscillator is near 1, 1/2, 1/3 or *2 *3 *4 the frequency of the master oscillator (AND within a time window of its own cycle?), you reset the slave oscillator, and therefore you get a harmonic-based sync. I think that would be chaotic because resetting the oscillator would throw the time window around.

Post

http://www.elanhickler.com/_/impulse_sy ... ftsync.wav

alright, here's soft sync implemented digitally with jesusonic (like I explained above), and it behaves much like my analog synth except that it sounds like CRAP! (Especially as master or slave oscillator frequency gets high) Note the first few seconds sound very accurate, but then you will hear how it "hovers" back and forth around where it should be resetting... a problem with accuracy based on the samplerate. Obviously a more robust solution is needed (interpolation? calculate where the reset should happen or something?)

Post

Does it happen without the time window ?
See you here and there... Youtube, Google Play, SoundCloud...

Post

I implemented soft sync simply:
If master oscillator phase finishes a cycle AND
If phase is between -2 and +2 DO
reverse direction

If you're asking if the sync sounds bad (hovers) without the time window, the answer is yes.
-With time window, without time window, reversing phase, reversing direction, all sounds bad. The only thing that doesn't sound bad is hard sync: simply resetting phase to 0 without conditions.

I think it's pretty simple why it doesn't work: Lets say your samplerate is 44100 and you want to reset every second. That's fine, just do it every 44100 samples. Oh but what happens if you change frequency slightly and need to reset every 44099.5 samples? You'll be hovering around resetting at 44100 and 44099.

Post

Using proper anti-aliasing the impulse you insert is placed at the fractional position, and there is no such issue.
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

Good to know!

Post Reply

Return to “DSP and Plugin Development”