jurihock / stftPitchShift

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

Tiny (0.01s) Gaps Between Audio Outputs from stftPitchShift.shiftpitch() #37

Closed Rysertio closed 10 months ago

Rysertio commented 10 months ago

I tried to write an LADSPA plugin using stftPitchShift. However, whenever I call shiftpitch(), it adds a very tiny (about 0.01s) fade in and out at the start and end of each buffer it processes. Here is the plugin code.

I've attempted to solve it by:

Unfortunately, these attempts did not work.

jurihock commented 10 months ago

As mentioned in #18, #33, #34 and finally in the readme file, your have to use the StftPitchShiftCore instance inside of your own STFT pipeline for continuous audio signal processing. The StftPitchShift instance can't do this stuff.

Rysertio commented 10 months ago

I've tried to use the StftPitchShiftCore in here. But the gaps are still there.

jurihock commented 10 months ago

The STFT pipeline provided in this project cannot handle a continuous audio stream. It only handles a finite audio file at once. This is exactly the reason, why you hear gaps in the continuous (endless, not finite) audio stream. Instead you have to implement your own STFT pipeline with required capability.

jurihock commented 10 months ago

Further reading: DAFX (chapter 7 Time-frequency processing)