# A Review of Time-Scale Modification of Music Signals +
## 7 Applications
### Pitch-Shifting  
Pitch-shifting is the task of changing an audio recording's pitch without altering its length--it can be seen as the dual problem to TSM. While there are specialized pitch-shifting procedures [37; 38], it is also possible to approach the problem by combining TSM with resampling. The core observation is that resampling a given signal and playing it back at the original sampling rate changes the length and the pitch of the signal at the same time (The same effect can be simulated with vinyl records by changing the rotation speed of the record player). To pitch-shift a given signal, it is therefore first resampled and afterwards time-scale modified in order to compensate for the change in length. More precisely, an audio signal, sampled at a rate of \(F_{\mathrm{s}}^{\mathrm{(in)}}\), is first resampled to have a new sampling rate of \(F_{\mathrm{s}}^{\mathrm{(out)}}\). When playing back the signal at its original sampling rate \(F_{\mathrm{s}}^{\mathrm{(in)}}\), this operation changes the signal's length by a factor of \(F_{\mathrm{s}}^{\mathrm{(out)}}/F_{\mathrm{s}}^{\mathrm{(in)}}\) and scales its frequencies by the term's inverse. For example, musically speaking, a factor of \(F_{\mathrm{s}}^{\mathrm{(out)}}/F_{\mathrm{s}}^{\mathrm{(in)}}=\frac{1}{2}\) increases the pitch content by one octave. To compensate for the change in length, the signal needs to be stretched by a factor of \(\alpha=F_{\mathrm{s}}^{\mathrm{(in)}}/F_{\mathrm{s}}^{\mathrm{(out)}}\), using a TSM procedure. To demonstrate this, we show an example in Figure 16, where the goal is to apply a pitch-shift of one octave to the input audio signal. The original signal has a sampling rate of \(F_{\mathrm{s}}^{\mathrm{(in)}}=44,100\) Hz (Figure 16a). To achieve the desired pitch-shift, the signal is resampled to \(F_{\mathrm{s}}^{\mathrm{(out)}}=22,050\) Hz (Figure 16b). One can see that the resampling changed the pitch of the signal as well as its length when interpreting the signal as still being sampled at \(F_{\mathrm{s}}^{\mathrm{(in)}}=44,100\) Hz. While the change in pitch is desired, the change in length needs to be compensated for. Thus, we stretch the signal by a factor of \(\alpha=44,100\) Hz\(/22,050\) Hz \(=2\) to its original length (Figure 16c). Figure 16: Pitch-shifting _via_ resampling and TSM. (**a**) Spectrogram of an input audio signal; (**b**) Spectrogram of the resampled signal; (**c**) Spectrogram after TSM application. The quality of the pitch-shifting result crucially depends on various factors. First, artifacts that are produced by the applied TSM procedure are also audible in the pitch-shifted signal. However, even when using a high-quality TSM procedure, the pitch-shifted signals generated by the method described above often sound unnatural. For example, when pitch-shifting singing voice upwards by several semitones, the modified voice has an artificial sound, sometimes referred to as the _chipmunk_ effect [39]. Here, the problem is that the _spectral envelope_, which is the rough shape of a frequency spectrum, is of central importance for the timbre of a sound. In Figure 17a, we see a frame's frequency spectrum from a singing voice recording. Due to the harmonic nature of the singing voice, the spectrum shows a comb-like pattern where the energy is distributed at multiples of a certain frequency--in this example roughly 250 Hz. The peaks in the pattern are called the _harmonics_ of the singing voice. The magnitudes of the harmonics follow a certain shape which is specified by the spectral envelope (marked in red). Peaks in the spectral envelope are known as _formants_. In the example from Figure 17a, we see four formants at around 200 Hz, 2200 Hz, 3100 Hz, and 5900 Hz. The frequency positions of these formants are closely related to the singing voice's timbre. In Figure 17b, we see the spectrum of the same frame after being pitch-shifted by four semitones with the previously described pitch-shifting procedure. Due to the resampling, the harmonics' positions are scaled.