Hi,
I studied the final chapter of Miller's book a bit deeper during the last days. It contains this interesting and sophisticated method of bandlimiting classical waveforms using transition splicing [1]. The docs contain an example, J09.bandlimited.pd, which I transformed into an abstraction, [splicetrans~], in the process I modifyed the calculations to work with samplerates different from 44.1 kHz and kept a normal rising phasor from 0-1 as signal instead of a falling sawtooth from 0.5 to -0.5 as in the example.
That was basically copy/paste work. The interesting thing then is to use this new phasor to construct other waveforms like square or trapezoid waves using the methods described in the last chapter as well.
These all involve some phase-shifted phasors created using [wrap~]. But to use the transition-spliced phasor~ as source for these waves, care needs to be taken in the placement of the [wrap~]s compared to the phasor, otherwise all bandlimiting effort will be in vain because [wrap~] cuts off the transition in the wrong place. But once you get the hang of it, it's actually quite easy: Always [wrap~] *before* you do the transition splicing.
This approach has one big advantage over bandlimiting with pre-calculated wavetables as realized in some old patches by Guenther Geiger and newer ones by Roman: The waveforms can be changed on the fly, for example to do PWM on a rectangle wave, which is hard or impossible with pre-calculated bandlimited waveforms.
As this technique wasn't really discussed on this list so far AFAIR, I just attached the patches for everyone who's interested in it to try and of course to comment and squash bugs.
[1] http://crca.ucsd.edu/~msp/techniques/latest/book-html/node196.html
Frank Barknecht _ ______footils.org__
hey frank
oh! this is great! i don't have time right now to dig into it, but i sure will after the semester is over (in a few days). i was always looking for a way to create pwm (or other changeable bandlimited waveforms).
On Sun, 2007-12-02 at 15:19 +0100, Frank Barknecht wrote:
This approach has one big advantage over bandlimiting with pre-calculated wavetables as realized in some old patches by Guenther Geiger and newer ones by Roman: The waveforms can be changed on the fly, for example to do PWM on a rectangle wave, which is hard or impossible with pre-calculated bandlimited waveforms
yeah, i am looking forward to see an implementation of bandlimited pwm square (or making my hands dirty by trying it myself).
As this technique wasn't really discussed on this list so far AFAIR, I just attached the patches for everyone who's interested in it to try and of course to comment and squash bugs.
[1] http://crca.ucsd.edu/~msp/techniques/latest/book-html/node196.html
i once read the chapter in millers book and also had a look at the example, but i haven't understood it. i hope your patches will help me understand better.
thanks
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
hey frank
oh! this is great! i don't have time right now to dig into it, but i sure will after the semester is over (in a few days). i was always looking for a way to create pwm (or other changeable bandlimited waveforms).
On Sun, 2007-12-02 at 15:19 +0100, Frank Barknecht wrote:
This approach has one big advantage over bandlimiting with pre-calculated wavetables as realized in some old patches by Guenther Geiger and newer ones by Roman: The waveforms can be changed on the fly, for example to do PWM on a rectangle wave, which is hard or impossible with pre-calculated bandlimited waveforms
yeah, i am looking forward to see an implementation of bandlimited pwm square (or making my hands dirty by trying it myself).
It's in the help-file, see the subpatch "even.odd". Or try attached variation.
i once read the chapter in millers book and also had a look at the example, but i haven't understood it. i hope your patches will help me understand better.
Well, the idea of transition splicing is quite simple: Every time you have a jump in a waveform, you replace that jump with the jump of a bandlimited square wave, scaled so the endpoints of the square and your original signal match.
If you do this for a [phasor~], you can construct all other waveforms with jumps, especially of course square/rectangle waves, but also more complex jump-waves using the technique of J02.trapezoids.pd (put [splicetrans~] after the [wrap~] there and connect the frequency inlets of it as well to try. I haven't yet managed to apply this technique for corners like in a triangle wave, but foldover isn't that bad there anyway.)
The square wave jump is constructed to be heavily bandlimited: It only consists of the first two or three square wave harmonics (1 and 3 and 5 times the fundamental). So whereas normally a jump will generate a lot of loud alias harmonics, using spliced transitions you can be sure to only get harmonics at the jump that are up to 3 rsp. 5 times the fundamental frequency. Then you're fine up to a fundamental of Nyquist/3 or Nyquist/5 - which would be 8000 rsp. 4800 Hz @ 48 kHz SR. This is already quite high for an oscillator: For 3951 Hz the midi note number is 107!
The tricky part is to actually patch the transition in Pd, but thankfully Miller already did it. ;) And now it's an easy to use abstraction as well.
Frank Barknecht _ ______footils.org__
On Sun, Dec 02, 2007 at 03:19:27PM +0100, Frank Barknecht wrote:
The docs contain an example, J09.bandlimited.pd, which I transformed into an abstraction, [splicetrans~]
This rules, Frank. Thank you so much for this work. Yay, no more wave table jiggery.
Chris.
Hallo, Chris McCormick hat gesagt: // Chris McCormick wrote:
On Sun, Dec 02, 2007 at 03:19:27PM +0100, Frank Barknecht wrote:
The docs contain an example, J09.bandlimited.pd, which I transformed into an abstraction, [splicetrans~]
This rules, Frank. Thank you so much for this work. Yay, no more wave table jiggery.
Some more play with that is attached: A bandlimited, flexible waveform synth that allows to set four jumps per period dynamically. Can be modified for total wreckage, e.g.: Replace the messages to set phase and amplitude of the jumps with signals for even more fun. Add filters and distortion. Add more [segment~]s. Have fun.
[dispatcher] requires pd-0.40 or up, general functionality works for old Pds as well. Open trapez~-help.pd
Frank Barknecht _ ______footils.org__