musif.musicxml.tempo module¶
- class musif.musicxml.tempo.TempoGroup2(value)[source]¶
Bases:
Enum
Contains constants refering to grouped tempo on the second level that will be used by the tempo module.
- FAST = 'Fast'¶
- MODERATE = 'Moderate'¶
- NA = 'NA'¶
- SLOW = 'Slow'¶
- musif.musicxml.tempo.extract_numeric_tempo(file_path: str) Optional[int] [source]¶
Finds the numeric tempo in a musixml file by looking at the tempo marking in the xml code.
- Parameters
file_path (str) –
from. (Path to xml file to get the tempo) –
- musif.musicxml.tempo.get_number_of_beats(time_signature: str) int [source]¶
Returns the number of beats corresponding to a time signature. :param time_signature: :type time_signature: str :param Time signature in the form of string separated by ‘/’ to obtain the time signature type.:
- musif.musicxml.tempo.get_tempo_grouped_1(tempo: str) str [source]¶
Returns a 1st level of grouping for the tempo markings, removing secondary labels and diminutive endings.
- Parameters
tempo (str) –
from. (Tempo string in italian to be extract the group) –