示例#1
0
def test_lilypondproxytools_LilyPondGrobNameManager___setattr___09():
    r'''Override LilyPond ClusterSpanner grob.
    '''

    cluster = abjad.Cluster(abjad.Note(1, (1, 4)) * 4)
    abjad.override(cluster).cluster_spanner.style = 'ramp'
    abjad.override(cluster).cluster_spanner.padding = 0.1

    assert format(cluster) == abjad.String.normalize(r'''
        \makeClusters {
            \override ClusterSpanner.padding = #0.1
            \override ClusterSpanner.style = #'ramp
            cs'4
            cs'4
            cs'4
            cs'4
            \revert ClusterSpanner.padding
            \revert ClusterSpanner.style
        }
        ''')

    del (abjad.override(cluster).cluster_spanner)

    assert format(cluster) == abjad.String.normalize(r'''
        \makeClusters {
            cs'4
            cs'4
            cs'4
            cs'4
        }
        ''')
示例#2
0
def test_LilyPondGrobNameManager___setattr___08():
    """
    Override LilyPond ClusterSpanner grob.
    """

    cluster = abjad.Cluster(abjad.Note(1, (1, 4)) * 4)
    abjad.override(cluster).cluster_spanner.style = "ramp"
    abjad.override(cluster).cluster_spanner.padding = 0.1

    assert format(cluster) == abjad.String.normalize(r"""
        \makeClusters {
            \override ClusterSpanner.padding = #0.1
            \override ClusterSpanner.style = #'ramp
            cs'4
            cs'4
            cs'4
            cs'4
            \revert ClusterSpanner.padding
            \revert ClusterSpanner.style
        }
        """)

    del abjad.override(cluster).cluster_spanner

    assert format(cluster) == abjad.String.normalize(r"""
        \makeClusters {
            cs'4
            cs'4
            cs'4
            cs'4
        }
        """)
示例#3
0
def test_scoretools_Cluster___init___01():
    r'''Cluster can be empty.
    '''
    cluster = abjad.Cluster([])
    assert not cluster.is_simultaneous
    assert len(cluster) == 0
    assert format(cluster) == abjad.String.normalize(r'''
        \makeClusters {
        }
        ''')
示例#4
0
def test_Cluster___init___01():
    """
    Cluster can be empty.
    """
    cluster = abjad.Cluster([])
    assert not cluster.simultaneous
    assert len(cluster) == 0
    assert abjad.lilypond(cluster) == abjad.String.normalize(r"""
        \makeClusters {
        }
        """)
示例#5
0
def test_Cluster___init___02():
    cluster = abjad.Cluster("cs'4 cs'4 cs'4 cs'4")
    assert isinstance(cluster, abjad.Cluster)
    assert not cluster.simultaneous
    assert len(cluster) == 4
    assert abjad.lilypond(cluster) == abjad.String.normalize(r"""
        \makeClusters {
            cs'4
            cs'4
            cs'4
            cs'4
        }
        """)
示例#6
0
def test_Cluster___init___02():
    cluster = abjad.Cluster(abjad.Note(1, (1, 4)) * 4)
    assert isinstance(cluster, abjad.Cluster)
    assert not cluster.is_simultaneous
    assert len(cluster) == 4
    assert format(cluster) == abjad.String.normalize(r"""
        \makeClusters {
            cs'4
            cs'4
            cs'4
            cs'4
        }
        """)