Skip to content

Commit f5388e1

Browse files
committed
synthio: add manual filter frequency sweeping to standalone test
.. by assigning a new band pass filter to the note every 2 frames
1 parent a891e14 commit f5388e1

File tree

1 file changed

+15
-0
lines changed
  • tests/circuitpython-manual/synthio/note

1 file changed

+15
-0
lines changed

tests/circuitpython-manual/synthio/note/biquad.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ def synthesize(synth):
5151
synth.release_all()
5252
yield 36
5353

54+
for waveform in (sine, None, noise):
55+
n = synthio.Note(
56+
frequency=555,
57+
envelope=envelope,
58+
waveform=waveform,
59+
)
60+
synth.press(n)
61+
i = 220
62+
while i < 1760:
63+
n.filter = synth.band_pass_filter(i)
64+
i *= 1.00579
65+
yield 1
66+
synth.release_all()
67+
yield 6
68+
5469

5570
with wave.open("biquad.wav", "w") as f:
5671
f.setnchannels(1)

0 commit comments

Comments
 (0)