Beispiel #1
0
class FStarTransform(calliope.Transform):
    respell = None
    bracket_cells = calliope.BracketCells()

    def transform_nodes(self, machine):
        for phrase_line in machine:
            if self.respell:
                phrase_line.respell = self.respell
Beispiel #2
0
class Clarinet(calliope.Line):
    class Phrase0_I(SlowPhrase0):
        rhythm_lengths = (6, 6)
        bookend_rests = (8, 4)

    class Phrase0_II(Flute.Phrase0_II):
        pitch_sequence = pitches.PITCH_SEQUENCE_WILD.select(-2, 0).select(
            0, 1, 2, 1)

    tagging = calliope.Tagging({0: ("pp", )})
    bracket_cells = calliope.BracketCells()
    my_range = calliope.SmartRange(-3, 24)
Beispiel #3
0
class LineC(calliope.Line):
    show_cells = calliope.BracketCells()
    metrical_durations = (
        (
            2,
            4,
        ),
        (
            2,
            4,
        ),
    ) * 30
Beispiel #4
0
class Flute(calliope.Line):
    class Phrase0_I(SlowPhrase0):
        rhythm_lengths = (6, 3, 3, 3)
        bookend_rests = (8, 4)
        pitch_selections = (0, 2)

    class Phrase0_II(FastPhrase0):
        rhythm_lengths = (6, 4, 4, 2, 4, 2, 4, 4, 2)
        bookend_rests = (12, )
        pitch_sequence = pitches.PITCH_SEQUENCE_WILD.select(-3, -1).select(
            0, 1, 2, 1)

    tagging = calliope.Tagging({0: ("pp", )})
    bracket_cells = calliope.BracketCells()
    my_range = calliope.SmartRange(4, 32)
Beispiel #5
0
class Cello(calliope.Line):
    class Phrase0_I(SlowRhythm):
        transpose = -8
        rhythm_lengths = (8, 8)

    class Phrase0_II(FasterRhythm):
        transpose = -8
        rhythm_lengths = (8, 6, 4)

    class Phrase0_III(FasterRhythm):
        transpose = -3
        rhythm_lengths = (8, 6, 4, 4)

    tagging = calliope.Tagging({
        0: ("pp", "sul. pont"),
        (1, -1): "\<",
        2: "mp"
    })
    bracket_cells = calliope.BracketCells()
Beispiel #6
0
class Clarinet(calliope.Line): # NOTE: could also be a line...
    metrical_durations = (
        (4,4),
        (4,4),
        (4,4),
        (2,4),(1,4),(1,4),
        (1,4),(1,4),(2,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        )
    phrase_0 = FastPhraseMaker()(4, bookend_rests=(15.5,))
    phrase_1 = FastPhraseMaker()(19, 4, bookend_rests=(22.5,) )
    phrase_2 = FastPhraseMaker()(20, 8,)
    phrase_3 = FastPhraseMaker()(4,2,2, 9)
    phrase_4 = FastPhraseMaker()(3,3,2,4)
    # phrase_1 = FastPhraseMaker(
    #     pitch_sequence=flit_sequence(transpose=-5, keep_in_range=(5,18)),
    #     )(24,16)
    # phrase_2 = FastPhraseMaker(
    #     pitch_sequence=flit_sequence(transpose=-2, keep_in_range=(5,18)),
    #     )(24,16)
    # phrase_3 = FastPhraseMaker(
    #     pitch_sequence=flit_sequence(keep_in_range=(9,21)),
    #     )(12,)
    # phrase_4 = FastPhraseMaker(
    #     pitch_sequence=flit_sequence.select(-1,0, keep_in_range=(14,26)),
    #     )(8,4)

    bracket_cells = calliope.BracketCells()
Beispiel #7
0
class Violin(calliope.Line):
    class Phrase0_I(Flute.Phrase0_I):
        pitch_sequence = pitches.PITCH_SEQUENCE_WILD.select(1, 3)

    class Phrase0_II(FastPhrase0):
        rhythm_lengths = (
            6,
            4,
            8,
            6,
            4,
            4,
        )
        bookend_rests = (12, )
        pitch_sequence = pitches.PITCH_SEQUENCE_WILD.select(-1, 0)

    tagging = calliope.Tagging({
        0: ("pp", "sul. pont"),
    })
    bracket_cells = calliope.BracketCells()
    my_range = calliope.SmartRange(-5, 20)
Beispiel #8
0
class Violin(calliope.Line): 
    metrical_durations = (
        (1,4),(1,4),(2,4),
        (4,4),
        (4,4),
        (2,4),(1,4),(1,4),
        (1,4),(1,4),(2,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        )

    phrase_0 = FastPhraseMaker()(32,24)
    phrase_1 = FastPhraseMaker(
        pitch_sequence=flit_sequence(transpose=-5, keep_in_range=(5,18)),
        )(24,16)
    phrase_2 = FastPhraseMaker(
        pitch_sequence=flit_sequence(transpose=-2, keep_in_range=(5,18)),
        )(24,16)
    phrase_3 = FastPhraseMaker(
        pitch_sequence=flit_sequence(keep_in_range=(9,21)),
        )(12,)
    phrase_4 = FastPhraseMaker(
        pitch_sequence=flit_sequence.select(-1,0, keep_in_range=(14,26)),
        )(8,4)

    bracket_cells = calliope.BracketCells()
Beispiel #9
0
class Flute(calliope.Line): # NOTE: could also be a line...
    metrical_durations = (
        (1,4),(1,4),(1,4),(1,4),
        (4,4),
        (4,4),
        (2,4),(1,4),(1,4),
        (1,4),(1,4),(2,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (4,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        (1,4),(1,4),(1,4),(1,4),
        )

    phrase_0 = FastPhraseMaker(
        pitch_sequence=flit_sequence.select(0,2, keep_in_range=(12,24)),
        )(30, 3, bookend_rests=(1,))
    phrase_1 = FastPhraseMaker(
        pitch_sequence=flit_sequence(keep_in_range=(12,24)),
        )(4,20,8, bookend_rests=(32,))
    phrase_2 = FastPhraseMaker(
        pitch_sequence=flit_sequence(keep_in_range=(12,24)),
        )(4,4, 9)
    phrase_3 = FastPhraseMaker(
        pitch_sequence=flit_sequence(keep_in_range=(12,24)),
        )(6,6,)

    bracket_cells = calliope.BracketCells()
Beispiel #10
0
        pass

    # NOTE: a little funky.... but this might work well
    # for i, part_cls in enumerate([Flute, Clarinet, Violin, Cello]):
    #     for block in c_sequence:
    #         setattr(part_cls, "phrase_" + block.name, block[i])


# _____________________________________________________________________________________

mark_c_score = MarkC(name="mark_c")

for i, part in enumerate(mark_c_score):
    for block in c_sequence:
        part["phrase_" + block.name] = block[i]()
    calliope.BracketCells().transform_nodes(machine=part)

mark_c_score["Flute"]["phrase_c_ix"].logical_ties[0].beats = 2
mark_c_score["Clarinet"]["phrase_c_ix"].logical_ties[0].beats = 2
mark_c_score["Violin"]["phrase_c_ix"].logical_ties[0].beats = 2
mark_c_score["Cello"]["phrase_c_ix"].logical_ties[0].beats = 2

mark_c_score["Flute"]["phrase_c_x"].logical_ties[-1].beats = 4
mark_c_score["Clarinet"]["phrase_c_x"].logical_ties[-1].beats = 4
mark_c_score["Violin"]["phrase_c_x"].logical_ties[-1].beats = 4
mark_c_score["Cello"]["phrase_c_x"].logical_ties[-1].beats = 4

# _____________________________________________________________________________________

calliope.illustrate_me(bubble=mark_c_score,
                       score_type=score_staves.CloselyScore,