new Subroutine

public subroutine new(self, file_name, format, tracks, divisions, tempo, time_signature, copyright, text_event)

Create a new MIDI file and its metadata track. Concerning the "divisions" argument, ForMIDI uses the "metrical timing" scheme, defining the number of ticks in a quarter note. The "timecode" scheme is not implemented. SMF format: 0: only one track in the file 1: several tracks played together (generally used) 2: several tracks played sequentially

Type Bound

MIDI_file

Arguments

Type IntentOptional Attributes Name
class(MIDI_file), intent(inout) :: self
character(len=*), intent(in) :: file_name
integer, intent(in) :: format
integer, intent(in) :: tracks
integer, intent(in) :: divisions
integer, intent(in) :: tempo
integer, intent(in), optional :: time_signature(:)
character(len=*), intent(in), optional :: copyright
character(len=*), intent(in), optional :: text_event

Calls

proc~~new~~CallsGraph proc~new MIDI_file%new proc~checked_int16 checked_int16 proc~new->proc~checked_int16 proc~checked_int32 checked_int32 proc~new->proc~checked_int32 proc~checked_int8 checked_int8 proc~new->proc~checked_int8 proc~copyright_notice MIDI_file%copyright_notice proc~new->proc~copyright_notice proc~end_of_track MIDI_file%end_of_track proc~new->proc~end_of_track proc~init_formidi MIDI_file%init_formidi proc~new->proc~init_formidi proc~set_tempo MIDI_file%set_tempo proc~new->proc~set_tempo proc~set_time_signature MIDI_file%set_time_signature proc~new->proc~set_time_signature proc~text_event MIDI_file%text_event proc~new->proc~text_event proc~track_header MIDI_file%track_header proc~new->proc~track_header proc~write_string MIDI_file%write_string proc~copyright_notice->proc~write_string proc~delta_time MIDI_file%delta_time proc~end_of_track->proc~delta_time proc~write_track_size MIDI_file%write_track_size proc~end_of_track->proc~write_track_size proc~set_tempo->proc~checked_int32 proc~set_tempo->proc~delta_time proc~set_time_signature->proc~checked_int8 proc~set_time_signature->proc~delta_time proc~text_event->proc~write_string proc~track_header->proc~text_event proc~sequence_track_name MIDI_file%sequence_track_name proc~track_header->proc~sequence_track_name 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~sequence_track_name->proc~write_string proc~write_string->proc~checked_int8 proc~write_string->proc~delta_time proc~write_string->proc~write_variable_length_quantity proc~variable_length_quantity variable_length_quantity proc~write_variable_length_quantity->proc~variable_length_quantity

Called by

proc~~new~~CalledByGraph proc~new MIDI_file%new 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