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 notnote_on
ornote_off
.df_notes_wide: All
note_on
ornote_off
events and furthermore transformed to wide format bypivot_note_wide
.
Arguments
- dfm
result of
tab_measures()
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)
}