Ejemplo n.º 1
0
 def prolation(self) -> Multiplier:
     """
     Gets prolation.
     """
     prolations = [Multiplier(1)] + self._prolations()
     products = mathtools.cumulative_products(prolations)
     return products[-1]
Ejemplo n.º 2
0
    def prolation(self):
        """
        Prolation of rhythm tree node.

        Returns multiplier.
        """
        return mathtools.cumulative_products(self.prolations)[-1]
Ejemplo n.º 3
0
 def prolation(self) -> Multiplier:
     """
     Gets prolation.
     """
     prolations = [Multiplier(1)] + self._prolations()
     products = mathtools.cumulative_products(prolations)
     return products[-1]
Ejemplo n.º 4
0
    def prolation(self):
        """
        Prolation of rhythm tree node.

        Returns multiplier.
        """
        return mathtools.cumulative_products(self.prolations)[-1]
Ejemplo n.º 5
0
    def prolation(self) -> Multiplier:
        r"""
        Gets prolation.

        ..  container:: example

            REGRESSION. Works with grace notes (and containers):

            >>> voice = abjad.Voice(
            ...     r"\times 2/3 { c'4 d' e' } \times 2/3 { f' g' a' }"
            ... )
            >>> container_1 = abjad.GraceContainer("cs'16")
            >>> abjad.attach(container_1, voice[0][1])
            >>> container_2 = abjad.AfterGraceContainer("fs'16")
            >>> abjad.attach(container_2, voice[1][2])
            >>> abjad.show(voice) # doctest: +SKIP

            ..  docs::

                >>> abjad.f(voice)
                \new Voice
                {
                    \times 2/3 {
                        c'4
                        \grace {
                            cs'16
                        }
                        d'4
                        e'4
                    }
                    \times 2/3 {
                        f'4
                        g'4
                        \afterGrace
                        a'4
                        {
                            fs'16
                        }
                    }
                }

            >>> abjad.inspect(voice).parentage().prolation
            Multiplier(1, 1)

            >>> abjad.inspect(container_1).parentage().prolation
            Multiplier(2, 3)

            >>> abjad.inspect(container_1[0]).parentage().prolation
            Multiplier(2, 3)

            >>> abjad.inspect(container_2).parentage().prolation
            Multiplier(2, 3)

            >>> abjad.inspect(container_2[0]).parentage().prolation
            Multiplier(2, 3)

        """
        prolations = [Multiplier(1)] + self._prolations()
        products = mathtools.cumulative_products(prolations)
        return products[-1]
Ejemplo n.º 6
0
    def prolation(self):
        """
        Gets prolation.

        Returns multiplier.
        """
        import abjad
        prolations = [abjad.Multiplier(1)] + self._prolations
        products = mathtools.cumulative_products(prolations)
        return products[-1]