Skip to contents

This function takes a data frame obtained from a MIDI file and converts it to a binary matrix representation, with time frames as columns and MIDI note numbers (0-127) as rows.

Usage

midi_df_to_matrix(midi_df, track = 0)

Arguments

midi_df

A data frame of MIDI events, from midi_to_object()

track

The track number to be converted to a matrix. Default is 0.

Value

A binary matrix where column indices represent time frames and row indices represent MIDI note numbers. Each entry in the matrix is 1 if the corresponding note is on at the corresponding time, and 0 otherwise.

Examples

if (FALSE) {
}