How pitch shifting and formant preservation work
mainMono Pitch Shifting
Mono pitch shifting is achieved by resampling the magnitude and frequency vectors from the Vocoder module.
- Factor
1: No change. - Factor
<1: Downsampling. - Factor
>1: Upsampling.
Poly Pitch Shifting
Poly pitch shifting allows multiple pitch variations in a single DFT frame. The algorithm combines multiple resampled vectors by keeping the frequency value of the strongest magnitude value, effectively masking weaker components.
Formant Preservation
To avoid the 'Mickey Mouse' effect, the implementation uses cepstral domain low-pass filtering (liftering) to extract a spectral envelope (the vocal tract resonances). This envelope is removed from the magnitude, the residual signal is pitch-shifted, and then the envelope is recombined with the processed residual.