Skip to content

y-fujii/mini_pvdr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mini_pvdr.py

mini_pvdr.py is a polyphonic audio time-stretcher and pitch-shifter using Phase Gradient Heap Integration method. I keep it minimal (≃ 100 SLOC) because it is developed primarily for (my personal) learning/experiment/research purposes.

Note that several processes in this implementation are simplified from those described in the paper. Do not use it to evaluate the original paper.

Usage

mini_pvdr.py can be installed with standard python packaging tools, or you can try it by:

pip install numpy
./src/mini_pvdr.py time_factor pitch_factor src.wav dst.wav

It supports 16-bit mono wave files only.

Implementation notes

  • It is important to align the origin of Fourier transform with the center of the window function, because the positions of wave packets are scaled in phase integration.

  • mini_pvdr.py uses a simple nearest-neighbor difference scheme rather than the four-point difference scheme used in the paper. While simple scheme yields better results in my tests, it may be caused by the incorrect implementation.

  • mini_pvdr.py processes time-stretching and pitch-shifting simultaneously by using asymmetric FFT/inverse-FFT pairs, rather than resampling with time-stretching. It requires non-power-of-two FFT.

References

About

Polyphonic audio time-stretcher and pitch-shifter using Phase Gradient Heap Integration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages