GroupedRhythmicStavesScoreTemplate

class templatetools.GroupedRhythmicStavesScoreTemplate(staff_count=2)

Grouped rhythmic staves score template.

>>> import abjad

One voice per staff:

>>> class_ = abjad.templatetools.GroupedRhythmicStavesScoreTemplate
>>> template_1 = class_(staff_count=4)
>>> score = template_1()
>>> show(score) 
>>> f(score)
\context Score = "Grouped Rhythmic Staves Score" <<
    \context StaffGroup = "Grouped Rhythmic Staves Staff Group" <<
        \context RhythmicStaff = "Staff 1" {
            \context Voice = "Voice 1" {
            }
        }
        \context RhythmicStaff = "Staff 2" {
            \context Voice = "Voice 2" {
            }
        }
        \context RhythmicStaff = "Staff 3" {
            \context Voice = "Voice 3" {
            }
        }
        \context RhythmicStaff = "Staff 4" {
            \context Voice = "Voice 4" {
            }
        }
    >>
>>

More than one voice per staff:

>>> template_2 = class_(staff_count=[2, 1, 2])
>>> score = template_2()
>>> show(score) 
>>> f(score)
\context Score = "Grouped Rhythmic Staves Score" <<
    \context StaffGroup = "Grouped Rhythmic Staves Staff Group" <<
        \context RhythmicStaff = "Staff 1" <<
            \context Voice = "Voice 1-1" {
            }
            \context Voice = "Voice 1-2" {
            }
        >>
        \context RhythmicStaff = "Staff 2" {
            \context Voice = "Voice 2" {
            }
        }
        \context RhythmicStaff = "Staff 3" <<
            \context Voice = "Voice 3-1" {
            }
            \context Voice = "Voice 3-2" {
            }
        >>
    >>
>>

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_templatetools { graph [label=templatetools]; "abjad.tools.templatetools.GroupedRhythmicStavesScoreTemplate.GroupedRhythmicStavesScoreTemplate" [color=black, fontcolor=white, group=2, label=<<B>GroupedRhythmicStavesScoreTemplate</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.templatetools.GroupedRhythmicStavesScoreTemplate.GroupedRhythmicStavesScoreTemplate"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

context_name_abbreviations Gets context name abbreviations.
staff_count Score template staff count.
__call__() Calls score template.
__copy__(*arguments) Copies Abjad value object.
__eq__(argument) Is true when all initialization values of Abjad value object equal the initialization values of argument.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes Abjad value object.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

GroupedRhythmicStavesScoreTemplate.context_name_abbreviations

Gets context name abbreviations.

GroupedRhythmicStavesScoreTemplate.staff_count

Score template staff count.

>>> template_1.staff_count
4

Returns nonnegative integer.

Special methods

GroupedRhythmicStavesScoreTemplate.__call__()

Calls score template.

Call first template:

>>> score_1 = template_1()
>>> show(score_1) 
>>> f(score_1)
\context Score = "Grouped Rhythmic Staves Score" <<
    \context StaffGroup = "Grouped Rhythmic Staves Staff Group" <<
        \context RhythmicStaff = "Staff 1" {
            \context Voice = "Voice 1" {
            }
        }
        \context RhythmicStaff = "Staff 2" {
            \context Voice = "Voice 2" {
            }
        }
        \context RhythmicStaff = "Staff 3" {
            \context Voice = "Voice 3" {
            }
        }
        \context RhythmicStaff = "Staff 4" {
            \context Voice = "Voice 4" {
            }
        }
    >>
>>

Call second template:

>>> score_2 = template_2()
>>> show(score_2) 
>>> f(score_2)
\context Score = "Grouped Rhythmic Staves Score" <<
    \context StaffGroup = "Grouped Rhythmic Staves Staff Group" <<
        \context RhythmicStaff = "Staff 1" <<
            \context Voice = "Voice 1-1" {
            }
            \context Voice = "Voice 1-2" {
            }
        >>
        \context RhythmicStaff = "Staff 2" {
            \context Voice = "Voice 2" {
            }
        }
        \context RhythmicStaff = "Staff 3" <<
            \context Voice = "Voice 3-1" {
            }
            \context Voice = "Voice 3-2" {
            }
        >>
    >>
>>

Returns score.

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.