예제 #1
0
 def get_tag(self, site=None):
     """
     Gets tag.
     """
     tag = Tag(self._tag)
     tag = tag.append(site)
     return tag
예제 #2
0
    def _attach_lilypond_one_voice(self):
        from .Voice import Voice

        anchor_leaf = self._get_on_beat_anchor_leaf()
        anchor_voice = abjad_inspect(anchor_leaf).parentage().get(Voice)
        final_anchor_leaf = abjad_inspect(anchor_voice).leaf(-1)
        next_leaf = abjad_inspect(final_anchor_leaf).leaf(1)
        literal = LilyPondLiteral(r"\oneVoice", format_slot="absolute_before")
        if abjad_inspect(next_leaf).has_indicator(literal):
            return
        if isinstance(next_leaf._parent, OnBeatGraceContainer):
            return
        if next_leaf._parent._is_on_beat_anchor_voice():
            return
        site = "abjad.OnBeatGraceContainer._attach_lilypond_one_voice()"
        tag = Tag(site)
        tag = tag.append(abjad_tags.ONE_VOICE_COMMAND)
        attach(literal, next_leaf, tag=tag)