poly_aftertouch Subroutine

public subroutine poly_aftertouch(self, channel, note, pressure)

Writes a polyphonic key pressure (poly 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) :: note
integer, intent(in) :: pressure

Calls

proc~~poly_aftertouch~~CallsGraph proc~poly_aftertouch MIDI_file%poly_aftertouch proc~checked_int8 checked_int8 proc~poly_aftertouch->proc~checked_int8 proc~delta_time MIDI_file%delta_time proc~poly_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 poly_aftertouch(self, channel, note, pressure)
        class(MIDI_file), intent(inout) :: self
        integer, intent(in) :: channel, note, pressure    ! 8 bits
        integer(int8) :: octets(0:2)

        call self%delta_time(0)

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