Skip to content

Conversation

@tlecomte
Copy link
Owner

@tlecomte tlecomte commented Sep 14, 2025

The code in harmonic_product_spectrum was unexpectedly changing the spectrum array data, because numpy operates on views rather than copies. In turn, this was breaking the low-frequency bins of the FFT spectrum.

Here we fix it by directly multiplying the views.

The original error is mine, introduced in #266.

Fixes #319

The code in `harmonic_product_spectrum` was unexpectedly changing the spectrum array data, because numpy operates on views rather than copies. In turn, this was breaking the low-frequency bins of the FFT spectrum.

Here we fix it by taking a copy of the numpy slice.
@tlecomte tlecomte merged commit f074125 into master Sep 14, 2025
4 checks passed
@tlecomte tlecomte deleted the fixFftSmooth branch September 14, 2025 09:29
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

Successfully merging this pull request may close these issues.

[Bug] The FFT Spectrum's response time only applies to frequencies above 8 kHz

2 participants