mutwo.music_converters¶
Object |
Documentation |
---|---|
Apply grace notes and after grace notes on |
|
Builds metrical indispensability for a rhythmical strata. |
|
|
|
|
|
|
|
|
|
Convert a dict of mutwo parameters to a |
|
Abstract base class to apply |
|
Apply arpeggio on |
|
Apply staccato on |
|
Apply articulation on |
|
Apply trill on |
|
Apply optional on |
|
Apply |
|
Find the common harmonics between two pitches. |
- class GraceNotesConverter(minima_grace_notes_duration_factor=0.12, maxima_grace_notes_duration_factor=0.25, minima_number_of_grace_notes=1, maxima_number_of_grace_notes=4, chronon_to_grace_note_consecution=ChrononToGraceNoteConsecution(), chronon_to_after_grace_note_consecution=ChrononToAfterGraceNoteConsecution())[source]¶
Bases:
EventConverter
Apply grace notes and after grace notes on
core_events.abc.Event
.- Parameters:
minima_grace_notes_duration_factor (float) – Minimal percentage how much of the initial duration of the
Chronon
shall be moved to the grace notes / after grace notes. This value has to be smaller than 0.5 (so that theChronon
have a duration > 0 if it has both: grace notes and after grace notes) and bigger than 0 (so that the grace notes or after grace notes have a duration > 0). Default to 0.12.maxima_grace_notes_duration_factor (float) – Maxima percentage how much of the initial duration of the
Chronon
shall be moved to the grace notes / after grace notes. This value has to be smaller than 0.5 (so that theChronon
have a duration > 0 if it has both: grace notes and after grace notes) and bigger than 0 (so that the grace notes or after grace notes have a duration > 0). Default to 0.25.minima_number_of_grace_notes (int) – For how many events in the grace note or after grace note container shall the minima_grace_notes_duration_factor be applied. Default to 1.
maxima_number_of_grace_notes (int) – For how many events in the grace note or after grace note container shall the maxima_number_of_grace_notes be applied. Default to 4.
chronon_to_grace_note_consecution (Callable[[core_events.Chronon], core_events.Consecution[core_events.Chronon]]) – Function which receives as an input a
Chronon
and returns aConsecution
. By default the function will ask the event for agrace_note_consecution
attribute, because by default ~mutwo.music_events.NoteLike objects are expected.chronon_to_after_grace_note_consecution (Callable[[core_events.Chronon], core_events.Consecution[core_events.Chronon]]) – Function which receives as an input a
Chronon
and returns aConsecution
. By default the function will ask the event for agrace_note_consecution
attribute, because by default ~mutwo.music_events.NoteLike objects are expected.
Public Methods:
convert
(event_to_convert)Apply grace notes and after grace notes of all
Chronon
.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- convert(event_to_convert)[source]¶
Apply grace notes and after grace notes of all
Chronon
.- Parameters:
event_to_convert (core_events.abc.Event) – The event which grace notes and after grace notes shall be converted to normal events in the upper
Consecution
.- Return type:
- class RhythmicalStrataToIndispensability[source]¶
Bases:
Converter
Builds metrical indispensability for a rhythmical strata.
This technique has been described by Clarence Barlow in On the Quantification of Harmony and Metre (1992). The technique aims to model the weight of single beats in a particular metre. It allocates each beat of a metre to a specific value that describes the indispensability of a beat: the higher the assigned value, the more accented the beat.
Public Methods:
convert
(rhythmical_strata_to_convert)Convert indispensability for each beat of a particular metre.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- convert(rhythmical_strata_to_convert)[source]¶
Convert indispensability for each beat of a particular metre.
- Parameters:
rhythmical_strata_to_convert (Sequence[int]) – The rhythmical strata defines the metre for which the indispensability shall be calculated. The rhythmical strata is a list of prime numbers which product is the amount of available beats within the particular metre. Earlier prime numbers in the rhythmical strata are considered to be more important than later prime numbers.
- Returns:
A tuple of a integer for each beat of the respective metre where each integer describes how accented the particular beat is (the higher the number, the more important the beat).
- Return type:
tuple[int, …]
Example:
>>> from mutwo import music_converters >>> metricity_converter = music_converters.RhythmicalStrataToIndispensability() >>> metricity_converter.convert((2, 3)) # time signature 3/4 (5, 0, 3, 1, 4, 2) >>> metricity_converter.convert((3, 2)) # time signature 6/8 (5, 0, 2, 4, 1, 3)
- class ChrononToPitchList(attribute_name=None, exception_value=[])[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (list[mutwo.music_parameters.abc.Pitch]) –
- class ChrononToVolume(attribute_name=None, exception_value=AmplitudeVolume(0))[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Volume) –
- class ChrononToLyric(attribute_name=None, exception_value=DirectLyric())[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Volume) –
- class ChrononToInstrumentList(attribute_name=None, exception_value=[])[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Optional[Instrument]) –
- class ChrononToPlayingIndicatorCollection(attribute_name=None, exception_value=None)[source]¶
Bases:
ChrononToAttributeWithDefaultValue
Public Methods:
Inherited from
ChrononToAttributeWithDefaultValue
convert
(*args, **kwargs)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Optional[NotationIndicatorCollection]) –
- class ChrononToNotationIndicatorCollection(attribute_name=None, exception_value=None)[source]¶
Bases:
ChrononToAttributeWithDefaultValue
Public Methods:
Inherited from
ChrononToAttributeWithDefaultValue
convert
(*args, **kwargs)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Optional[NotationIndicatorCollection]) –
- class ChrononToGraceNoteConsecution(attribute_name=None, exception_value=Consecution([]))[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Consecution) –
- class ChrononToAfterGraceNoteConsecution(attribute_name=None, exception_value=Consecution([]))[source]¶
Bases:
ChrononToAttribute
Public Methods:
Inherited from
ChrononToAttribute
convert
(chronon_to_convert)Extract from a
mutwo.core_events.Chronon
an attribute.Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
attribute_name (Optional[str]) –
exception_value (Consecution) –
- class MutwoParameterDictToPitchList(pitch_list_to_search_name=None, pitch_list_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
pitch_list_to_search_name (Optional[str]) –
pitch_list_keyword_name (Optional[str]) –
- class MutwoParameterDictToVolume(volume_to_search_name=None, volume_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
volume_to_search_name (Optional[str]) –
volume_keyword_name (Optional[str]) –
- class MutwoParameterDictToInstrumentList(instrument_list_to_search_name=None, instrument_list_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
instrument_list_to_search_name (Optional[str]) –
instrument_list_keyword_name (Optional[str]) –
- class MutwoParameterDictToPlayingIndicatorCollection(playing_indicator_collection_to_search_name=None, playing_indicator_collection_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
playing_indicator_collection_to_search_name (Optional[str]) –
playing_indicator_collection_keyword_name (Optional[str]) –
- class MutwoParameterDictToNotationIndicatorCollection(notation_indicator_collection_to_search_name=None, notation_indicator_collection_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
notation_indicator_collection_to_search_name (Optional[str]) –
notation_indicator_collection_keyword_name (Optional[str]) –
- class MutwoParameterDictToGraceNoteConsecution(grace_note_consecution_to_search_name=None, grace_note_consecution_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
grace_note_consecution_to_search_name (Optional[str]) –
grace_note_consecution_keyword_name (Optional[str]) –
- class MutwoParameterDictToAfterGraceNoteConsecution(after_grace_note_consecution_to_search_name=None, after_grace_note_consecution_keyword_name=None)[source]¶
Bases:
MutwoParameterDictToKeywordArgument
Public Methods:
Inherited from
MutwoParameterDictToKeywordArgument
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- Parameters:
after_grace_note_consecution_to_search_name (Optional[str]) –
after_grace_note_consecution_keyword_name (Optional[str]) –
- class MutwoParameterDictToNoteLike(mutwo_parameter_dict_to_keyword_argument_sequence=None, chronon_class=<class 'mutwo.music_events.music.NoteLike'>)[source]¶
Bases:
MutwoParameterDictToChronon
Convert a dict of mutwo parameters to a
mutwo.music_events.NoteLike
- Parameters:
mutwo_parameter_dict_to_keyword_argument_sequence (Optional[Sequence[MutwoParameterDictToKeywordArgument]]) – A sequence of
MutwoParameterDictToKeywordArgument
. Default to None.chronon_class (Type[core_events.Chronon]) – Default to
mutwo.music_events.NoteLike
.
Public Methods:
Inherited from
MutwoParameterDictToChronon
convert
(mutwo_parameter_dict_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- class PlayingIndicatorConverter(chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection())[source]¶
Bases:
Converter
Abstract base class to apply
PlayingIndicator
on aChronon
.- Parameters:
chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.
To write a new PlayingIndicatorConverter the abstract method
_apply_playing_indicator()
and the abstract properties playing_indicator_name and default_playing_indicator have to be overridden.Public Data Attributes:
playing_indicator_name
default_playing_indicator
Public Methods:
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- convert(chronon_to_convert)[source]¶
Apply PlayingIndicator on chronon.
- Parameters:
chronon_to_convert (core_events.Chronon) – The event which shall be converted.
- Return type:
- abstract property default_playing_indicator: PlayingIndicator¶
- abstract property playing_indicator_name: str¶
- class ArpeggioConverter(duration_for_each_attack=0.1, chronon_to_pitch_list=ChrononToPitchList(), chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection(), set_pitch_list_for_chronon=<function ArpeggioConverter.<lambda>>)[source]¶
Bases:
PlayingIndicatorConverter
Apply arpeggio on
Chronon
.- Parameters:
duration_for_each_attack (core_parameters.abc.Duration.Type) – Set how long each attack of the Arpeggio lasts. Default to 0.1.
chronon_to_pitch_list (Callable[[core_events.Chronon], music_parameters.abc.Pitch], optional) – Function to extract from a
mutwo.core_events.Chronon
a tuple that contains pitch objects (objects that inherit frommutwo.music_parameters.abc.Pitch
). By default it asks the Event for itspitch_list
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their pitch property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no pitch can be extracted), mutwo will assume an event without any pitches.chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection,], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.set_pitch_list_for_chronon (Callable[[core_events.Chronon, list[music_parameters.abc.Pitch]], None]) – Function which assigns a list of
Pitch
objects to aChronon
. By default the function assigns the passed pitches to thepitch_list
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected).
Public Data Attributes:
playing_indicator_name
default_playing_indicator
Inherited from
PlayingIndicatorConverter
playing_indicator_name
default_playing_indicator
Public Methods:
Inherited from
PlayingIndicatorConverter
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- property default_playing_indicator: PlayingIndicator¶
- property playing_indicator_name: str¶
- class StacattoConverter(factor=0.5, allowed_articulation_name_sequence=('staccato', '.'), chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection())[source]¶
Bases:
PlayingIndicatorConverter
Apply staccato on
Chronon
.- Parameters:
factor (float) –
allowed_articulation_name_sequence (Sequence[str]) –
chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection,], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.
Public Data Attributes:
playing_indicator_name
default_playing_indicator
Inherited from
PlayingIndicatorConverter
playing_indicator_name
default_playing_indicator
Public Methods:
Inherited from
PlayingIndicatorConverter
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- property default_playing_indicator: PlayingIndicator¶
- property playing_indicator_name: str¶
- class ArticulationConverter(articulation_name_tuple_to_playing_indicator_converter={('staccato', '.'): StacattoConverter()}, chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection())[source]¶
Bases:
PlayingIndicatorConverter
Apply articulation on
Chronon
.- Parameters:
articulation_name_tuple_to_playing_indicator_converter (dict[tuple[str, ...], PlayingIndicatorConverter]) –
chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection,], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.
Public Data Attributes:
playing_indicator_name
default_playing_indicator
Inherited from
PlayingIndicatorConverter
playing_indicator_name
default_playing_indicator
Public Methods:
Inherited from
PlayingIndicatorConverter
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- property default_playing_indicator: PlayingIndicator¶
- property playing_indicator_name: str¶
- class TrillConverter(trill_size=Fraction(1, 16), chronon_to_pitch_list=ChrononToPitchList(), chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection())[source]¶
Bases:
PlayingIndicatorConverter
Apply trill on
Chronon
.- Parameters:
trill_size (core_parameters.abc.Duration.Type) –
chronon_to_pitch_list (Callable[[core_events.Chronon], music_parameters.abc.Pitch], optional) – Function to extract from a
mutwo.core_events.Chronon
a tuple that contains pitch objects (objects that inherit frommutwo.music_parameters.abc.Pitch
). By default it asks the Event for itspitch_list
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their pitch property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no pitch can be extracted), mutwo will assume an event without any pitches.chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection,], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.
Public Data Attributes:
playing_indicator_name
default_playing_indicator
Inherited from
PlayingIndicatorConverter
playing_indicator_name
default_playing_indicator
Public Methods:
Inherited from
PlayingIndicatorConverter
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- property default_playing_indicator: PlayingIndicator¶
- property playing_indicator_name: str¶
- class OptionalConverter(likelihood=0.5, random_seed=100, make_rest=<function OptionalConverter.<lambda>>, chronon_to_playing_indicator_collection=ChrononToPlayingIndicatorCollection())[source]¶
Bases:
PlayingIndicatorConverter
Apply optional on
Chronon
.- Parameters:
likelihood (float) – A number between 0 - 1. 1 means that each optional note is played, 0 means no optional note is played. Default to 0.5.
random_seed (int) – Set inner random process. Default to 100.
make_rest (Callable[[core_events.Chronon], core_events.Chronon]) – A function which takes the original
Chronon
and returns a new Chronon with the same duration which represents a rest. By default, mutwo simply creates a Chronon with the same duration.chronon_to_playing_indicator_collection (Callable[[core_events.Chronon], music_parameters.PlayingIndicatorCollection,], optional) – Function to extract from a
mutwo.core_events.Chronon
amutwo.music_parameters.PlayingIndicatorCollection
object. By default it asks the Event for itsplaying_indicator_collection
attribute (because by defaultmutwo.music_events.NoteLike
objects are expected). When using different Event classes thanNoteLike
with a different name for their playing_indicator_collection property, this argument should be overridden. If the function call raises anAttributeError
(e.g. if no playing indicator collection can be extracted), mutwo will build a playing indicator collection fromDEFAULT_PLAYING_INDICATORS_COLLECTION_CLASS
.
Public Data Attributes:
playing_indicator_name
default_playing_indicator
Inherited from
PlayingIndicatorConverter
playing_indicator_name
default_playing_indicator
Public Methods:
Inherited from
PlayingIndicatorConverter
convert
(chronon_to_convert)Apply PlayingIndicator on chronon.
Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- property default_playing_indicator: PlayingIndicator¶
- property playing_indicator_name: str¶
- class PlayingIndicatorsConverter(playing_indicator_converter_sequence)[source]¶
Bases:
SymmetricalEventConverter
Apply
mutwo.music_parameters.abc.PlayingIndicator
on anyEvent
.- Parameters:
playing_indicator_converter_sequence (Sequence[PlayingIndicatorConverter]) – A sequence of
PlayingIndicatorConverter
which shall be applied on eachChronon
.
Public Methods:
convert
(event_to_convert)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- class TwoPitchesToCommonHarmonicTuple(tonality, lowest_partial, highest_partial)[source]¶
Bases:
Converter
Find the common harmonics between two pitches.
- Parameters:
tonality (Optional[bool]) –
True
for finding common harmonics,False
for finding common subharmonics andNone
for finding common pitches between the harmonics of the first pitch and the subharmonics of the second pitch.lowest_partial (int) – The lowest partial to get investigated. Shouldn’t be smaller than 1.
highest_partial (int) – The highest partial to get investigated. Shouldn’t be bigger than 1.
Public Methods:
convert
(pitch_pair_to_examine)Inherited from
MutwoObject
copy
()Return a deep copy of mutwo object.
- convert(pitch_pair_to_examine)[source]¶
- Parameters:
pitch_pair_to_examine (tuple[mutwo.music_parameters.pitches.JustIntonationPitch.JustIntonationPitch, mutwo.music_parameters.pitches.JustIntonationPitch.JustIntonationPitch]) –
- Return type:
tuple[mutwo.music_parameters.pitches.CommonHarmonic.CommonHarmonic, …]
mutwo.music_converters.configurations¶
Configure the default behaviour of mutwo.music_converters
- DEFAULT_AFTER_GRACE_NOTE_SEQUENTIAL_EVENT_KEYWORD_NAME = 'after_grace_note_consecution'¶
Default value for :param:`after_grace_note_consecution_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToAfterGraceNoteConsecution
- DEFAULT_AFTER_GRACE_NOTE_SEQUENTIAL_EVENT_TO_SEARCH_NAME = 'after_grace_note_consecution'¶
Default value for :param:`after_grace_note_consecution_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToAfterGraceNoteConsecution
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToAfterGraceNoteConsecution
.
- DEFAULT_GRACE_NOTE_SEQUENTIAL_EVENT_KEYWORD_NAME = 'grace_note_consecution'¶
Default value for :param:`grace_note_consecution_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToGraceNoteConsecution
- DEFAULT_GRACE_NOTE_SEQUENTIAL_EVENT_TO_SEARCH_NAME = 'grace_note_consecution'¶
Default value for :param:`grace_note_consecution_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToGraceNoteConsecution
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToGraceNoteConsecution
.
- DEFAULT_INSTRUMENT_LIST_KEYWORD_NAME = 'instrument_list'¶
Default value for :param:`instrument_list_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToInstrumentList
- DEFAULT_INSTRUMENT_LIST_TO_SEARCH_NAME = 'instrument_list'¶
Default value for :param:`instrument_list_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToInstrumentList
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToInstrumentList
.
- DEFAULT_LYRIC_TO_SEARCH_NAME = 'lyric'¶
Default value for :param:`lyric_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToLyric
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToLyric
.
- DEFAULT_NOTATION_INDICATOR_COLLECTION_KEYWORD_NAME = 'notation_indicator_collection'¶
Default value for :param:`notation_indicator_collection_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToNotationIndicatorCollection
- DEFAULT_NOTATION_INDICATOR_COLLECTION_TO_SEARCH_NAME = 'notation_indicator_collection'¶
Default value for :param:`notation_indicator_collection_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToNotationIndicatorCollection
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToNotationIndicatorCollection
.
- DEFAULT_PITCH_LIST_KEYWORD_NAME = 'pitch_list'¶
Default value for :param:`pitch_list_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToPitchList
- DEFAULT_PITCH_LIST_TO_SEARCH_NAME = 'pitch_list'¶
Default value for :param:`pitch_list_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToPitchList
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToPitchList
.
- DEFAULT_PLAYING_INDICATOR_COLLECTION_KEYWORD_NAME = 'playing_indicator_collection'¶
Default value for :param:`playing_indicator_collection_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToPlayingIndicatorCollection
- DEFAULT_PLAYING_INDICATOR_COLLECTION_TO_SEARCH_NAME = 'playing_indicator_collection'¶
Default value for :param:`playing_indicator_collection_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToPlayingIndicatorCollection
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToPlayingIndicatorCollection
.
- DEFAULT_VOLUME_KEYWORD_NAME = 'volume'¶
Default value for :param:`volume_keyword_name` parameter in
mutwo.core_converters.MutwoParameterDictToVolume
- DEFAULT_VOLUME_TO_SEARCH_NAME = 'volume'¶
Default value for :param:`volume_to_search_name` parameter in
mutwo.music_converters.MutwoParameterDictToVolume
and default value for :param:`attribute_name` inmutwo.music_converters.ChrononToVolume
.