Skip to content

Commit

Permalink
Implement sustain message
Browse files Browse the repository at this point in the history
  • Loading branch information
kirikak2 committed May 26, 2023
1 parent 1c4d5bf commit 35fc048
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/tests/midi_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ def note_off_with_nil_velocity_case
assert_equal [[MIDI::NOTE_OFF_EVENT || 0, 0, 76]], @midi.instance_variable_get("@buffer")
end

description "sustain on"
def sustain_on_case
@midi.send_sustain(1)
assert_equal [[MIDI::CONTROL_CHANGE_EVENT || 0, 0x7f]], @midi.instance_variable_get("@buffer")
end

description "sustain off"
def sustain_off_case
@midi.send_sustain(0)
assert_equal [[MIDI::CONTROL_CHANGE_EVENT || 0, 0]], @midi.instance_variable_get("@buffer")
end

description "task_when_chord_mode_on_with_major"
def convert_chord_pattern_with_major_case
assert_equal [0, 4, 7], @midi.convert_chord_pattern(0)
Expand Down

0 comments on commit 35fc048

Please sign in to comment.