示例#1
0
    def list_known_dynamics():
        r"""Lists all dynamics recognized by LilyPond parser.

        ::

            >>> for x in lilypondparsertools.LilyPondParser.list_known_dynamics():
            ...     print(x)
            ...
            f
            ff
            fff
            ffff
            fffff
            fp
            fz
            mf
            mp
            p
            pp
            ppp
            pppp
            ppppp
            rfz
            sf
            sff
            sfp
            sfz
            sp
            spp

        Returns tuple.
        """
        from abjad.ly import current_module

        result = []
        for key, value in current_module.items():
            if not isinstance(value, dict):
                continue
            if "dynamic-event" in value.get("types", ()):
                result.append(key)
        result.sort()
        result = tuple(result)
        return result
示例#2
0
    def list_known_dynamics() -> typing.Tuple[str, ...]:
        """
        Lists all dynamics recognized by LilyPond parser.

        ..  container:: example

            >>> class_ = abjad.parser.LilyPondParser
            >>> for dynamic in class_.list_known_dynamics():
            ...     print(dynamic)
            ...
            f
            ff
            fff
            ffff
            fffff
            fp
            fz
            mf
            mp
            p
            pp
            ppp
            pppp
            ppppp
            rfz
            sf
            sff
            sfp
            sfz
            sp
            spp

        """
        from abjad.ly import current_module

        result = []
        for key, value in current_module.items():
            if not isinstance(value, dict):
                continue
            if "dynamic-event" in value.get("types", ()):
                result.append(key)
        result.sort()
        return tuple(result)
示例#3
0
    def list_known_dynamics() -> typing.Tuple[str, ...]:
        """
        Lists all dynamics recognized by LilyPond parser.

        ..  container:: example

            >>> class_ = abjad.parser.LilyPondParser
            >>> for dynamic in class_.list_known_dynamics():
            ...     print(dynamic)
            ...
            f
            ff
            fff
            ffff
            fffff
            fp
            fz
            mf
            mp
            p
            pp
            ppp
            pppp
            ppppp
            rfz
            sf
            sff
            sfp
            sfz
            sp
            spp

        """
        from abjad.ly import current_module

        result = []
        for key, value in current_module.items():
            if not isinstance(value, dict):
                continue
            if "dynamic-event" in value.get("types", ()):
                result.append(key)
        result.sort()
        return tuple(result)
示例#4
0
    def list_known_dynamics():
        r'''Lists all dynamics recognized by LilyPond parser.

        ::

            >>> for x in lilypondparsertools.LilyPondParser.list_known_dynamics():
            ...     print(x)
            ...
            f
            ff
            fff
            ffff
            fffff
            fp
            fz
            mf
            mp
            p
            pp
            ppp
            pppp
            ppppp
            rfz
            sf
            sff
            sfp
            sfz
            sp
            spp

        Returns tuple.
        '''
        from abjad.ly import current_module
        result = []
        for key, value in current_module.items():
            if not isinstance(value, dict):
                continue
            if 'dynamic-event' in value.get('types', ()):
                result.append(key)
        result.sort()
        result = tuple(result)
        return result