src.clean.gen_pretty_midi
Generates MIDI data in Python-compatible form and cleans
Functions
|
Clean raw prettymidi output: truncate start and stop times, map midi notes onto musical notes... |
|
Iterates through MIDI BPM files in input directory and extracts data (onset, pitch, velocity) using PrettyMIDI |
|
Iterates through raw MIDI files in input directory and extracts data (onset, pitch, velocity) using PrettyMIDI |
|
Returns a flat list of onset start positions, midi pitch numbers, and velocity from a PrettyMIDI object |
|
Returns a dictionary containing file metadata, e.g. |
|
Iterate through all folders in input directory and append MIDI files to list |
|
Iterate through input directory, return formatted dictionary for every raw midi file |
|
Returns list of lists corresponding to each trial |
|
Loads a file into PrettyMIDI, then returns a dataframe ready for cleaning |
- src.clean.gen_pretty_midi.gen_pm_output(input_dir, **kwargs) list
Iterates through MIDI BPM files in input directory and extracts data (onset, pitch, velocity) using PrettyMIDI
- src.clean.gen_pretty_midi.gen_raw_midi_output(input_dir, **kwargs) list
Iterates through raw MIDI files in input directory and extracts data (onset, pitch, velocity) using PrettyMIDI