Writes a Note OFF event. MIDI notes are in the range 0..127 The release velocity is in the range 0..127.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(MIDI_file), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | channel | |||
integer, | intent(in) | :: | note | |||
integer, | intent(in), | optional | :: | velocity |
subroutine Note_OFF(self, channel, note, velocity) class(MIDI_file), intent(inout) :: self integer, intent(in) :: channel, note ! 8 bits integer, optional, intent(in) :: velocity ! 8 bits integer(int8) :: octets(0:2) octets(0) = OFF + checked_int8(channel, upper=15) octets(1) = checked_int8(note) if (present(velocity)) then octets(2) = checked_int8(velocity) else octets(2) = 64 ! Default value if no velocity captor end if write(self%unit, iostat=self%status) octets end subroutine Note_OFF