circuitpython/tests/circuitpython/synthio_biquad.py
Jeff Epler fed8d5825b
synthio: add biquad filter type & basic filter calculations
the filter cannot be applied as yet.
2023-05-29 09:50:18 -05:00

13 lines
249 B
Python

from synthio import Synthesizer
s = Synthesizer(sample_rate=48000)
def print_filter(x):
print(" ".join(f"{v:.4g}" for v in x))
print_filter(s.low_pass_filter(330))
print_filter(s.high_pass_filter(330))
print_filter(s.band_pass_filter(330))