Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Mon Sep 11, 2017 11:55 am Anti-aliased saw without traditional techniques (now with 2nd demo)

Edit: second demo here: viewtopic.php?p=6870938#p6870938

I wouldn't know how to implement a traditional antialiasing technique anyway, but I might've invented a new method... or not invented, but just doing what people have probably done in the past but dismissed it as viable. I think this is a valid way to create a sawtooth, i.e. start with a triangle or sine wave, modulate it INTO a sawtooth, and as you go up in frequency, reduce modulation as needed.

Currently there is some background noise and the lowest frequency has issues, but I think that can be cleaned up.

Ingredients used:
- 1-pole lowpass
- 1-pole highpass
- cosine.

One could use a cheap sine approximation or even a triangle wave save to save more CPU.

results: http://www.elanhickler.com/_/elanhickle ... g_demo.wav
Image

It's not a perfect sawtooth, but my goal with all of this is to create a better analog synth that is less CPU and more musical, more abusable (feedback routing, self-modulation, cross-modulation, whatever T F you want) than the competition, analog meaning "imperfect/musical/quirky" rather than "perfect recreation" or "analog circuit simulation" or <insert purist term here>.

My goal is to sacrifice purity for musicality & usability, where lack of oversampling simply means lower fidelity rather than more artifact-y, and I can easily add a user parameter for oversampling for when the user has CPU to spare.

or maybe my techniques don't offer any advantage at the end of the day *shrug*, I don't know enough about standard aliasing techniques to offer a conclusion.

Edit: BTW, emulating analog filters will be a similar set of ingredients, cheap oscillators + cheap filters.
Last edited by Architeuthis on Tue Sep 12, 2017 12:14 am, edited 6 times in total.
User avatar
antto
KVRAF
 
2466 posts since 4 Sep, 2006, from 127.0.0.1

Postby antto; Mon Sep 11, 2017 12:40 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

i listened
what exactly do you expect from this thread? or was listening enough?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.freenode.net >>> #kvr
camsr
KVRAF
 
6652 posts since 16 Feb, 2005

Postby camsr; Mon Sep 11, 2017 12:41 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

Look at the waveform after 1.262 seconds in, there seems to be some strange looking nyquist ringing at this very low frequency. Strange as in, it gets more amplitude the further away from the sawtooth discontinuity, rather than having the most near it.
Image
User avatar
antto
KVRAF
 
2466 posts since 4 Sep, 2006, from 127.0.0.1

Postby antto; Mon Sep 11, 2017 12:56 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

it's not just there, i see signs of some ugly recursive thing which resonates at (or close to) nyquist, and gets reset every 512 samples
you can see signs of the 512-sample thing also between 0.55 and 0.7seconds
am i surprised that he can't get it working at low frequencies? no
i think he has put together something, and he's not fully sure how it works.. yet
but it does produce something that could be called a "sawtooth" .. a very strange "sawtooth"

an analog(ue) sawtooth could look pretty much like in the books
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.freenode.net >>> #kvr
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Mon Sep 11, 2017 2:33 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

antto wrote:am i surprised that he can't get it working at low frequencies?
I can, i just need to tweak the modulation settings over freuency.
antto wrote:you can see signs of the 512-sample thing also between 0.55 and 0.7seconds
I think this is due to not having any smoothing, and values only update every sample block, so that's 512 samples. Smoothing is a must! Sorry. It's on my todo list.
camsr wrote:Look at the waveform after 1.262 seconds in, there seems to be some strange looking nyquist ringing at this very low frequency.
It's a result of too much modulation signal at low frequency.
antto wrote:an analog(ue) sawtooth could look pretty much like in the books
I know, but keep in mind analog synths have "speed of light" samplerate, and I'm working within 44100. It's not the goal to make perfect shapes and sounds, it's more a difficult-to-articulate goal where things are quirky with less sampling rate and less quirky at higher sampling rate. With even just 2x oversampling, the sawtooth becomes much better, but I think that's already going past "traditional sawtooth" techniques in terms of CPU, just a wild guess though.

Keep in mind this is an early attempt, there's a handful of things I still need to explore to improve results.

antto wrote:what exactly do you expect from this thread? or was listening enough?
I guess it's more important to view in a spectrogram than to listen to it. I'm just proving that it's possible to get a fairly decent sawtooth with just the 3 components I listed.
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Mon Sep 11, 2017 2:42 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

Imagine analog synths ran at 44100 because that just happened to be the limit of time and space. I am making the claim that this theoretical analog synth would produce a noisy/quirky/unstable sound NOT an ringy/aliasy/annoying sound. THAT BEING SAID! I've not yet achieved that goal, that perfectly noisy/quirky/unstable sound. There is a bit of that annoying digital stuff in my demo, but I have reason to believe I can accomplish my goal.

Another reason it's important to imagine this 44100 analog synth is to think about how electricity moves through the components. I believe analog synths are chaos machines. This theoretical analog synth could never produce aliasing. Edit: Instead, the noise floor would rise... or it would be less stable... or something. By building a synth with 100% chaotic elements, I believe this goal can be achieved. It might be worth exploring generating a sine wave with a filter feedback loop rather than using the cosine function. I think that's another level of crazy I'm not yet ready for... but...

yeah... imagine a digital synth that... hehe... either has ONLY filters or a combination of simple filters and simple oscillators (maybe even only badly approximated sine wave oscillators) for all its underlying components.
Last edited by Architeuthis on Mon Sep 11, 2017 3:00 pm, edited 4 times in total.
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Mon Sep 11, 2017 2:47 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

I have a thought, that feedback patches, since they run at samplerate, there is a natural resistance to aliasing that can be tapped into.
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Mon Sep 11, 2017 7:47 pm Re: Take a listen: Anti-aliased saw without any traditional techniques

ok demo 2, now using "dithering", via white noise generator. Getting closer to my "noisy/quirky/unstable" goal. There's still room for improvement, I think the lack of smoothing is causing some background buzzing. It might be worth experimenting with different noise slopes, brighter and/or darker than white. Edit: My goal is not to be noisy, but to simply have a balance between noise [soft/pleasant noise] vs CPU usage (the CPU usage of oversampling/antialiasing filters).

results: http://www.elanhickler.com/_/elanhickle ... _demo2.wav
(noise looks a lot brighter/louder than it sounds... :? )
Image
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Tue Sep 12, 2017 3:50 am Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

Ok, this will be my last demo. I've reached my limit of what I can do with my current setup. Need to now go back, take what I've learned, and improve the setup. This demo uses an actual un-aliased crude sawtooth wave. The noise is still too grainy, but it is closer to my ideal alias-avoidance technique where the waveform approaches white noise as you reach nyquist frequency rather than reflect its harmonics as aliasing resonance.
http://www.elanhickler.com/_/elanhickle ... _demo3.wav
Image

I like how there's not a single hint of aliasing heehee.
User avatar
Smashed Transistors
KVRist
 
109 posts since 10 Oct, 2014

Postby Smashed Transistors; Tue Sep 12, 2017 9:47 am Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

To me, it sounds like a good old self PM modulated cosine going chaotic because of its feedback.
The "chaotic" aliasing sounds even if it sounds like noise is still aliasing.
See you here and there... Youtube, Google Play, SoundCloud...
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Tue Sep 12, 2017 10:01 am Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

Smashed Transistors wrote:To me, it sounds like a good old self PM modulated cosine going chaotic because of its feedback.
The "chaotic" aliasing, even if it sounds like noise, is still aliasing.


Right, but I think each of my examples have strengths and weaknesses. I will eventually find the best compromise to all techniques that will produce very quiet "chaotic aliasing" and achieve a sawtooth that is virtually free of digital ugliness running at 44100 samplerate.

Why do I care? Because even with 8x oversampling and the steepest non-FFT/FIR filters, you get really bad aliasing with the "highest end of the keyboard"... which... sure... is not used so much in music, but just adding a touch of my techniques here means you can create very clean waveforms with very little or no oversampling.

I guess my other point for all of this is just to increase the effectiveness of oversampling and completely remove the possibility of "ringing" aliasing.

If you call this "chaotic aliasing", then we should name the other elephant in the room, "ringing aliasing", which is far worse than (hopefully very quiet OR smooth/pleasing/not grainy) chaotic aliasing.
camsr
KVRAF
 
6652 posts since 16 Feb, 2005

Postby camsr; Wed Sep 13, 2017 1:10 pm Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

You should get Reaktor to test this kind of stuff in, it's suitable for sample-rate modulation.
Image
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Wed Sep 13, 2017 2:55 pm Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

The problem isn't the test bed. I need a robust way to experiment with curves to parameters over other parameters, a robust visual multipoint parameter mapping system, which is being worked on (not by me). I will have the perfect test bed in a month or two.

I'm sure you could do that kind of thing in Reaktor with lots of time and patience to build the required interface (go through the learning process, etc.), but nothing beats the interface you can design from scratch in C++.

Edit: Although if Reaktor really can accomplish this well enough, it might be worth using Reaktor or similar system to connect audio objects in real time. Hmm... maybe... maybe...
mystran
KVRAF
 
4555 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Thu Sep 14, 2017 7:06 am Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

Well, "FM Saw" has a fairly distinct character of it's own, even though it sounds roughly like a saw. For naive oversampling to get 60dB aliasing suppression, you'd need a factor of about 2^10 (about 6dB per octave fall-off) oversampling, so that's not a very good plan either.

I'd just use wavetables or BLEPs really, those are the tried and true methods that work well.
Image <- plugins | forum
User avatar
Architeuthis
KVRAF
 
2851 posts since 27 Jan, 2006, from Phoenix, AZ

Postby Architeuthis; Thu Sep 14, 2017 8:24 am Re: Anti-aliased saw without traditional techniques (now with 2nd demo)

Yes, I am thinking I need to move in that direction for certain situations... honestly I can't remember or effectively articulate the reason I am trying to create a saw with a modulated sine, but it has to do with fact that... I think... the design I am going for *requires* feedback modulation to function, and I can't feedback sawtooths. The sine waves have to become sawtooths through feedback as part of a bigger design. So I'm trying to perfect that process. I don't exactly know where this is going haha, sorry.

Edit: I think it's more about learning how to avoid aliasing for arbitrary waveforms created with feedback modulation, which can become a sawtooth, which will easily have aliasing.
Next

Moderator: Moderators (Main)

Return to DSP and Plug-in Development

Who is online

Users browsing this forum: No registered users