Audio timescale-pitch modification

Audio timescale-pitch modification

Time stretching is the process of changing the speed or duration of an audio signal without affecting its pitch.Pitch scaling or pitch shifting is the reverse: the process of changing the pitch without affecting the speed. There are also more advanced methods used to change speed, pitch, or both at once, as a function of time.

These processes are used, for instance, to match the pitches and tempos of two pre-recorded clips for mixing when the clips cannot be reperformed or resampled. (A drum track could be moderately resampled for tempo without adverse effects, but a pitched track could not). They are also used to create effects such as increasing the range of an instrument (like pitch shifting a guitar down an octave).


The simplest way to change the duration or pitch of a digital audio clip is to resample it. This is a mathematical operation that effectively rebuilds a continuous waveform from its samples and then samples that waveform again at a different rate. When the new samples are played at the original sampling frequency, the audio clip sounds faster or slower. Unfortunately, the frequencies in the sample are always scaled at the same rate as the speed. In other words, slowing down the recording lowers the pitch, speeding it up raises the pitch, and the two effects cannot be separated. This is analogous to speeding up or slowing down an analog recording, like a phonograph record or tape, creating the chipmunk effect.

Phase vocoder

One way of stretching the length of a signal without affecting the pitch is to build a phase vocoder after Flanagan, Golden, and Portnoff.

Basic steps:
#compute the instantaneous frequency/amplitude relationship of the signal using the STFT, which is the discrete Fourier transform of a short, overlapping and smoothly windowed block of samples;
#apply some processing to the Fourier transform magnitudes and phases (like resampling the FFT blocks); and
#perform an inverse STFT by taking the inverse Fourier transform on each chunk and adding the resulting waveform chunks.

The phase vocoder handles sinusoid components well, but early implementations introduced considerable smearing on transient ("beat") waveforms at all non-integer compression/expansion rates, which renders the results phasey and diffuse. Recent improvements allow better quality results at all compression/expansion ratios but a residual smearing effect still remains.

The phase vocoder technique can also be used to perform pitch shifting, chorusing, timbre manipulation, harmonizing, and other unusual modifications, all of which can be changed as a function of time.

Time domain

Rabiner and Schafer in 1978 put forth an alternate solution that works in the time domain: attempt to find the period (or equivalently the fundamental frequency) of a given section of the wave using some pitch detection algorithm (commonly the peak of the signal's autocorrelation, or sometimes cepstral processing), and crossfade one period into another.This is called time domain harmonic scaling or the synchronized overlap-add method and performs somewhat faster than the phase vocoder on slower machines but fails when the autocorrelation mis-estimates the period of a signal with complicated harmonics (such as orchestral pieces).
Adobe Audition (formerly Cool Edit Pro) seems to solve this by looking for the period closest to a center period that the user specifies, which should be an integer multiple of the tempo, and between 30 Hz and the lowest bass frequency. For a 120 bpm tune, use 48 Hz because 48 Hz = 2,880 cycles/minute = 24 cycles/beat * 120 bpm.Fact|date=February 2007

This is much more limited in scope than the phase vocoder based processing, but can be made much less processor intensive, for real-time applications. It provides the most coherent results for single-pitched sounds like voice or musically monophonic instrument recordings.

High-end commercial audio processing packages either combine the two techniques (for example by separating the signal into sinusoid and transient waveforms), or use other techniques based on the wavelet transform, or artificial neural network processing, producing the highest-quality time stretching.

Sinusoidal/Spectral Modeling

Another alternative method for time stretching relies on a spectral model of the signal. In this method, peaks are identified in frames the STFT of the signal, and sinusoidal "tracks" are created by connecting peaks in adjacent frames. The tracks are then re-synthesized at a new time scale. This method can yield good results on both polyphonic and percussive material, especially when the signal is separated into sub-bands. However, this method is more computationally demanding than other methods.

Speed reading

Time stretching can be used with audio books and recorded lectures.Slowing down may improve comprehension of foreign languages [] .

While one might expect speeding up to reduce comprehension,Herb Friedman says that "Experiments have shown that the brain works most efficiently if the information rate through the ears--via speech--is the "average" reading rate, which is about 200-300 wpm (words per minute), yet the average rate of speech is in the neighborhood of 100-150 wpm." [ ]

Speeding up audio is seen as the equivalent of "speed reading" [ ] [ ] .


Time stretching is often used to adjust Radio commercials [] and the audio of Television advertisements [] to fit exactly into the 30 or 60 seconds available.(A telecine pulldown pattern adjusts the video).

Pitch scaling

These techniques can also be used to transpose an audio sample while holding speed or duration constant. This may be accomplished by time stretching and then resampling back to the original length. Alternatively, the frequency of the sinusoids in a sinusoidal model may be altered directly, and the signal reconstructed at the appropriate time scale.

Transposing can be called pitch scaling or pitch shifting, depending on perspective.

For example, one could move the frequency of every note up by a perfect fifth, keeping the tempo the same.One can view this transposition as "pitch shifting", "shifting" each note up 7 keys on a piano keyboard, or adding a fixed amount on the Mel scale, or adding a fixed amount in linear pitch space.One can view the same transposition as "pitch scaling", "scaling" (multiplying) the frequency of every note by 3/2.

Musical transposition preserve the ratios of the harmonic frequencies that determine the sound's timbre, unlike the "frequency shift" performed by amplitude modulation, which adds a fixed frequency offset to the frequency of every note. (In theory one could perform a literal "pitch scaling" in which the musical pitch space location is scaled [a higher note would be shifted at a greater interval in linear pitch space than a lower note] , but that is highly unusual, and not musical).

Time domain processing works much better here, as smearing is less noticeable, but scaling vocal samples distorts the formants into a sort of Alvin and the Chipmunks-like effect, which may be desirable or undesirable.A process that preserves the formants and character of a voice involves analyzing the signal with a channel vocoder or LPC vocoder plus any of several pitch detection algorithms and then resynthesizing it at a different fundamental frequency.

ee also

* Audio signal processing
* Pitch control
* Sound effects

External links

* [ MFFM Time Scale Modification for Audio] Implementation of the WSOLA algorithm for time scale modification of audio without artifact introduction
* [ Timetoy (Mac OS X)] A fun, easy-to-use timestretcher for Mac OS X by LowNorth
* [ Time Stretching and Pitch Shifting Overview] A comprehensive overview of current time and pitch modification techniques by Stephan Bernsee (Quite old, 1999)
* [ Stephan Bernsee's smbPitchShift C source code] C source code for doing frequency domain pitch manipulation
* [ The Phase Vocoder: A Tutorial] - A good description of the phase vocoder
* [ New Phase-Vocoder Techniques for Pitch-Shifting, Harmonizing and Other Exotic Effects]
* [ A new Approach to Transient Processing in the Phase Vocoder]
* [ PSOLA Synthesis] , [ SOLAFS Synthesis] - Two specific methods of time domain TDHS or SOLA processing.
* [ Audio Engineering Society]
*Original E2 article (
* [ DSPdimension: DIRAC library]
* [ zplane.development: élastique SDKs]
* - comp.dsp FAQ
* [ SoundTouch library] - An open-source implementation of time/pitch scaling algorithms. SoundStretch came from here. Used in the cross-platform Audacity editor.
* [ PICOLA and TDHS]
* [ wavMasher] - Time and pitch scaling software
* [ PaulStretch] A program that works for extreme time stretching (like 50x), only
* [ 4 Band Shifter] An open source VST plugin based on Bernsee's code that shifts the pitch on 4 independent, user-definable frequency bands.
* [ sbsms] An open source sub-band-sinusoidal modeling library/tool for time-stretching/pitch-shifting

Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Pitch shift — is a sound recording technique in which the normal pitch or tone of a sound is altered ( shifted ) for effect or for other purposes.Pitch shifting may be done both in analog and in digital recording. In analog recording, the pitch is changed by… …   Wikipedia

  • Pitch shifter (audio processor) — A pitch shifter is an audio processor that changes the pitch of an audio signal. Originally marketed by Eventide as the Harmonizer effects processor, advances in digital signal processors soon made higher quality pitch shifting and harmonic pitch …   Wikipedia

  • Pitch control — A variable speed pitch control (or vari speed) is a control on an audio device such as a turntable, reel to reel, tape deck or CD player that allows the operator to deviate from a standard speed (such as 33⅓, 45 or even 78 rpm on a turntable).… …   Wikipedia

  • Delay (audio effect) — Various kind of delay effect units Delay is an audio effect which records an input signal to an audio storage medium, and then plays it back after a period of time.[1] The delayed signal may either be played back multiple times, or played back… …   Wikipedia

  • Phase vocoder — A phase vocoder is a type of vocoder which can scale both the frequency and time domains of audio signals by using phase information. The computer algorithm allows frequency domain modifications to a digital sound file (typically time… …   Wikipedia

  • AudioFile (company) — AudioFile was a software company that was founded in Massachusetts in 1990. It was founded under Venture Capital Investment by the Massachusetts Technology Development Corporation.Their early product was AudioFile Business Audio, a suite of… …   Wikipedia

  • Vocoder — A vocoder (  /ˈvoʊk …   Wikipedia

  • Spectrogram — The spectrogram is the result of calculating the frequency spectrum of windowed frames of a compound signal. It is a three dimensional plot of the energy of the frequency content of a signal as it changes over time. Spectrograms are used to… …   Wikipedia

  • PSOLA — In digital signal processing techniques PSOLA stands for Pitch Synchronous Overlap Add Method.It is used in speech alsoAudio timescale pitch modification.External links* [ PSOLA… …   Wikipedia

  • Chipmunk (disambiguation) — A chipmunk is a kind of animal. Chipmunk may also refer to: Alvin and the Chipmunks, a fictional musical group Audio timescale pitch modification, known as The Chipmunk effect De Havilland Chipmunk, a two seat, propeller driven training aircraft… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”