Play notes with a 300ms interval.
from m5stack import *
from m5stack_ui import *
from uiflow import *
import time
import unit
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
synth_0 = unit.get(unit.SYNTH, unit.PORTB)
synth_0.set_channel_volume(0, 121)
synth_0.set_change_instrument(0, 0, 112)
while True:
synth_0.set_note_on(0, 80, 23)
synth_0.set_note_on(0, 57, 73)
wait_ms(300)
synth_0.set_note_on(0, 66, 101)
synth_0.set_note_on(0, 60, 52)
wait_ms(2)
synth_0.set_all_drums()
synth_0.set_all_notes_off(0)
synth_0.set_change_instrument(0, 0, 1)
synth_0.set_channel_volume(0, 0)
synth_0.set_chorus(0, 0, 0, 0, 0)
synth_0.midi_reset()
synth_0.set_envelope(0, 0, 0, 0)
synth_0.set_equalizer(0, 0, 0, 0, 0, 0, 0, 0, 0)
synth_0.set_master_volume(0)
synth_0.set_mod_wheel(0, 0, 0, 0, 0, 0, 0, 0)
synth_0.set_note_off(0, 0)
synth_0.set_note_on(0, 0, 0)
synth_0.set_pan(0, 0)
synth_0.set_pitch_bend(0, 0)
synth_0.set_pitch_bend_range(0, 0)
synth_0.set_reverb(0, 0, 0, 0)
synth_0.set_scale_tuning(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
synth_0.set_tuning(0, 0, 0)
synth_0.set_tvf(0, 0, 0)
synth_0.set_vibrate(0, 0, 0, 0)