Author |
Message |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
|
Back to top
|
|
|
djfoxyfox
Janitor
Joined: Feb 05, 2003 Posts: 3211 Location: Nazareth, Pennsylvania, USA
Audio files: 5
G2 patch files: 1
|
Posted: Wed Dec 21, 2005 8:24 am Post subject:
DIY pitch shifter Theory |
|
|
I remember in the late '70s when I was looking over the Electronotes analog pitch shifter schematics. Back then, I remembered the mathematics of it all and the various components (quadrature LFO, 90degree All Pass Phase Difference Networks, multipliers, etc.) all made sense to me.
Now, however, all that is in the dim past and my memory partially fails me. In addition, I'm not yet familiar with the G2's modules. Would you be willing to discuss the theory behind your patch?
In your patch, which I've only seen on my screen since my G2 is not connected to this computer, I see that the audio path seems to be an oscillator that feeds two delay modules, both set to 12.5 ms. These delays send their audio outs to a cross fader. LFO1 and LFO2 are sawtooth waves set to 180 degrees apart from each other, each modulating the delay time of Delay1 and Delay2, respectively. LFO3, a triangle wave, set to the same frequency as the other LFOs, is reset by LFO2's sync output. LFO2 is reset by LFO1's sync output. LFO3 controls the crossfading between the two Delays' audio outputs. The constant switch controls the rate of all three LFOs. (Did I forget anything important?)
Have you tried using audio input instead of OscA1 as an audio source?
Cheers, _________________ Bill Fox------------------|\-------------
---_--_-----------|------|--------------
--|_)|_----|\-----|-----()--------------
--|_)| -----|-----()---------------------
-----------()----soundscapes.us/bill |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18197 Location: Durham, NC
Audio files: 212
G2 patch files: 60
|
Posted: Wed Dec 21, 2005 8:49 am Post subject:
|
|
|
I think I can answer this, maybe.
The delays are used as memory. The saws are useds as ramps speed up the delay times. If you speed up the delay time, the pitch of sound is shifted up. The cross fader is used to switch between the delays so that one can be listened to before the other jumps to a longer delay time which would make a click or worse. I haven't tried it, but it should work with an arbitrary audio signal.
Nice how the LFOs are all synced up like this.
The first pitch shifter I ever saw was in 1972. Buchla built one out of CCD bucket brigade chips that had just been released. It worked similar to this. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Wed Dec 21, 2005 3:29 pm Post subject:
|
|
|
You are correct, Howard.
Putting it in mathematical terms: the differential of the modulating LFO defines the characteristics of the pitch shifting. Therefore:
-Modulating with a sine results in cosine (wobbling) pitch shifts, as the cosine function is the differential of the sine.
-Modulating with a triangle results in discrete up-and-down pitch jumps at LFO frequency, as differentiating a triangle produces a perfect pulse wave.
-Modulating with a sawtooth produces a continuous pitch shift. But it has one drawback: the differential has one discontinuity at the point where the sawtooth restarts its cycle. This produces a clearly audible clicking artefact at LFO frequency.
Here's where the workaround comes in: By using two delaylines modulated by two 180°-phase-offsetted sawtooth LFOs, and crossfading between them with a synced triangle LFO, those clicks can be circumvented.
This crossfading however generates a new form of artefact in form of phase cancellations in the audio signal, the well-known "pitch shifter wobble".
This is an old method. I just patched it up to make sure I understood how it worked. Lately I've been doing this with many things that are often presented "ready made" to the synthesist. I like to know what's going on under the hood. |
|
Back to top
|
|
|
Afro88
Joined: Jun 20, 2004 Posts: 701 Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79
|
Posted: Fri Dec 23, 2005 4:50 pm Post subject:
|
|
|
Once again, thanks for this Tim. I tried to build a pitch shifter after a discussion on this board a while back, but got stuck trying to figure out the logistics behind the crossfaded delays (mine was very glitchy!).
Plus, this is a very different sound from the pitch shifter module - in some ways it's much nicer. In a side by side comparison, it sounds like the pitch shifter module has alot of static comb filtering, whereas this one moves around a bit which I like.
Thanks!
Oh, and just in case anyone else was wondering - to pitch shift down instead of up, just invert the output of the first two LFO's modulating the delays |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sat Dec 24, 2005 1:40 am Post subject:
|
|
|
A more correct (but expensive) solution would be to use the "Dir" input of shapeLFOs, because this actually stops the LFOs at zero pitch shift and neatly inverts the direction when going negative, making for an uniform bipolar control. (see attachment 2)
Anyway, there's basically two ways to control the amount of pitch shift.
1) by controlling the speed (or direction) of the delay-modulating LFOs
2) by controlling the depth of the delay-modulating LFOs
With 1), the characteristic "wobbling effect" changes in frequency, whereas in 2) it remains constant. (See attachment 1, got them mixed up, sorry...).
Sounds more "flangey", but has a constant response to transients, which might be useful in some applications.
The amount and character of the comb filtering and phase cancellation artefacts of delayline-based pitch shifting is directly related to the length of the delayline used. The longer the delaylines are, the less intrusive the cancellations become. However, this obviously also delays and "smears" transients around the place, which makes it unusable for eg. drums or percussive stuff.
Description: |
strictly speaking, more correct (but more expensive) solution using the "Dir" inputs of ShapeLFOs |
|
Download |
Filename: |
DIY PitchShifter2.pch2 |
Filesize: |
1.43 KB |
Downloaded: |
1503 Time(s) |
Description: |
modulating the _range_ of the LFOs rather than their speed/direction |
|
Download |
Filename: |
DIY PitchShifter3.pch2 |
Filesize: |
1.4 KB |
Downloaded: |
1461 Time(s) |
|
|
Back to top
|
|
|
|