def make_basic_rhythm(self, time_signature_pairs):

        beam_specifier = rmakers.BeamSpecifier(
            beam_divisions_together=self.beams,
            beam_each_division=self.beams,
            beam_rests=self.beams,
            )

        division_masks = rmakers.SilenceMask(
            pattern = abjad.Pattern(
                indices=self.mask_indices,
                period=self.mask_period)
                )
        # division_masks = [silence_every([mask_indicies], period=mask_period),]
        tuplet_specifier = rmakers.TupletSpecifier(
            extract_trivial=True,
            )
        tuplet_rhythm_maker = rmakers.TupletRhythmMaker(
            tuplet_ratios=self.tuplet_ratio,
            beam_specifier=beam_specifier,
            division_masks=division_masks,
            # preferred_denominator=None
            # ...equiv of this...I think it is duration specifier
            # but since pretty much everything defaults to None...its okay?
            tuplet_specifier=tuplet_specifier,
            #tag=self.tag,
            )
        selections = tuplet_rhythm_maker(time_signature_pairs)
        music = abjad.Staff(selections)
        music = self._apply_pitches(music)
        return music
 def make_basic_rhythm(self, time_signature_pairs):
     beam_specifier = rmakers.BeamSpecifier(
         beam_divisions_together=self.beams,
         beam_each_division=self.beams,
         beam_rests=self.beams,
     )
     division_masks = rmakers.SilenceMask(pattern=abjad.Pattern(
         indices=self.mask_indices, period=self.mask_period))
     note_rhythm_maker = rmakers.NoteRhythmMaker(
         beam_specifier=beam_specifier,
         division_masks=division_masks,
         #tag=self.tag,
     )
     selections = note_rhythm_maker(time_signature_pairs)
     music = abjad.Staff(selections)
     music = self._apply_pitches(music)
     return music
Ejemplo n.º 3
0
    def make_music(self, time_signature_pairs):
        music = self.make_basic_rhythm(time_signature_pairs, )
        shards = abjad.mutate(music[:]).split(time_signature_pairs)
        beam_specifier = rmakers.BeamSpecifier(
            beam_divisions_together=self.beams,
            beam_each_division=self.beams,
            beam_rests=self.beams,
        )
        time_signature_pairs = abjad.CyclicTuple(time_signature_pairs)
        for i, shard in enumerate(shards):
            leaves = abjad.select(shard).leaves()
            if not all(isinstance(_, abjad.Rest) for _ in leaves):
                beam_specifier([shard])
            container = abjad.Container(time_signature_pairs[i])
            abjad.mutate(shard).wrap(container)

        # music = self.add_attachments(music)
        return music
    def make_basic_rhythm(self, durations):
        talea = rmakers.Talea(
            counts = self.counts,
            denominator=self.denominator,
            )
        beam_specifier = rmakers.BeamSpecifier(
            beam_divisions_together=self.beams,
            beam_each_division=self.beams,
            beam_rests=self.beams,
            )

        # burnish_specifier=abjadext.rmakers.BurnishSpecifier(
        #     left_classes=[abjad.Rest],
        #     left_counts=[1, 0, 1],
        #     )
        if self.mask_indices or self.mask_period == None:
            division_masks = None
        else:
            division_masks = rmakers.SilenceMask(
                pattern = abjad.Pattern(
                    indices=self.mask_indices,
                    period=self.mask_period,
                    )
                )
        tuplet_specifier = rmakers.TupletSpecifier(
            trivialize=True,
            extract_trivial=True,
            rewrite_rest_filled=True,
            )
        talea_rhythm_maker = rmakers.TaleaRhythmMaker(
            talea=talea,
            beam_specifier=beam_specifier,
            extra_counts_per_division=self.extra_counts_per_division,
            division_masks=division_masks,
            tuplet_specifier=tuplet_specifier,
            burnish_specifier=self.burnish_specifier
            #tag=self.tag,
            )

        selections = talea_rhythm_maker(durations)
        music = self._apply_pitches(selections)

        return music
Ejemplo n.º 5
0
 def make_basic_rhythm(self, time_signature_pairs):
     beam_specifier = rmakers.BeamSpecifier(
         beam_divisions_together=self.beams,
         beam_each_division=self.beams,
         beam_rests=self.beams,
     )
     division_masks = rmakers.SilenceMask(pattern=abjad.Pattern(
         indices=self.mask_indices,
         period=self.mask_period,
     ), )
     tuplet_specifier = rmakers.TupletSpecifier(extract_trivial=True, )
     even_division_rhythm_maker = rmakers.EvenDivisionRhythmMaker(
         denominators=self.denominators,
         beam_specifier=beam_specifier,
         extra_counts_per_division=self.extra_counts_per_division,
         division_masks=division_masks,
         tuplet_specifier=tuplet_specifier,
         #tag=self.tag,
     )
     selections = even_division_rhythm_maker(time_signature_pairs)
     music = abjad.Staff(selections)
     music = self._apply_pitches(music)
     return music