musif.musicxml.common module¶
- musif.musicxml.common.get_notes_and_measures(part: music21.stream.base.Part) Tuple[List[music21.note.Note], List[music21.note.Note], List[music21.stream.base.Measure], List[music21.stream.base.Measure]] [source]¶
Obtains lists of notes, tied notes, measures, measures that containg notes, and notes and rests. Information that is useful in the subsequent process of extraction.
- Parameters
part (Part) – Music21 part to extract the info from.
- musif.musicxml.common.is_voice(part: music21.stream.base.Part) bool [source]¶
Returns True if the part is a singer part, otherwise returns False
- Parameters
part (Part) – Music21 part to check if it’s a singer part
- musif.musicxml.common.split_layers(score: music21.stream.base.Score, split_keywords: List[str])[source]¶
Function used to split possible layers. Those instruments that include to parts in the same staff will be separated in two diferent parts so they can be treated separately.
- Parameters
score (Score) – Music21 score to scan and separate parts in it according to split_keywords list
split_keywords (List[str]) – List containing key words of instruments susceptible to be splitted. i.e. [oboe, viola]