Example #1
0
class Line7(GenF, gen_e.Line6):
    # show_data_type = machines.SegmentData
    rhythm_initial_silence = 52
    breaks = ID()
    breaks.extend( [-3]*18 )
    breaks[10] = -3.5
    breaks[15] = -1
    rhythm_multipliers = machines.RhythmsMultiplied.make_multipliers({
        5:0.5,
        9:0.5,
        14:0.5,
        18:0.5,
        },default=0.25)
    rhythm_times = 2
    pitch_displacement = gen_e.Line6.pitch_displacement.copy()
    pitch_displacement.flat(38)
    pitch_displacement = pitch_displacement + \
        machines.FifthDisplacement(
            up = (      11,12,17,  32, 35,  37,38,41,    48),
            down=(0,1,2,3,       18,      36,   42,43),
            ) + \
        machines.OctaveDisplacement(
            up=(1,2,3,  23,  36,     ),
            down=(10, 19,       38),
            )
    # print(pitch_displacement)
    def update_data(self, **kwargs):
        super().update_data(**kwargs)
        if self.__class__.__name__ == "Line7":
            self.tag_events("magenta", every_child=True)
Example #2
0
class Drone10(Drone0):
    # show_data_attr="original_depthwise_index"
    rhythm_initial_silence=2
    rhythm_segments = (
        # NOTE... include others here?
        (1,1,1,1,),
    )
    rhythm_sequence = ID({
        # NOTE: could cycle through a few possibilities
        }, default=0, limit=36)
    pitch_sequence = ID(default=0, limit=34)
    
    def update_data(self, **kwargs):
        machines.ArrangeAttachments.update_data(self, **kwargs)
        if self.__class__.__name__ == "Drone10":
            self.tag_events("grey", every_child=True)
Example #3
0
class GenE(object):
    time_signature = (3, 4)
    metrical_durations = ID(default=((3, 4), ),
                            limit=35)  # TO DO... is this the right count?
    rehearsal_mark_number = 5
    tempo_command = '\\note #"8" #1 = \\note #"8" #1 (\\note #"4" #1 = 108)'
    start_bar_line = "||"
Example #4
0
class Line3(GenF, gen_e.Line4):
    # rhythm_reverse = list(gen_e.Line4.rhythm_reverse)
    # rhythm_reverse.remove(7)
    rhythm_initial_silence=23
    pitch_reverse = gen_e.Line4.pitch_reverse + (19,25)
    # show_data_type=machines.EventData
    pitch_displacement =  machines.FifthDisplacement(
            up=(     6,7,             19,20, 22, 24, 26, 30, 58,76),
            down=(2,4,  8,9,12, 16, 18,    21,  )
            ) +\
        machines.OctaveDisplacement(
            up=(1,3,4,9,     12, 16,  21),
            down=(5,7,    11,     19,  22, 26)
            ) 
    breaks = gen_e.Line4.breaks + ID({
        1:5,
        3:1,
        10:-4,
        11:0,
        13:-1,
        19:-2,
        25:-1,
        26:1,
        })
    rhythm_times = 3 # NOTE... 3rd time cuts off... maybe that's Ok
    rhythm_multipliers = gen_e.Line4.rhythm_multipliers
    rhythm_multipliers[18]=1
    clef="treble"
Example #5
0
class GenH(object):
    time_signature = (4,4)
    metrical_durations = ID(default=((4,4),), limit=48) # NOTE... duration length takes into account accel.
    initial_silence=24
    rehearsal_mark_number = 8
    # tempo_units_per_minute = 144
    start_bar_line = "||"
Example #6
0
class GenF(machines.RhythmsPulsed):
    time_signature = (4,4)
    metrical_durations = ID(default=((4,4),), limit=36)
    rehearsal_mark_number = 6
    rhythm_initial_silence = 27
    tempo_command = '\\note #"2." #1 = \\note #"1" #1 (\\note #"4" #1 = 144)'
    start_bar_line = "||"
    respell = None
    def update_data(self, **kwargs):
        super().update_data(**kwargs)
Example #7
0
class GenA(
        object
):  # basic attributes, such as starting time signature, rehearsal mark, etc.
    metrical_durations = ID(default=(
        (1, 2),
        (1, 2),
    ), limit=18)
    rehearsal_mark_number = 1
    # tempo_units_per_minute = 72 # TO DO... tempo indication makes everything SLOW... WHY?????
    tempo_command = '\\note #"2" #1 = \\note #"2." #1 (\\note #"4" #1 = 72)'
Example #8
0
class Line6(GenG, gen_f.Line6):
    rhythm_pulses = ID({}, default=0.5)
    pitch_displacement = gen_f.Line6.pitch_displacement.copy()
    pitch_displacement.flat(2, 3)
    pitch_displacement += machines.FifthDisplacement(
        up=(17, 22, 28, 46),
        down=(0, 1, 2, 3),
    ) + machines.OctaveDisplacement(
        up=(0, 2, 22),
        down=(5, 19, 28, 46),
    )
Example #9
0
class CrossLine(machines.Rhythms, machines.SegmentedLine):
    """
    mixes and matches pitches from other lines, using its own rhythm
    """
    lines = ID()

    def get_line(self, index):
        """
		hook, that should be overriden to return a SegmentedLine object for a given rhythmic index.
    	"""
        return self.lines[index]
Example #10
0
class Line8(Line5):
    rhythm_initial_silence = 27
    rhythm_pulses = ID({}, default=0.5)
    rhythm_multipliers = ID({}, default=1)
    pitch_displacement = machines.FifthDisplacement(
        up=(8, 10, 13, 25, 37, 38, 44, 45, 55, 64),
        down=(0, 1, 2, 3, 4, 42, 47),
    )
    pitch_displacement += machines.OctaveDisplacement(up=(2, 15, 27, 30, 42),
                                                      down=(13, 25, 28, 31, 38,
                                                            41, 55))
    rhythm_times = 4
    respell = None

    def update_data(self, **kwargs):
        super().update_data(**kwargs)
        self.respell_events("flats", 0, 40)
        self.respell_events("sharps", 40)
        if self.__class__ is Line8:
            self.events[1].tag("\clef bass")
        if self.__class__.__name__ == "Line8":
            self.tag_events("darkblue", every_child=True)
Example #11
0
class Line4(GenG, gen_f.Line4):
    rhythm_pulses = ID({}, default=0.5)
    pitch_displacement = gen_f.Line4.pitch_displacement.copy()
    pitch_displacement += machines.FifthDisplacement(
        up=(14, 17, 18, 22),
        down=(0, 1, 2, 3, 4),
    ) + machines.OctaveDisplacement(
        up=(2, 3, 4),
        down=(1, 11, 25),
    )
    print(pitch_displacement)

    def update_data(self, **kwargs):
        super().update_data(**kwargs)
        if self.__class__ is Line4:
            self.events[1].tag("\clef bass")
Example #12
0
class Line7(GenG, gen_f.Line7):
    # rhythm_multipliers = ID({}, default=1)
    rhythm_multipliers = gen_f.Line7.rhythm_multipliers
    rhythm_multipliers.default = 0.5
    # my_short_notes = (2,3,5,6,8,9,11,12,17,18,20,21,23,24,29,30,)
    rhythm_pulses = ID({}, default=0.5)
    rhythm_times = 4
    pitch_displacement = gen_f.Line7.pitch_displacement
    pitch_displacement.flat(2)
    pitch_displacement += machines.FifthDisplacement(
        up=(31, 35, 48, 65, 66, 70, 76),
        down=(
            2,
            12,
        ),
    ) + machines.OctaveDisplacement(
        up=(
            6,
            12,
        ),
        down=(7, 34, 65, 71),
    )
    breaks = gen_f.Line7.breaks
    breaks[2] = -4
    breaks[3] = -4
    breaks[4] = -5.5
    breaks[13] = -3
    breaks[15] = -5.5
    breaks[21] = -2.5
    breaks[22] = -1
    # breaks[23] = -1 # TO DO... WHY DOESN'T THIS WORK????!!!!
    # print(pitch_displacement)
    # breaks = gen_f.Line7.breaks
    # breaks[1] = -2
    # breaks[2] = 0
    respell = None

    def update_data(self, **kwargs):
        super().update_data(**kwargs)
        self.respell_events("flats", 0, 32)
        self.respell_events("sharps", 31)
Example #13
0
class Line3Pulsed(Line3):
    rhythm_pulses = ID({}, default=0.5)
Example #14
0
class Drone0(GenG, machines.Drone0):
    rhythm_sequence = ID(default=1, limit=22)
    rhythm_initial_silence = 3
Example #15
0
class Drone0(GenE, machines.Drone0):
    rhythm_sequence = ID(default=1, limit=22)
    rhythm_initial_silence = 3
    initial_dynamic = "p"
    end_dynamic = "p"
Example #16
0
class Line3(GenG, gen_f.Line3):
    rhythm_pulses = ID({}, default=0.5)
    pitch_displacement = gen_f.Line3.pitch_displacement + NEW_FIFTHS
Example #17
0
class Drone0(GenA, machines.Drone0):
    metrical_durations = ID(default=((1, 1), ), limit=18)
Example #18
0
def every(start=0, end=2, every_count=2):
    slurs_data = ID()
    for i in range(start, end, every_count):
        slurs_data[i] = "("
        slurs_data[i + every_count - 1] = ")"
    return slurs_data