musif.extract.features.prefix module¶
- musif.extract.features.prefix.get_family_feature(family: str, feature: str) str [source]¶
It builds the name of a feature with family scope.
For instance, if the feature is “NumberOfIntervals” and the family is “Str”, this class would return: “FamilyStr_NumberOfIntervals”.
- Parameters
family (str) – The family name.
feature (str) – Name of the feature to be prefixed.
- Returns
The feature properly prefixed for the family passed as argument.
- Return type
str
- musif.extract.features.prefix.get_family_prefix(family_abbreviation: str) str [source]¶
Returns prefix name for a specific part given sound’s abbreviation
Example ‘vnI’ -> ‘SoundVn_’
- Parameters
part_abbreviation (str) – String that represents the abbreviated name of a sound
- musif.extract.features.prefix.get_part_feature(part: str, feature: str) str [source]¶
It builds the name of a feature with part scope. For instance, if the feature is “NumberOfIntervals” and the part is “VnI”, this class would return: “PartVnI_NumberOfIntervals”. :param part: The part name. :type part: str :param feature: Name of the feature to be prefixed. :type feature: str
- Returns
The feature properly prefixed for the part passed as argument.
- Return type
str
- musif.extract.features.prefix.get_part_prefix(part_abbreviation: str) str [source]¶
Returns prefix name for a specific part given instrument’s abbreviation
Example ‘vnI’ -> ‘PartVnI_’
- Parameters
part_abbreviation (str) – String that represents the abbreviated name of an instrument
- musif.extract.features.prefix.get_score_feature(feature: str) str [source]¶
It builds the name of a feature with Score scope.
For instance, if the feature is “NumberOfIntervals”, this class would return: “Score_NumberOfIntervals”.
- Parameters
feature (str) – Name of the feature to be prefixed.
- Returns
The feature properly prefixed for score scope.
- Return type
str
- musif.extract.features.prefix.get_sound_feature(sound: str, feature: str) str [source]¶
It builds the name of a feature with sound scope.
For instance, if the feature is “NumberOfIntervals” and the sound is “Ob”, this class would return: “SoundOb_NumberOfIntervals”.
- Parameters
sound (str) – The sound name.
feature (str) – Name of the feature to be prefixed.
- Returns
The feature properly prefixed for the sound passed as argument.
- Return type
str