nxbyte / PythonAudioEffects

A Python library that can apply: darth vader, echo, radio, robotic, and ghost effects to audio samples.
MIT License
55 stars 14 forks source link

_set_stretch will raise exception for stereophonic data sample #3

Open yoyoberenguer opened 3 years ago

yoyoberenguer commented 3 years ago

Hello,

I hope this email find you well, Regarding the pitch shifting algorithm I would like to brought your attention on two potential issues while processing audio samples. Fortunately these issues can be easily fix.

The pitch shifting algorithm or method _set_stretch will eventually raise an exception when processing stereophonic data sample. May be this should be written in the doc or code put in place to process one channel at the time when it comes to work with stereophonic sound effect.

The overlapping subarray is defined by window_size and equivalent to 2 13, this will also raise an exception for sound effect approximately < 2 13 samples (sound effect duration lower than 8192 / 44100 = 0.185 seconds for a sampling at 44100hz) May be the window size can be adjusted according to the data sample length ?

Kind Regards

yoyoberenguer commented 3 years ago

Sorry I just realized that you are converting stereophonic data samples to mono with self.audio_data = AudioProcessing.convert_to_mono_audio(self.audio_data)

Kind regards