libsamplerate icon indicating copy to clipboard operation
libsamplerate copied to clipboard

Issue with make_filter.m generating "newer" fastest_coeffs.h

Open bit-bash opened this issue 4 years ago • 3 comments

I re-ran the make_filter.m Octave script with f = make_filter (8, 128, 100.3) I am using octave-6.1.0-w64-installer.exe for Windows. When I replaced the newly-generated coefficients into fastest_coeffs.h and recompile, I am getting far worse results than the original fastest coefficients. I have a test .wav file with two tones (400Hz and 700Hz) sampled at 8000 samples/second. When I run this through the resampler app (using -c 2 -to 16000) I get great results with the old coefficients but the newly-generated coefficients produce significant artifacts/harmonics near the high end frequency spectrum. The ONLY thing changed is the coefficient table. I'm assuming that changes may have been made to the octave scripts since the original fastest coefficient table was generated, and these changes may be causing this issue. Since there's no history in the repo for the octave scripts (that I can see), I can't try older octave scripts to see if I can reproduce the older coefficients. I've attached the newly-generated coefficients from the octave scripts. fast-new.txt

bit-bash avatar Jan 20 '21 22:01 bit-bash

I've found related pull request #52.

@enzo1982, any thoughts?

evpobr avatar May 26 '21 07:05 evpobr

That was not a pull request. I just raised the issue that the filter generator scripts were not included in the repository. I wanted to try different filter settings back then, but unfortunately never got to it.

I can reproduce the issue, though. The filters generated with the scripts in the repository do not match the ones in the library header files.

Maybe @erikd knows more about the filter generators?

enzo1982 avatar May 26 '21 14:05 enzo1982

@erikd?

evpobr avatar May 26 '21 14:05 evpobr