def play_a_scale():
    root_note = 60
    channel = 1
    note_on_action = 144
    major_steps = [2, 2, 1, 2, 2, 2, 1, 0]
    velocity = 127
    note = root_note
    for step in major_steps:
        send_midi(((note_on_action | channel), note, velocity))
        sleep(0.1)
        send_midi(((note_on_action | channel), note, 0))
        note += step
        sleep(0.2)
def play_a_scale():
    root_note = 60
    channel = 1
    note_on_action = 144
    major_steps = [2, 2, 1, 2, 2, 2, 1, 0]
    velocity = 127
    note = root_note
    for step in major_steps:
        send_midi(((note_on_action | channel), note, velocity))
        sleep(0.1)
        send_midi(((note_on_action | channel), note, 0))
        note += step
        sleep(0.2)