synthio: add manual filter frequency sweeping to standalone test

.. by assigning a new band pass filter to the note every 2 frames
This commit is contained in:
Jeff Epler 2023-05-29 11:23:45 -05:00
parent a891e149a6
commit f5388e12af
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 15 additions and 0 deletions

View File

@ -51,6 +51,21 @@ def synthesize(synth):
synth.release_all()
yield 36
for waveform in (sine, None, noise):
n = synthio.Note(
frequency=555,
envelope=envelope,
waveform=waveform,
)
synth.press(n)
i = 220
while i < 1760:
n.filter = synth.band_pass_filter(i)
i *= 1.00579
yield 1
synth.release_all()
yield 6
with wave.open("biquad.wav", "w") as f:
f.setnchannels(1)