mono_aftertouch Subroutine

public subroutine mono_aftertouch(self, channel, pressure)

Writes a Channel-wide pressure (mono aftertouch) event. The pressure is in the range 0..127.

Type Bound

MIDI_file

Arguments

Type IntentOptional Attributes Name
class(MIDI_file), intent(inout) :: self
integer, intent(in) :: channel
integer, intent(in) :: pressure

Calls

proc~~mono_aftertouch~~CallsGraph proc~mono_aftertouch MIDI_file%mono_aftertouch proc~checked_int8 checked_int8 proc~mono_aftertouch->proc~checked_int8 proc~delta_time MIDI_file%delta_time proc~mono_aftertouch->proc~delta_time proc~checked_int32 checked_int32 proc~delta_time->proc~checked_int32 proc~write_variable_length_quantity MIDI_file%write_variable_length_quantity proc~delta_time->proc~write_variable_length_quantity proc~variable_length_quantity variable_length_quantity proc~write_variable_length_quantity->proc~variable_length_quantity

Source Code

    subroutine mono_aftertouch(self, channel, pressure)
        class(MIDI_file), intent(inout) :: self
        integer, intent(in) :: channel, pressure    ! 8 bits
        integer(int8) :: octets(0:1)

        call self%delta_time(0)

        octets(0) = int(z'D0', int8) + checked_int8(channel, upper=15)
        octets(1) = checked_int8(pressure)
        write(self%unit, iostat=self%status) octets
    end subroutine mono_aftertouch