Procedure | Location | Procedure Type | Description |
---|---|---|---|
analyze | la_folia | Subroutine | Receives a string with an encoded chord, and returns its fundamental, the type of chord and its encoded value |
checked_int16 | utilities | Function | Receives a default kind integer, checks its bounds (Fortran signed int), fixes it if needed, and returns an int16: |
checked_int32 | utilities | Function | Receives a default kind integer, checks its bounds (Fortran signed int), fixes it if needed, and returns an int32. |
checked_int8 | utilities | Function | Receives a default kind integer, checks its MIDI bounds (15 or 127), fixes it if needed, and returns an int8: |
close | MIDI_file_class | Subroutine | Closes the MIDI file. |
Control_Change | MIDI_file_class | Subroutine | Many MIDI parameters can be set by Control Change. See the list. |
copyright_notice | MIDI_file_class | Subroutine | Copyright Notice event: FF 02 len text |
cue_point | MIDI_file_class | Subroutine | Cue Point event: FF 07 len text |
delta_time | MIDI_file_class | Subroutine | Each MIDI event must be preceded by a delay called "delta time", expressed in MIDI ticks. |
dotted | music | Function | Returns the value of a dotted note. |
end_of_track | MIDI_file_class | Subroutine | A track must end with 0xFF2F00. |
get_name | MIDI_file_class | Function | Returns the name of the MIDI file: |
init_formidi | MIDI_file_class | Subroutine | Verifies the needed data types. |
instrument_name | MIDI_file_class | Subroutine | Instrument Name event: FF 04 len text |
lyric | MIDI_file_class | Subroutine | Lyric event: FF 05 len text |
marker | MIDI_file_class | Subroutine | Marker event: FF 06 len text |
MIDI_Note | music | Function | Returns the MIDI note number, from 12 (C0) to 127 (G9). The note name is composed of two or three characters, for example "A4", "A#4", "Ab4", where the final character is the octave. |
new | MIDI_file_class | Subroutine | 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 |
note_name | music | Function | Receives a MIDI note (for example 69), and returns the name of the note (for example A4). It works also with the octave -1, although most of its notes are too low for hearing. |
Note_OFF | MIDI_file_class | Subroutine | Writes a Note OFF event. MIDI notes are in the range 0..127 The release velocity is in the range 0..127. |
Note_ON | MIDI_file_class | Subroutine | Writes a Note ON event. MIDI notes are in the range 0..127 The attack velocity is in the range 1..127 and will set the volume. A Note ON event with a zero velocity is equivalent to a Note OFF. |
Pitch_Bend | MIDI_file_class | Subroutine | Apply a pitch bend to all notes currently sounding on the channel. No bend is 00 40 (64 in decimal), maximum downward bend is 00 00, maximum upward bend is 7F 7F. The Least Significant Byte (lsb) is optional (default value is 0), as it is useful only for fine adjustment. You can not use it with play_note, play_chord or play_broken_chord: you must manage yourself the Note ON and Note OFF events, and put the bend between. |
play_broken_chord | MIDI_file_class | Subroutine | Writes a broken chord using an array containing the intervals (see the music_common module). https://en.wikipedia.org/wiki/Arpeggio You must pass either a scalar value (whole duration) or a values array (containing the values for each note). |
play_chord | MIDI_file_class | Subroutine | Writes a chord, waits for its duration, and writes the OFF events |
play_note | MIDI_file_class | Subroutine | Write a Note ON event, waits for its duration, and writes a Note OFF. |
Program_Change | MIDI_file_class | Subroutine | Each channel (0..15) can use one General MIDI instrument (0..127) at a time. |
sequence_track_name | MIDI_file_class | Subroutine | Sequence or Track Name event: FF 03 len text |
set_tempo | MIDI_file_class | Subroutine | 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: |
set_time_signature | MIDI_file_class | Subroutine | The time signature includes the numerator, the denominator, the number of MIDI clocks between metronome ticks, (there are 24 MIDI clocks per quarter note) and the number of 32nd notes in a quarter note. The number of "MIDI clocks" between metronome clicks. |
text_event | MIDI_file_class | Subroutine | Text event: FF 01 len text |
track_header | MIDI_file_class | Subroutine | Writes a track header and stores the position where the size of the track will be written when the track will be closed. |
variable_length_quantity | MIDI_file_class | Function | MIDI delta times are composed of one to four bytes, depending on their values. If there is still bytes to write, the MSB (most significant bit) of the current byte is 1, else 0. This functions is automatically tested. https://en.wikipedia.org/wiki/Variable-length_quantity |
write_string | MIDI_file_class | Subroutine | This subroutine is used my many events. The text must be coded in ASCII (7 bits). |
write_track_size | MIDI_file_class | Subroutine | Must be called when the track is finished. It writes its size at the memorized position in the track header. |
write_variable_length_quantity | MIDI_file_class | Subroutine | Writes the integer i in the MIDI file using the variable length quantity representation: |