Skip to content

Commit

Permalink
synthio: update ring mod manual test
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed May 31, 2023
1 parent 8a56460 commit 30b69a8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/circuitpython-manual/synthio/note/ring.py
Expand Up @@ -23,18 +23,17 @@
)

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)
Expand All @@ -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:
Expand Down

0 comments on commit 30b69a8

Please sign in to comment.