Skip to content

Commit 30b69a8

Browse files
committed
synthio: update ring mod manual test
1 parent 8a56460 commit 30b69a8

File tree

1 file changed

+10
-4
lines changed
  • tests/circuitpython-manual/synthio/note

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@
2323
)
2424

2525
synth = synthio.Synthesizer(sample_rate=48000)
26+
bend_out = np.linspace(0, 32767, num=SAMPLE_SIZE, endpoint=True, dtype=np.int16)
2627

2728

2829
def synthesize(synth):
2930
n = synthio.Note(
30-
frequency=120,
31+
frequency=440,
3132
waveform=sine,
3233
ring_waveform=sine,
3334
ring_frequency=769,
3435
envelope=envelope,
35-
bend_mode=synthio.BendType.VIBRATO,
36-
bend_depth=50 / 1200,
37-
bend_rate=7,
36+
bend=synthio.LFO(bend_out, scale=50 / 1200, rate=7),
3837
)
3938

4039
print(synth, n)
@@ -43,6 +42,13 @@ def synthesize(synth):
4342
synth.release_all()
4443
yield 36
4544

45+
n.ring_frequency = 0
46+
print(synth, n)
47+
synth.press((n,))
48+
yield 720
49+
synth.release_all()
50+
yield 36
51+
4652

4753
def chain(*args):
4854
for a in args:

0 commit comments

Comments
 (0)