Convert a matrix representation of a MIDI sequence back to MIDI timings
Source:R/transform.R
matrix_to_midi_time.Rd
The function reads a binary matrix where pitch classes are on the rows and temporal locations on columns (1s represent note onsets, 0s represent absences of notes). It then converts this binary representation into MIDI timings, i.e. the time (in ticks) of note onsets and note offsets.
Arguments
- midi_matrix
A binary matrix, where pitch classes are on rows and temporal location are on columns. Each cell value should either be 1 (note onset) or 0 (notes absence).
- smallest_time_unit
Integer, specifying the smallest time unit (in MIDI ticks) that is used in the binary matrix representation. Default is 8 ticks.
- note_off_length
Numeric, specifying a fixed note duration in MIDI ticks that will be used for all the notes in the sequence. Default is 32 ticks.