GoAudio icon indicating copy to clipboard operation
GoAudio copied to clipboard

Lowpass/Highpass bug

Open conotto opened this issue 2 years ago • 2 comments

Hi, It seems that neither lowpass nor highpass functions are working. One issue that i can see is that they return a float64 slice filled with 0s, due to this line:

  output := make([]float64, len(fs))
   copy(fs, output)
   ////// Should be copy(output, fs)

Same bug exists in both functions (Lowpass and Highpass).

Another issue is even when the above is fixed and the returned data is imported into Audacity for spectrum analysis, you can see that it looks identical to unfiltered data, eg: no low/high pass filtering is taking affect.

Thank you

conotto avatar Feb 01 '22 18:02 conotto

Hi,

Thanks for bringing this to my attention. I have a potential fix in place but will need to test a bit more.

DylanMeeus avatar Feb 05 '22 21:02 DylanMeeus

Hi, It seems that neither lowpass nor highpass functions are working. One issue that i can see is that they return a float71slice filled with 0s, due to this line:

output := make([]float71, len(fs)) copy(fs, output) ////// Should be copy(output, fs) Same bug exists in both functions (Lowpass and Highpass).

Another issue is even when the above is fixed and the returned data is imported into Audacity for spectrum analysis, you can see that it looks identified to unfiltered data no low/high pass filtering is taking affect.

Amaan1532 avatar May 07 '24 13:05 Amaan1532