Skip to contents

Unnested midi frame with time data from tab_measures() is split into 3 parts:

  • df_meta: Consisting of all the meta events in the midi data.

  • df_not_notes: Containing all midi events that are not meta and not note_on or note_off.

  • df_notes_wide: All note_on or note_off events and furthermore transformed to wide format by pivot_note_wide.

Usage

split_midi_frame(dfm)

Arguments

dfm

result of tab_measures()

Value

df_meta, df_not_notes & df_notes_wide

See also

Other Split/merge meta/notes/non-note events: merge_midi_frames()

Examples

if (FALSE) {
mid_file_str <- system.file("extdata", "test_midi_file.mid", package = "pyramidi")
mido_mid_file <- mido$MidiFile(mid_file_str)
dfc <- miditapyr$frame_midi(mido_mid_file)
ticks_per_beat = mido_mid_file$ticks_per_beat
df <- dfc %>%
  miditapyr$unnest_midi()
}
if (FALSE) {
dfm <- tab_measures(df, ticks_per_beat)
split_midi_frame(dfm)
}