jurihock / stftPitchShift

STFT based real-time pitch and timbre shifting in C++ and Python
MIT License
115 stars 14 forks source link

Refactor cepstral liftering #11

Closed jurihock closed 2 years ago

jurihock commented 2 years ago

The forward and backward transformations of the log magnitude spectrum are both purely real. Thus think about an optimization possibility...

See also:

  1. Discrete Cosine Transform
  2. A fast cosine transform in one and two dimensions
  3. Implementing Fast Fourier Transform Algorithms of Real-Valued Sequences (as already implemented in #7)
jurihock commented 2 years ago

Actually, the discrete cosine transform of x[n] is the real part of its Fourier transform X[m]. That's what the Cepster module computes.

The [2] shows an additional trick to half the packing procedure, as implemented here. This trick doesn't seem directly applicable in [3] to me, due to pre-calculated coefficients A and B.

So I currently don't expect procedure [2] to be much more beneficial or faster than [3]... 🤔