synthio: update ring mod manual test

This commit is contained in:
Jeff Epler 2023-05-30 19:32:24 -05:00
parent 8a564602a1
commit 30b69a821e
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 10 additions and 4 deletions

View File

@ -23,18 +23,17 @@ envelope = synthio.Envelope(
) )
synth = synthio.Synthesizer(sample_rate=48000) synth = synthio.Synthesizer(sample_rate=48000)
bend_out = np.linspace(0, 32767, num=SAMPLE_SIZE, endpoint=True, dtype=np.int16)
def synthesize(synth): def synthesize(synth):
n = synthio.Note( n = synthio.Note(
frequency=120, frequency=440,
waveform=sine, waveform=sine,
ring_waveform=sine, ring_waveform=sine,
ring_frequency=769, ring_frequency=769,
envelope=envelope, envelope=envelope,
bend_mode=synthio.BendType.VIBRATO, bend=synthio.LFO(bend_out, scale=50 / 1200, rate=7),
bend_depth=50 / 1200,
bend_rate=7,
) )
print(synth, n) print(synth, n)
@ -43,6 +42,13 @@ def synthesize(synth):
synth.release_all() synth.release_all()
yield 36 yield 36
n.ring_frequency = 0
print(synth, n)
synth.press((n,))
yield 720
synth.release_all()
yield 36
def chain(*args): def chain(*args):
for a in args: for a in args: