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

Fir filter input #65

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
trying digital init
jmoso13 committed Sep 10, 2023
commit 68912a3a7d80e33a5afc80c08f69b4caf474b993
6 changes: 3 additions & 3 deletions auraloss/perceptual.py
Original file line number Diff line number Diff line change
@@ -118,10 +118,10 @@ def __init__(self, filter_type="hp", coef=0.85, fs=44100, ntaps=101, butter_orde
compare_filters(b, a, taps, fs=fs)
elif filter_type == "butter":
# Define butter filter
filts = scipy.signal.lti(*scipy.signal.butter(self.butter_order, self.butter_freq, self.butter_filter_type, fs=fs, analog=True))

# filts = scipy.signal.lti(*scipy.signal.butter(self.butter_order, self.butter_freq, self.butter_filter_type, analog=True))
b, a = scipy.signal.butter(self.butter_order, self.butter_freq, self.butter_filter_type, analog=False, output="ba", fs=fs)
# convert analog filter to digital filter
b, a = scipy.signal.bilinear(filts.num, filts.den, fs=fs)
# b, a = scipy.signal.bilinear(filts.num, filts.den, fs=fs)

# compute the digital filter frequency response
w_iir, h_iir = scipy.signal.freqz(b, a, worN=512, fs=fs)