AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

commit c675863e274423388f5a73643dc389f2e673d2e2
parent d04acc9b1d921b82ae92868cf3060c7bde3e4e75
Author: jatinchowdhury18 <[email protected]>
Date:   Tue,  7 Sep 2021 09:08:16 -0700

Add DC blocker plotting script [ci skip]

Diffstat:
ASimulations/dc_blocker_plots.py | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/Simulations/dc_blocker_plots.py b/Simulations/dc_blocker_plots.py @@ -0,0 +1,28 @@ +import numpy as np +import matplotlib.pyplot as plt +import audio_dspy as adsp + +FS = 48000 + +worN = np.logspace(1, 2, 500) + +# 12 dB/Oct filters +freq = [45, 40, 35] +legend = [] +for fc in freq: + b, a = adsp.design_HPF2(fc, 0.7071, FS) + adsp.plot_magnitude_response(b, a, fs=FS, worN=worN) + legend.append(f'12 dB Slope, fc={fc}') + +# 24 dB/Oct fitler +freq = 35 +sos = adsp.design_HPFN(freq, 0.7071, 4, FS) +adsp.plot_magnitude_response_sos(sos, fs=FS, worN=worN) +legend.append(f'24 dB Slope, fc={freq}') + +plt.grid(which='both') +plt.ylim([-30, 3]) + +plt.legend(legend, loc='lower right') +plt.title('DC Blockers Comparison') +plt.show()