musif.extract.utils module

musif.extract.utils.expand_score_repetitions(score, repeat_elements: list)[source]

Given a music21 Score object and a list containing repetition elements, expands the score object and places all measures in their correspondent cronological order :param score: Score object parsed by music21 :type score: music21 Score :param expand_repeats: List containing all repetition elements :type expand_repeats: list

Returns

final_score – Score object with expanded repetitions

Return type

music21 Score

musif.extract.utils.get_repetition_elements(score, v=True)[source]
musif.extract.utils.process_musescore_file(file_path: str, expand_repeats: bool = False) pandas.DataFrame[source]

Given a mscx file name, parses the file using ms3 library and returns a dataframe containing all harmonic information. Adds Playthrough column that contains number of every measure in the cronological order :param file_path: Path to mscx file :type file_path: str :param expand_repeats: Directory path to musescore file :type expand_repeats: bool

Returns

harmonic_analysis – Dataframe containing harmonic information

Return type

str