View source: R/pivot_note_on_off.R
merge_midi_frames | R Documentation |
Merge dataframes transformed back to long format, remove added columns and transform to the right chronological order in order to replace the original midi_frame_unnested object.
merge_midi_frames(df_meta, df_notes_long, df_not_notes)
df_meta, df_notes_long, df_not_notes |
Dataframes in the format of |
Merges the input dataframes, arranges by i_track
& (absolute) ticks
, and
calculates time
(in relative ticks since the last event).
Other Split/merge meta/notes/non-note events:
split_midi_frame()
## Not run:
midi_file_string <- system.file("extdata", "test_midi_file.mid", package = "pyramidi")
mf <- miditapyr$MidiFrames(midi_file_string)
dfm <- tab_measures(mf$midi_frame_unnested$df, ticks_per_beat = mf$midi_file$ticks_per_beat)
l <- split_midi_frame(dfm)
df_notes_long <- pivot_long_notes(l$df_notes_wide)
merge_midi_frames(l$df_meta, df_notes_long, l$df_not_notes)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.