GSFIR the Open Source Multiplatform Python FIR Generation Tool

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi all,

I've been looking for a macOs replacement for rePhase (which is amazing) but have come up with nothing. I can write a bit of python so started looking into writing a script to create the FIR coefficients I needed. I'm only really interested in sharp angle filters and shelving - not EQ.

I have put the code in this repo:

GitHub - geowal19/GSFIR

Current functionality is extremely basic and only a proof of concept. I have implemented a way to create brickwall filters and shelving, I have no tested the coefficients in real life.

Please feel free to clone and play with the code, there's a demo script called tester.py.

I will be continuing to work on this in a very casual basis.
 
Hey Boscoe, thank you for sharing this!

I had been looking for a FOSS alternative to rePhase for a while. While rePhase is hosted on sourceforge.org, I have unfortunately never seen any source code published for it.

I'm currently experimenting with using a soundcard and ffmpeg as my phono preamp. The results are surprisingly good so far.

For an experiment I'd like to generate an 18Hz brickwall highpass filter and compare it with the 8th order Linkwitz-Riley filter I'm currently using.

Do I understand correctly that I'd only have to change sample rate in gs_fir.py to the 96000Hz rate that I use and edit tester.py to this:
Code:
from gs_fir import GSFIR

config = GSFIR()
#config.apply_low_pass(1000)
config.apply_high_pass(18)
#config.apply_shelf(10, 100, 10)
#config.print_resp()
config.create_coefficients(n_taps=8001)
config.print_output_resp()
config.output_coefs('output.fir')
to get a coefficients file called output.fir?
 
Hey Boscoe, thank you for sharing this!

I had been looking for a FOSS alternative to rePhase for a while. While rePhase is hosted on sourceforge.org, I have unfortunately never seen any source code published for it.

I'm currently experimenting with using a soundcard and ffmpeg as my phono preamp. The results are surprisingly good so far.

For an experiment I'd like to generate an 18Hz brickwall highpass filter and compare it with the 8th order Linkwitz-Riley filter I'm currently using.

Do I understand correctly that I'd only have to change sample rate in gs_fir.py to the 96000Hz rate that I use and edit tester.py to this:
Code:
from gs_fir import GSFIR

config = GSFIR()
#config.apply_low_pass(1000)
config.apply_high_pass(18)
#config.apply_shelf(10, 100, 10)
#config.print_resp()
config.create_coefficients(n_taps=8001)
config.print_output_resp()
config.output_coefs('output.fir')
to get a coefficients file called output.fir?

Hi Ariendj, that is almost correct. Yes, you can set fs in gs_fir.py but it is better if you leave the API alone and change it in tester.py by doing the following:

Code:
config.fs = 96000

All frequency values are in Hz so this line should look like this:

Code:
config.apply_high_pass(18000)

Remember to set the correct number of taps for your application.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.