Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Fri Aug 28, 2015 4:47 pm Post subject:
Phase Accumulator (trivial sawtooth) Subject description: perfect tracking; for DIY oscillators, fiercely nonlinear waveshapers etc. |
|
|
EDIT: This technique is obsolete. Go here:
http://electro-music.com/forum/post-423838.html
As mentioned in previous posts, I'm going through my G2 folders and publishing anything I ever came up with that might be useful.
As an audio source, a bandlimited (=anti-aliased) sawtooth oscillator is of course way superior to a trivial/non-bandlimited one (which is practically useless for this purpose). However, when used eg. to drive a fierce nonlinearity in order to obtain new waveforms, the coin flips and the non-bandlimited version performs much better, because it lacks the smoothed/bandlimited waveform flank that otherwise additionally sweeps through the waveshaper reversely for a few samples, generating extra ugly digital artifacts (yuck).
A non-bandlimited sawtooth is technically also known as a phase accumulator because it simply designates the current phase position of a given oscillation in discrete time. It is thus the basic core of any type of digital oscillator and therefore is a good starting point for DIY oscillator designs on the G2.
It is of course possible to build audio-rate phase accumulators with reset-integrator feedback loops and lin-expo-conversion of pitch, but the tuning isn't 100% accurate because of numerical limitations. This building block therefore is based on a sawtooth LFO, which is converted to audio-rate via linear inter-/extrapolation, because thee G2 LFOs track perfectly.
The patch presents the superiority of this trivial sawtooth over a "normal" (=bandlimited) one when used for driving a control-sequencer acting as a nonlinear waveshaper. Notice the "buzz" caused by the bandlimited flank of the "normal" sawtooth, which gets more intrusive the higher you play in pitch. (Of couse, ultimately they both will produce aliasing because the whole process isn't bandlimited, but the trivial sawtooth performs magnitudes better.)
I used this circuit (in an unfortunately less economical way, because I'm always still learning ...) in many of my algorithms and think it's very very useful for DIY oscillators, waveshaping (as mentioned and demonstrated), sample playback (with the delay lines) and other things.
DSP usage is only 4.1% cycles, 6% memory.
(memory display shows more, remember that the first LFO of a patch uses a few zeropage outputs for inter-voice communication)
cheers,
t
Description: |
Phase accumulator (trivial sawtooth) with perfect tuning; fundamental building block for DIY oscillators, waveshaping etc. |
|
Download |
Filename: |
PhaseAccumOsc_TK.pch2 |
Filesize: |
2 KB |
Downloaded: |
3695 Time(s) |
|
|