Convert midi to R object using pyramidi

Convert midi to R object using pyramidi#

Heading links to the script

The pyramidi package provides a framework for translating midi files to R objects.

After some experimentation, I used the code in the translate midi time information section as I wanted access to pyramidi::tab_measures. From there I could extract a dataframe of the notes of the melody.

readRDS(url('https://github.com/softloud/digmus/raw/main/outputs/step-output/pyramidi_notes.rds')) |>
    head()
A data.frame: 6 × 14
i_trackmetatypetimeprogramchannelnotevelocitytickstmbi_notenote_name
<dbl><lgl><chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><fct>
11FALSEnote_on 0NaN06290 00.00 01D4
21FALSEnote_on768NaN062 0 7681.22 82D4
31FALSEnote_on 0NaN06990 7681.22 81A4
41FALSEnote_on768NaN069 015362.44162A4
51FALSEnote_on 0NaN0659015362.44161F4
61FALSEnote_on768NaN065 023043.66242F4