Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowpass/Highpass bug #21

Open
conotto opened this issue Feb 1, 2022 · 2 comments
Open

Lowpass/Highpass bug #21

conotto opened this issue Feb 1, 2022 · 2 comments

Comments

@conotto
Copy link

conotto commented Feb 1, 2022

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

@DylanMeeus
Copy link
Owner

Hi,

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

@Amaan1532
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants