# Linear Frequency Shift

Hi there,

I’m trying to perform a linear frequency shift in Audacity, but I have no idea how to go about this, and despite spending some time reading up on Nyquist Prompt commands and such, I still have very little idea of how to proceed with this.

I’m aware linear frequency shifting (that is, linear addition and subtraction in frequency space rather than the standard multiplication in frequency space) is a strange operation, but it’s also incredibly useful for sound design, which is what I’m intending to use it for.

This shouldn’t be a particularly difficult operation to do, really, but I can’t for the life of me work out how to do it. Does anyone have any idea how I might achieve this?

It’s not easy.

Basically, you need to take the FFT, and determine the spectrogram, then shift the spectrogram up by the required amount, and run the inverse FFT.
There’s an FFT / IFFT tutorial for Nyquist here: Nyquist FFT and Inverse FFT Tutorial
More advanced versions of this effect also use complex algorithms (such as intra-frame sinusoidal sweep and ramp rate correction) to shape transients for a more natural sounding effect.

A much simpler way is to use the pitshift function, but the sound quality is not particularly good.
http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index499

In the latest version of Nyquist (not yet included in Audacity) there is a phase vocoder function that can produce fairly high quality pitch shift. You could use this in the standalone version of Nyquist, but not yet in Audacity.
http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index545

I know of a free plugin which will do that in Audacity …
https://www.fullbucket.de/music/freqshifter.html

It says PC & Mac, I’ve only used the PC version.

[ NB: Currently only 32-bit versions of VST plugins work in Audacity, even if your OS is 64-bit ]