From 30b69a821ed4cf09d7e17b8378c4d3a5ad513593 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 30 May 2023 19:32:24 -0500 Subject: [PATCH] synthio: update ring mod manual test --- tests/circuitpython-manual/synthio/note/ring.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/circuitpython-manual/synthio/note/ring.py b/tests/circuitpython-manual/synthio/note/ring.py index 7a418da3af..5ba551ec17 100644 --- a/tests/circuitpython-manual/synthio/note/ring.py +++ b/tests/circuitpython-manual/synthio/note/ring.py @@ -23,18 +23,17 @@ envelope = synthio.Envelope( ) synth = synthio.Synthesizer(sample_rate=48000) +bend_out = np.linspace(0, 32767, num=SAMPLE_SIZE, endpoint=True, dtype=np.int16) def synthesize(synth): n = synthio.Note( - frequency=120, + frequency=440, waveform=sine, ring_waveform=sine, ring_frequency=769, envelope=envelope, - bend_mode=synthio.BendType.VIBRATO, - bend_depth=50 / 1200, - bend_rate=7, + bend=synthio.LFO(bend_out, scale=50 / 1200, rate=7), ) print(synth, n) @@ -43,6 +42,13 @@ def synthesize(synth): synth.release_all() yield 36 + n.ring_frequency = 0 + print(synth, n) + synth.press((n,)) + yield 720 + synth.release_all() + yield 36 + def chain(*args): for a in args: