Technology of the whammy?

Started by slotbot, January 23, 2005, 06:49:33 PM

Previous topic - Next topic

slotbot

Hi,

I was wondering if anyone could give me a rough explanation of how the whammy works. im not trying to build one. I purchased one a while ago and im pretty impressed with it. but i dont understand how it does what it does. I suppose its like the harmonizers boss makes? or the old digitech rack harmonizers with an expression pedal? (niether of which i understand) but i cant get my head around real time pitch shifting.

any insight is welcome.

scott-o

Paul Perry (Frostwave)

I think these work by sampling the input at a particular rate, stuffing the result into digital memory, and reading ti out at a DIFFERENT rate, so the pitch shifts.
BUT.. the hard part is, you will either run out of, or have too many samples (depending if you are readign back fast or slow). And that is where you try to get around things, by using short overlapping samples that you fade between. And you can hear it all go horribly wrong at the extremes.
There are some subtler & much more 'realistic' methods using complicated maths in digital processing chips as well today (they can do the opposite, that is, time stretching without pitch shifting, as well) but the 'early' stuff worked by variable playback rate of snippets.

slotbot

ok. thats how i see it too. its just the real time thing. i mean for down shifting i can sort of see it. it samples a short piece and then stretches it and just cuts off the excess when it re samples. (although i doubt this would sound smooth) only maybe this is done many times per second. so it sounds almost like real time. like just a few milliseconds of lag. (although i cant hear any lag on my whammy at all. it seems instant)

but then as you mentioned the problem with shifting up. there would be gaps in the signal. how would having a faster output then the input work? becasue the information wouldn't be there yet.

QuoteThere are some subtler & much more 'realistic' methods using complicated maths in digital processing chips as well today (they can do the opposite, that is, time stretching without pitch shifting, as well) but the 'early' stuff worked by variable playback rate of snippets.

any idea where i would find out more about this? any ideas on companies perhaps? or do you think it is going to end up that its just a program someone has thrown into a microprocessor?

thanks for the response Paul

petemoore

Triggering a guitar synth, that sounds like your guitar [sampled?] to give beginning pitch, speed the tone generator [second source] up to raise pitch.
 Have an ez spring switch on the pedal so that when your foot touches, the note is sampled, then as the pedal swings from center of range toward toe down, only the pitch shifted sampled note is heard.
 From center to toe up would be the regular pitch down.
 Sounds like a Huge bite to me, ALOT of engineering. but having something that is a second source, which can be 'sped up' without 'leaving spaces', an oscillator tone, pitch controlled by a pot....getting all that wired and switches in self centering treadle, with no glitches, could get rather messy.
Convention creates following, following creates convention.

SeanCostello

The Whammy uses an algorithm licensed from IVL Technologies in Victoria, BC.  They have patented a few pitch shift and pitch detection algorithms, but I am not sure which of these patents is used for the Whammy.

Most of the classic pitch shifters would have a delay buffer, and take two or more "taps" from the same delay memory. These "taps" would read the data out at a different rate than it was written into the delay buffer - as Paul explained, changing the rate changes the pitch. The output of each delay tap is multiplied by an amplitude window, which is often trapezoidal, triangular, or raised cosine in shape. When the volume of the window is at 0, the delay tap can move to a different location on the delay line without the resulting "glitch" being heard. The idea is that the taps are crossfaded in between, and when the read tap gets too close to the write tap, the volume is faded to zero and the tap is moved to a safer location.

In the earlier pitch shifters, the crossfading would happen at a rather slow rate (10 Hz or so), and would be perfectly periodic. This results in decent results for broadband material, but you can hear a lot of "comb filter" effects, due to phase cancellations between the overlapping taps. The windows can be altered so that there is minimum cancellation, but this can lead to tremolo-like artifacts in volume.

Higher quality pitch shifters, starting with some of the Eventide models, used a technique where autocorrelation would be used to try to get a better phase match between crossfaded segments of audio, to reduce the amount of comb filtering. This sounds MUCH better, but has the side effect that the algorithm has to be tweaked to work with different types of program material - i.e. one algorithm may be optimized for monophonic signals, another for drums.  Plus, as the autocorrelation can be viewed as a form of pitch detection, the complexity of the algorithm is greatly increased. This is often called SOLA (Synchronous Overlap and Add).

Many modern pitch shifters such as the Antares Auto Tune algorithm use a variant of the above technique called Phase Synchronous Overlap and Add (PSOLA). This uses some sort of algorithm to detect the pitch of the signal, and the grain size is scaled to become a single period of the pitch. Then, the grains are played back in such a way that the signal WITHIN the grain is at the same pitch as before, but the grain RATE is the desired output pitch. This results in pitch shifting without formant shift, assuming that the pitch detector is accurate. If you change the playback rate within the grains, you can get formant shift.

My guess is that the Whammy uses a type of SOLA, with larger grain sizes than the PSOLA algorithms. The Whammy can get warbly with certain intervals, which is found in algorithms that are trying to track the period of the signal (pitch detectors, octave dividers, etc.). However, the artifacts are not as bad as running chords into a PSOLA pitch shifter.

A few references: Keith Lent first described a PSOLA technique in the Computer Music Journal around 1989 or so. Robert Bristow-Johnson did a nice theoretical analysis of PSOLA in a 1995 Journal of the Audio Engineering Society. I forgot where I read about SOLA, but I know it was covered in the Computer Music Journal as well. Eventide has a patent on one techique that implements SOLA from 1984 or so, but the patent has expired, os that would be a good patent to look at.

Hope this helps. Writing a good pitch shifter is a complicated process. My current pitch shifter I wrote for work avoids pitch detection, and just randomizes the grains to reduce the comb filtering artifacts - it creates a bit of a watery sound, but it works well with broadband signals.

Sean Costello

SnooP_Wiggles

heres a guide to pitch shifting techniques which is kinda what your after. however the original tracks better apparantly thanks to having automatic input gain control or something which ensures the whammy tracks the signal even when signal is low (for when notes decay). reissues are known to 'warble' at the tail end of a plucked note.

http://www.tc-helicon.tc/Files/Whitepapers/Pitch_shifting.pdf

loscha

thanks SeanCostello, that was one the best posts I've read on this board.

When I explain it to me people (esp guitarists), I often use the Rotating Tape Head analogy, they seem to be able to get a handle on that.

But, yes, Granular re-synthesis seems to be the way of the future as far as pitch shifting is concerned. I can't help but wonder that the way computer musicians think about pitch shifting, and it being a generalized process for all sounds, are missing some elegantly simple answer that will work with processing a relatively un complex and recurring waveform such as a guitar.
which part of sin theta plus index times sin theta times ratio do you need me to clarify to you?