Tuesday, November 17, 2020

The Zeitraum Effect

Have spent all day programming a new audio effect which I call Zeitraum. It's a modification of the old oscillator synchronisation effect, designed to emulate that sound which works on analogue waves, but using samples. A simple oscillator runs and when it resets, the sample pointer is reset to a former point. This works well to create the 'hard sync' synth effect, but I've never actually used it despite the Oscillated Sample effect being in Prometheus for years, probably over a decade. This is partly because the effect is very synthetic and sounds best with pulse waves, and the effect didn't work with looping samples...

Yet, it has the added bonus of shifting the pitch and duration of a sample in real time. It can sound somewhat garlgy, but rather pleasant and interesting. The effect uses two waves that overlap, one applied with a sine 'dome' and one with the inverse of that, a spike. Today I upgraded the effect and experimented with using two 'domes' instead, but it didn't really improve the result while making it sound a little more boomy. I also experimented with four overlapping waves (at different moving windows) but that didn't really change the sound. This new updated effect does now work with looping samples, and it also supports anti-aliasing. Here's a quick logical breakdown of the effect:

1. Set point X to the start of the wave. Reset the 'dome' sine wave to its start. Set the main oscillator to zero.
2. Output the current sample and advance the pointer for this, the primary (alpha), wave.
3. Output the secondary (beta) wave and advance that pointer (the same data is used for the two overlapping waves but they have independent pointers).
4. If we've passed the start of the beta wave (halfway through the main oscillator cycle) set the pointer for the beta wave to that of the alpha wave.
5. If the main oscillator is complete, reset it by subtraction, restart the secondary dome oscillator, and set the main alpha pointer to point X. Advance point X by a fixed amount (I used 44100/MIDDLEC*8.0f).
6. Advance the main oscillator pointer relative to your desired pitch.
7. Step the 'dome' oscillator. You did use this to attenuate the values in 2 and 3, didn't you?

I've created three variations: Zeitraum uses the sequencer pitch and note so one can play and design instruments with it. Monotone Zeitraum plays at the same pitch irrespective of note, allowing you to tweak the pitch and speed independently. This is useful for vocals, drums or other unpitched samples. Monotone Stereo Zeitraum is a stereo version with independent left/right channels. I also use up/down/front and back channels, and so left, up, and front, are linked; and right, down, and back. If I ever start to actively create in hexio (Prometheus works natively in six channels so all of my music is hexaphonic anyway) then I'll create a six channel version of this effect.

I'm exhausted now. Time to rest.