StringOrchestraScoreTemplate

class templatetools.StringOrchestraScoreTemplate(violin_count=6, viola_count=4, cello_count=3, contrabass_count=2, split_hands=True, use_percussion_clefs=False)

String orchestra score template.

>>> template = templatetools.StringOrchestraScoreTemplate()
>>> score = template()
>>> print(format(score))
\context Score = "Score" <<
    \tag #'(Violin1 Violin2 Violin3 Violin4 Violin5 Violin6 Viola1 Viola2 Viola3 Viola4 Cello1 Cello2 Cello3 Contrabass1 Contrabass2)
    \context TimeSignatureContext = "TimeSignatureContext" {
    }
    \context StaffGroup = "Outer Staff Group" <<
        \context ViolinStaffGroup = "Violin Staff Group" <<
            \tag #'Violin1
            \context StringPerformerStaffGroup = "Violin 1 Staff Group" <<
                \context BowingStaff = "Violin 1 Bowing Staff" <<
                    \context BowingVoice = "Violin 1 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 1 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 1 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin2
            \context StringPerformerStaffGroup = "Violin 2 Staff Group" <<
                \context BowingStaff = "Violin 2 Bowing Staff" <<
                    \context BowingVoice = "Violin 2 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 2 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 2 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin3
            \context StringPerformerStaffGroup = "Violin 3 Staff Group" <<
                \context BowingStaff = "Violin 3 Bowing Staff" <<
                    \context BowingVoice = "Violin 3 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 3 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 3 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin4
            \context StringPerformerStaffGroup = "Violin 4 Staff Group" <<
                \context BowingStaff = "Violin 4 Bowing Staff" <<
                    \context BowingVoice = "Violin 4 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 4 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 4 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin5
            \context StringPerformerStaffGroup = "Violin 5 Staff Group" <<
                \context BowingStaff = "Violin 5 Bowing Staff" <<
                    \context BowingVoice = "Violin 5 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 5 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 5 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin6
            \context StringPerformerStaffGroup = "Violin 6 Staff Group" <<
                \context BowingStaff = "Violin 6 Bowing Staff" <<
                    \context BowingVoice = "Violin 6 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 6 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 6 Fingering Voice" {
                    }
                >>
            >>
        >>
        \context ViolaStaffGroup = "Viola Staff Group" <<
            \tag #'Viola1
            \context StringPerformerStaffGroup = "Viola 1 Staff Group" <<
                \context BowingStaff = "Viola 1 Bowing Staff" <<
                    \context BowingVoice = "Viola 1 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Viola 1 Fingering Staff" <<
                    \clef "alto"
                    \context FingeringVoice = "Viola 1 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Viola2
            \context StringPerformerStaffGroup = "Viola 2 Staff Group" <<
                \context BowingStaff = "Viola 2 Bowing Staff" <<
                    \context BowingVoice = "Viola 2 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Viola 2 Fingering Staff" <<
                    \clef "alto"
                    \context FingeringVoice = "Viola 2 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Viola3
            \context StringPerformerStaffGroup = "Viola 3 Staff Group" <<
                \context BowingStaff = "Viola 3 Bowing Staff" <<
                    \context BowingVoice = "Viola 3 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Viola 3 Fingering Staff" <<
                    \clef "alto"
                    \context FingeringVoice = "Viola 3 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Viola4
            \context StringPerformerStaffGroup = "Viola 4 Staff Group" <<
                \context BowingStaff = "Viola 4 Bowing Staff" <<
                    \context BowingVoice = "Viola 4 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Viola 4 Fingering Staff" <<
                    \clef "alto"
                    \context FingeringVoice = "Viola 4 Fingering Voice" {
                    }
                >>
            >>
        >>
        \context CelloStaffGroup = "Cello Staff Group" <<
            \tag #'Cello1
            \context StringPerformerStaffGroup = "Cello 1 Staff Group" <<
                \context BowingStaff = "Cello 1 Bowing Staff" <<
                    \context BowingVoice = "Cello 1 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Cello 1 Fingering Staff" <<
                    \clef "bass"
                    \context FingeringVoice = "Cello 1 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Cello2
            \context StringPerformerStaffGroup = "Cello 2 Staff Group" <<
                \context BowingStaff = "Cello 2 Bowing Staff" <<
                    \context BowingVoice = "Cello 2 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Cello 2 Fingering Staff" <<
                    \clef "bass"
                    \context FingeringVoice = "Cello 2 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Cello3
            \context StringPerformerStaffGroup = "Cello 3 Staff Group" <<
                \context BowingStaff = "Cello 3 Bowing Staff" <<
                    \context BowingVoice = "Cello 3 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Cello 3 Fingering Staff" <<
                    \clef "bass"
                    \context FingeringVoice = "Cello 3 Fingering Voice" {
                    }
                >>
            >>
        >>
        \context ContrabassStaffGroup = "Contrabass Staff Group" <<
            \tag #'Contrabass1
            \context StringPerformerStaffGroup = "Contrabass 1 Staff Group" <<
                \context BowingStaff = "Contrabass 1 Bowing Staff" <<
                    \context BowingVoice = "Contrabass 1 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Contrabass 1 Fingering Staff" <<
                    \clef "bass_8"
                    \context FingeringVoice = "Contrabass 1 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Contrabass2
            \context StringPerformerStaffGroup = "Contrabass 2 Staff Group" <<
                \context BowingStaff = "Contrabass 2 Bowing Staff" <<
                    \context BowingVoice = "Contrabass 2 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Contrabass 2 Fingering Staff" <<
                    \clef "bass_8"
                    \context FingeringVoice = "Contrabass 2 Fingering Voice" {
                    }
                >>
            >>
        >>
    >>
>>

As a string quartet:

>>> template = templatetools.StringOrchestraScoreTemplate(
...     violin_count=2,
...     viola_count=1,
...     cello_count=1,
...     contrabass_count=0,
...     )
>>> score = template()
>>> print(format(score))
\context Score = "Score" <<
    \tag #'(Violin1 Violin2 Viola Cello)
    \context TimeSignatureContext = "TimeSignatureContext" {
    }
    \context StaffGroup = "Outer Staff Group" <<
        \context ViolinStaffGroup = "Violin Staff Group" <<
            \tag #'Violin1
            \context StringPerformerStaffGroup = "Violin 1 Staff Group" <<
                \context BowingStaff = "Violin 1 Bowing Staff" <<
                    \context BowingVoice = "Violin 1 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 1 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 1 Fingering Voice" {
                    }
                >>
            >>
            \tag #'Violin2
            \context StringPerformerStaffGroup = "Violin 2 Staff Group" <<
                \context BowingStaff = "Violin 2 Bowing Staff" <<
                    \context BowingVoice = "Violin 2 Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Violin 2 Fingering Staff" <<
                    \clef "treble"
                    \context FingeringVoice = "Violin 2 Fingering Voice" {
                    }
                >>
            >>
        >>
        \context ViolaStaffGroup = "Viola Staff Group" <<
            \tag #'Viola
            \context StringPerformerStaffGroup = "Viola Staff Group" <<
                \context BowingStaff = "Viola Bowing Staff" <<
                    \context BowingVoice = "Viola Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Viola Fingering Staff" <<
                    \clef "alto"
                    \context FingeringVoice = "Viola Fingering Voice" {
                    }
                >>
            >>
        >>
        \context CelloStaffGroup = "Cello Staff Group" <<
            \tag #'Cello
            \context StringPerformerStaffGroup = "Cello Staff Group" <<
                \context BowingStaff = "Cello Bowing Staff" <<
                    \context BowingVoice = "Cello Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Cello Fingering Staff" <<
                    \clef "bass"
                    \context FingeringVoice = "Cello Fingering Voice" {
                    }
                >>
            >>
        >>
    >>
>>

As a cello solo:

>>> template = templatetools.StringOrchestraScoreTemplate(
...     violin_count=0,
...     viola_count=0,
...     cello_count=1,
...     contrabass_count=0,
...     )
>>> score = template()
>>> print(format(score))
\context Score = "Score" <<
    \tag #'(Cello)
    \context TimeSignatureContext = "TimeSignatureContext" {
    }
    \context StaffGroup = "Outer Staff Group" <<
        \context CelloStaffGroup = "Cello Staff Group" <<
            \tag #'Cello
            \context StringPerformerStaffGroup = "Cello Staff Group" <<
                \context BowingStaff = "Cello Bowing Staff" <<
                    \context BowingVoice = "Cello Bowing Voice" {
                    }
                >>
                \context FingeringStaff = "Cello Fingering Staff" <<
                    \clef "bass"
                    \context FingeringVoice = "Cello Fingering Voice" {
                    }
                >>
            >>
        >>
    >>
>>

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.StringOrchestraScoreTemplate.StringOrchestraScoreTemplate" [color=black, fontcolor=white, group=2, label=<<B>StringOrchestraScoreTemplate</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.StringOrchestraScoreTemplate.StringOrchestraScoreTemplate"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

cello_count Number of cellos in string orchestra.
context_name_abbreviations Voice name abbreviations.
contrabass_count Number of contrabasses in string orchestra.
split_hands Is true if each performer’s hand receives a separate staff.
use_percussion_clefs Is true if each staff should use a percussion clef rather than the normal clef for that instrument.
viola_count Number of violas in string orcestra.
violin_count Number of violins in string orchestra.
__call__() Calls string orchestra template.
__copy__(\*args) Copies Abjad value object.
__eq__(expr) Is true when all initialization values of Abjad value object equal the initialization values of expr.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes Abjad value object.
__ne__(expr) Is true when Abjad object does not equal expr.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

StringOrchestraScoreTemplate.cello_count

Number of cellos in string orchestra.

Returns nonnegative integer.

StringOrchestraScoreTemplate.context_name_abbreviations

Voice name abbreviations.

StringOrchestraScoreTemplate.contrabass_count

Number of contrabasses in string orchestra.

Returns nonnegative integer.

StringOrchestraScoreTemplate.split_hands

Is true if each performer’s hand receives a separate staff.

StringOrchestraScoreTemplate.use_percussion_clefs

Is true if each staff should use a percussion clef rather than the normal clef for that instrument.

StringOrchestraScoreTemplate.viola_count

Number of violas in string orcestra.

Returns nonnegative integer.

StringOrchestraScoreTemplate.violin_count

Number of violins in string orchestra.

Returns nonnegative integer.

Special methods

StringOrchestraScoreTemplate.__call__()

Calls string orchestra template.

Returns score.

(AbjadValueObject).__copy__(*args)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(expr)

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

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__(expr)

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

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.