mutwo.music_generators§
Object |
Documentation |
---|---|
Make |
|
Make common product set scale as described in Wilsons letter to Fokker. |
|
|
Make constant structure scale with Wilsons adaption of Bruns euclidean algorithm. |
- make_product_pitch(number_sequence, tonality, normalize=False)[source]§
Make
JustIntonationPitch
from the product of one, two or more number_sequence.- Parameters:
number_sequence (Sequence[int]) – The number which shall be multiplied to make a new pitch.
tonality (bool) –
True
for putting the resulting product to the numerator of the frequency ratio andFalse
for putting the resulting product to the denominator.normalize (bool, optional) –
True
to normalize the new pitch to the middle octave. Default toFalse
.
- Return type:
- make_common_product_set_scale(number_sequence, n_combinations, tonality, normalize=False)[source]§
Make common product set scale as described in Wilsons letter to Fokker.
- Parameters:
number_sequence (Sequence[int]) – The number_sequence which will be combined to single music_parameters.
n_combinations (int) – How many number_sequence will be combined for each pitch.
tonality (bool) –
True
for otonality andFalse
for utonality.normalize (bool) –
True
if music_parameters.shall become normalized to the same octave.
- Return type:
tuple[mutwo.music_parameters.pitches.JustIntonationPitch.JustIntonationPitch, …]
Example:
>>> from mutwo.generators import wilson >>> wilson.make_common_product_set_scale((3, 5, 7, 9), 2, True) (JustIntonationPitch(15), JustIntonationPitch(21), JustIntonationPitch(27), JustIntonationPitch(35), JustIntonationPitch(45), JustIntonationPitch(63)) >>> wilson.make_common_product_set_scale((3, 5, 7, 9), 2, False) (JustIntonationPitch(1/15), JustIntonationPitch(1/21), JustIntonationPitch(1/27), JustIntonationPitch(1/35), JustIntonationPitch(1/45), JustIntonationPitch(1/63))
- make_wilsons_brun_euclidean_algorithm_generator(pitch_tuple, subtraction_index=1, direction_forward=True, direction_reverse=False)[source]§
Make constant structure scale with Wilsons adaption of Bruns euclidean algorithm.
- Parameters:
pitch_tuple (tuple[music_parameters.JustIntonationPitch, music_parameters.JustIntonationPitch, music_parameters.JustIntonationPitch],) – The initial seed composed of three individual music_parameters. The biggest pitch will be the period of the repeating scale, therefore it is recommended to use
music_parameters.JustIntonationPitch("2/1")
here (if one desires an octave repeating scale).subtraction_index (int) – Set to 1 if the largest interval should be subtracted by the second interval. Set to 2 if the largest interval should be subtracted by the smallest interval.
direction_forward (bool) – Set to
True
if the algorithm should include the normal sorted replacement of an interval. Default toTrue
.direction_reverse (bool) – Set to
True
if the algorithm should include the reversed replacement of an interval. Default toFalse
.
- Returns:
Generator which returns a list of intervals. Accumulate the intervals from
music_parameters.JustIntonationPitch("1/1")
to get the scale music_parameters.- Return type:
Generator
Example:
>>> from mutwo.ext.parameters import pitches >>> from mutwo.ext.generators import wilson >>> wilsons_brun_euclidean_algorithm_generator = ( >>> wilson.make_wilsons_brun_euclidean_algorithm_generator( >>> ( >>> music_parameters.JustIntonationPitch("2/1"), >>> music_parameters.JustIntonationPitch("3/2"), >>> music_parameters.JustIntonationPitch("5/4"), >>> ) >>> ) >>> ) >>> next(wilsons_brun_euclidean_algorithm_generator) ((JustIntonationPitch(2),),) >>> next(wilsons_brun_euclidean_algorithm_generator) ((JustIntonationPitch(3/2), JustIntonationPitch(4/3)),) >>> next(wilsons_brun_euclidean_algorithm_generator) ((JustIntonationPitch(4/3), JustIntonationPitch(9/8), JustIntonationPitch(4/3)),)
mutwo.music_generators.constants§
- TUNEABLE_INTERVAL_TO_DIFFICULTY_DICT = {(): 0, (-3, 0, 0, 0, 0, 0, 0, 0, 1): 1, (-3, 0, 0, 0, 0, 0, 0, 1): 2, (-3, 0, 0, 0, 0, 1): 1, (-3, 0, 0, 0, 1): 2, (-3, 0, 2): 2, (-3, 1, 1): 2, (-3, 3): 2, (-2, -1, 0, 0, 0, 0, 0, 0, 1): 2, (-2, 0, 0, 0, 0, 0, 0, 0, 1): 1, (-2, 0, 0, 0, 0, 0, 0, 1): 1, (-2, 0, 0, 0, 0, 0, 1): 1, (-2, 0, 0, 0, 0, 1): 0, (-2, 0, 0, 0, 1): 0, (-2, 0, 0, 1): 0, (-2, 0, 1): 0, (-2, 0, 2): 1, (-2, 1, 0, 1): 1, (-2, 1, 1): 0, (-2, 2): 0, (-2, 3): 2, (-1, -1, 0, 0, 0, 0, 0, 0, 1): 2, (-1, -1, 0, 0, 0, 0, 0, 1): 2, (-1, -1, 0, 0, 0, 0, 1): 1, (-1, -1, 0, 0, 0, 1): 1, (-1, -1, 0, 0, 1): 1, (-1, -1, 0, 1): 0, (-1, -1, 2): 2, (-1, 0, -1, 0, 0, 1): 1, (-1, 0, 0, 0, 0, 1): 0, (-1, 0, 0, 0, 1): 0, (-1, 0, 0, 1): 0, (-1, 0, 1): 0, (-1, 1): 0, (-1, 1, 1): 0, (-1, 2): 0, (0, -2, 0, 0, 0, 1): 2, (0, -2, 0, 0, 1): 2, (0, -1, 0, 0, 0, 0, 0, 0, 1): 0, (0, -1, 0, 0, 0, 0, 0, 1): 0, (0, -1, 0, 0, 0, 0, 1): 0, (0, -1, 0, 0, 0, 1): 0, (0, -1, 0, 0, 1): 0, (0, -1, 0, 1): 0, (0, -1, 1): 0, (0, 0, -1, 0, 0, 0, 0, 0, 1): 1, (0, 0, -1, 0, 0, 0, 0, 1): 1, (0, 0, -1, 0, 0, 0, 1): 1, (0, 0, -1, 0, 0, 1): 1, (0, 0, -1, 0, 1): 1, (0, 0, -1, 1): 0, (0, 0, 0, -1, 0, 0, 1): 1, (0, 0, 0, -1, 0, 1): 1, (0, 0, 0, -1, 1): 1, (0, 0, 0, 1): 0, (0, 0, 1): 0, (0, 1): 0, (0, 1, -1, 1): 2, (0, 2, -1): 0, (0, 2, 0, -1): 0, (0, 3, 0, -1): 2, (1,): 0, (1, -2, 0, 1): 2, (1, -1, 0, 0, 1): 0, (1, -1, 0, 1): 0, (1, -1, 1): 0, (1, 0, -1, 0, 0, 1): 2, (1, 0, -1, 0, 1): 2, (1, 0, -1, 1): 0, (1, 0, 0, -1, 1): 2, (1, 0, 1, -1): 1, (1, 1): 0, (1, 1, -1): 0, (1, 2, -1): 0, (1, 2, 0, -1): 1, (2,): 0, (2, -2, 0, 1): 2, (2, -1): 0, (2, -1, 1): 0, (2, 0, -1, 1): 1, (2, 0, 1, -1): 1, (2, 1, -1): 0, (2, 1, 0, -1): 1, (3,): 0, (3, -1): 0, (3, 0, -1): 0, (3, 0, 0, -1): 1, (3, 1, -1): 1, (3, 1, 0, -1): 2, (4, -1): 0, (4, 0, -1): 0, (4, 0, 0, 0, -1): 2}§
Tuneable Just Intonation Intervals sorted by difficulty, according to Marc Sabat.
- TUNEABLE_INTERVAL_TUPLE = (JustIntonationPitch('1/1'), JustIntonationPitch('8/7'), JustIntonationPitch('7/6'), JustIntonationPitch('6/5'), JustIntonationPitch('11/9'), JustIntonationPitch('5/4'), JustIntonationPitch('9/7'), JustIntonationPitch('13/10'), JustIntonationPitch('4/3'), JustIntonationPitch('11/8'), JustIntonationPitch('7/5'), JustIntonationPitch('10/7'), JustIntonationPitch('13/9'), JustIntonationPitch('16/11'), JustIntonationPitch('3/2'), JustIntonationPitch('14/9'), JustIntonationPitch('11/7'), JustIntonationPitch('8/5'), JustIntonationPitch('13/8'), JustIntonationPitch('5/3'), JustIntonationPitch('12/7'), JustIntonationPitch('7/4'), JustIntonationPitch('9/5'), JustIntonationPitch('11/6'), JustIntonationPitch('13/7'), JustIntonationPitch('15/8'), JustIntonationPitch('23/12'), JustIntonationPitch('2/1'), JustIntonationPitch('13/6'), JustIntonationPitch('11/5'), JustIntonationPitch('9/4'), JustIntonationPitch('7/3'), JustIntonationPitch('19/8'), JustIntonationPitch('12/5'), JustIntonationPitch('17/7'), JustIntonationPitch('5/2'), JustIntonationPitch('18/7'), JustIntonationPitch('13/5'), JustIntonationPitch('8/3'), JustIntonationPitch('11/4'), JustIntonationPitch('14/5'), JustIntonationPitch('17/6'), JustIntonationPitch('20/7'), JustIntonationPitch('23/8'), JustIntonationPitch('3/1'), JustIntonationPitch('28/9'), JustIntonationPitch('25/8'), JustIntonationPitch('22/7'), JustIntonationPitch('19/6'), JustIntonationPitch('16/5'), JustIntonationPitch('13/4'), JustIntonationPitch('10/3'), JustIntonationPitch('27/8'), JustIntonationPitch('17/5'), JustIntonationPitch('24/7'), JustIntonationPitch('7/2'), JustIntonationPitch('18/5'), JustIntonationPitch('11/3'), JustIntonationPitch('15/4'), JustIntonationPitch('19/5'), JustIntonationPitch('23/6'), JustIntonationPitch('27/7'), JustIntonationPitch('4/1'), JustIntonationPitch('25/6'), JustIntonationPitch('21/5'), JustIntonationPitch('17/4'), JustIntonationPitch('13/3'), JustIntonationPitch('22/5'), JustIntonationPitch('9/2'), JustIntonationPitch('23/5'), JustIntonationPitch('14/3'), JustIntonationPitch('19/4'), JustIntonationPitch('24/5'), JustIntonationPitch('5/1'), JustIntonationPitch('26/5'), JustIntonationPitch('21/4'), JustIntonationPitch('16/3'), JustIntonationPitch('11/2'), JustIntonationPitch('28/5'), JustIntonationPitch('17/3'), JustIntonationPitch('23/4'), JustIntonationPitch('6/1'), JustIntonationPitch('25/4'), JustIntonationPitch('19/3'), JustIntonationPitch('13/2'), JustIntonationPitch('20/3'), JustIntonationPitch('27/4'), JustIntonationPitch('7/1'), JustIntonationPitch('22/3'), JustIntonationPitch('15/2'), JustIntonationPitch('23/3'), JustIntonationPitch('8/1'))§
Tuneable Just Intonation Intervals according to Marc Sabat.