set_tempo Subroutine

public subroutine set_tempo(self, duration)

Specifies a tempo change by writing the duration of a quarter note expressed in µs. It is coded on 3 bytes: from 1 µs to 256**3 µs ~ 16.7 s. A duration of 500000 µs = 0.5 s is equivalent to a 120 bpm tempo. https://en.wikipedia.org/wiki/Tempo MIDI events must always be preceded by a "delta time", even if null:

Metadata always begin by 0xFF. Here, these codes mean we will define the music tempo:

Type Bound

MIDI_file

Arguments

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

Calls

proc~~set_tempo~~CallsGraph proc~set_tempo MIDI_file%set_tempo proc~checked_int32 checked_int32 proc~set_tempo->proc~checked_int32 proc~delta_time MIDI_file%delta_time proc~set_tempo->proc~delta_time 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

Called by

proc~~set_tempo~~CalledByGraph proc~set_tempo MIDI_file%set_tempo proc~new MIDI_file%new proc~new->proc~set_tempo program~blues blues program~blues->proc~new program~canon canon program~canon->proc~new program~circle_of_fifths circle_of_fifths program~circle_of_fifths->proc~new program~la_folia la_folia program~la_folia->proc~new program~motifs motifs program~motifs->proc~new program~third_kind third_kind program~third_kind->proc~new