Bandlimited impulse train sawtooth synthesis - Page 1
Forum section: electronics / general

author: JanJansen
author_rank: Frequent Contributor
timestamp: January 19, 2018, 04:36:30 pm
content: Hi, does anyone know how to do bandlimited impulse train sawtooth waveform synthesis ?Anyone using that ?I watched this movie :He is saying you can use 128 notes with 1 integrator, is this also for saw waveform ?, or only the square.I like to know how to use this for saw and also PWM waveforms.Is it simple ?thanks

author: emeb
author_rank: Newbie
timestamp: January 20, 2018, 01:32:43 am
content: Interesting talk. Stefan is the guy behind the Waldorf Streichfett string synthesizer which is amazing due to the amount of DSP that it achieves with a lowly STM32F3xx processor, and the details he gave here lend some insight into how he manages to cram 10lbs of features into a 2lb box.That said, this is a *very* specialized application of BLIT processing that may not necessarily fit into everything that you might like to do. Condensing 128 MIDI notes down to 12 BLIT generators and one integrator works as long as the pitches aren't independent (ie - they're all fixed pitch based on some top-octave temperament). If you're trying to apply any modulation or change the waveforms then a lot of these optimizations become useless or at least much more complex to implement.So yes - depending on what you want to do it *may* be that simple. Go out and search for his published code and look it over - see if it fits your application.

author: JanJansen
author_rank: Frequent Contributor
timestamp: January 20, 2018, 03:05:44 pm
content: Yes i saw the movie, i know i can look for some code.I like to make the code 100% not copy from someone else,Someone did BLIT before ?, can you tell me if it also works the same for a saw waveform ?I would like to try all sorts of synthesis methods,now i use a lookuptable, only can not make PWM sounds with that,also for bandlimited saw need many wavetables, i dont have that RAM or ROM available in my chip.

author: emeb
author_rank: Newbie
timestamp: January 20, 2018, 04:58:27 pm
content: It really depends on specifics of what you want to do. NCOs driving wavetables is a pretty easy way to get a lot of different timbres. If you want to do PWM then you can generate two sawtooth waves with different phases and subtract them - change the phase offset to vary the PWM.Yes, BLIT/BLEP techniques work for sawtooth waves. Stefan's approach is best suited for squarewaves since he doesn't describe how to compute the integrator slope for a sawtooth, but if you do some research you can find that fairly easily.I'd also suggest looking at another anti-alias approach called Differentiated Parabolic Wave ->https://www.kvraudio.com/forum/viewtopic.php?t=368086this is very easy to apply and gives fairly well anti-aliased saws.

author: JanJansen
author_rank: Frequent Contributor
timestamp: January 20, 2018, 05:20:05 pm
content: I tryd the 2 saw waves with highpass, only i cant get good shape because of the highpass.Also its more CPU expensive i think then BLIT.What is the idea behind differentiated parabolic wave then ?

author: rhb
author_rank: Super Contributor
timestamp: January 20, 2018, 08:04:24 pm
content: I watched the entire video. I was mostly baffled and I spent 30 years doing DSP for a living. I got the general impression of someone who did not really understand what he was talking about or was deliberately making it seem really complicated.What Stefan is doing appears to be a mixture of digital and analog techniques. It's hard to be sure. He says, "Trust me." enough I do not.Spikes fed to an integrator produces a square wave. A square wave fed to an integrator produces a triangle wave. For a sawtooth you have to dump the charge on the integrating capacitor at the proper time using an electronic switch or inject a large spike of opposite polarity.There was a bunch of stuff which was basically the reverse of least squares truncated sinc interpolation.In any case, the order of summation and integration of a linear system may be interchanged. So what Stefan appears to be promoting is summing a series of spikes *before* feeding it to an integrator rather than after.Given the ease of summing an arbitrary number of waveforms with an FPGA, I'm left trying to understand the point. What is the purpose and the advantage?Anyone interested in this should study how analog function generators work.

author: emeb
author_rank: Newbie
timestamp: January 22, 2018, 05:42:32 am
content: Quote from: rhb on January 20, 2018, 08:04:24 pmStefan's definitely got the resume and knows what he's talking about - he's done the firmware for quite a lot of the products that Waldorf sells these days and IIRC also had a hand in coding the Access Virus. That said this talk is not aimed at people who don't have some background in digital music synthesis applications, so even if you've got an extensive background in DSP outside of musical applications a lot of what he's talking about may seem like gibberish to you. Understanding the basics of digital music oscillators and some of the issues that arise when using and coding them is a must to even know *why* this approach has advantages. If you don't know what an anti-aliased oscillator is or why you'd want one then this talk won't make much sense.

author: emeb
author_rank: Newbie
timestamp: January 22, 2018, 05:52:15 am
content: Quote from: JanJansen on January 20, 2018, 05:20:05 pmDifferentiate Parabolic Wave is a fairly inexpensive algorithm to synthesize anti-aliased sawtooth waves from a simple NCO phase accumulator. I first came across it in this article in IEEE Signal Processing:http://ieeexplore.ieee.org/document/4117934/The previous link on KVR gives some code snippets you can use to try it out but if you need more detail I'd suggest looking up the above article. Unfortunately it's behind a paywall, but you may be able to find other sources.

author: JanJansen
author_rank: Frequent Contributor
timestamp: January 22, 2018, 02:09:46 pm
content: I cannot find a youtube movie about Differentiate Parabolic Wave, its not a popular method it seems, also if i read it wont take away all the aliasing ?I want a good saw oscillator 100% aliasing free with sharp edged waveform on low notes also.How do you get past a paywall without paying ?

author: MT
author_rank: Super Contributor
timestamp: January 22, 2018, 07:04:42 pm
content: Quote from: JanJansen on January 22, 2018, 02:09:46 pmYou are never going to get a aliasing free saw, you are never going to get a aliasing free saw with zero reset time. What you are going to get is a bandwidth limited saw. You have to decide how much computing/sample rate you want to give to your saw.Point is, can you hear a 18khz saw/square etc, can you distinguish between 18 khz saw and sine? No, you cant unless your a newborn toddler, the older you get the more dampening there are . I recall poly bleep is the later pouplar method these days or so.

author: MT
author_rank: Super Contributor
timestamp: January 22, 2018, 07:16:24 pm
content: Quote from: rhb on January 20, 2018, 08:04:24 pmTo squeeze out as many oscs as possible from a dirt cheap 32bit, 72Mhz MCU.

author: JanJansen
author_rank: Frequent Contributor
timestamp: January 23, 2018, 02:23:59 pm
content: Quote from: MT on January 22, 2018, 07:16:24 pmI like it, btw i need it even more with my DSPIC33 @ 40MHz, 40MIPS.Only i dont see how you can make a polysynth with it if you want a resonant mutlimode filter on each oscillator.