PartManifest

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.segments" { graph [label="abjad.segments"]; node [color=1]; "abjad.segments.PartManifest.PartManifest" [URL="../api/abjad/segments/PartManifest.html#abjad.segments.PartManifest.PartManifest", color=black, fontcolor=white, label="Part\nManifest", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/segments/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.segments.PartManifest.PartManifest"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.segments.PartManifest.PartManifest(*arguments)

Part manifest.

Initializes from parts:

>>> part_manifest = abjad.PartManifest(
...    abjad.Part(section='BassClarinet', section_abbreviation='BCL'),
...    abjad.Part(section='Violin', section_abbreviation='VN'),
...    abjad.Part(section='Viola', section_abbreviation='VA'),
...    abjad.Part(section='Cello', section_abbreviation='VC'),
...    )
>>> len(part_manifest)
4

Initializes from orchestra sections:

>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> len(part_manifest)
44

Attributes Summary

__iter__ Iterates parts in manifest.
__len__ Gets number of parts in manifest.
expand Expands part_assignment.
parts Gets parts in manifest.
sections Gets sections in manifest.

Special methods

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

__iter__()

Iterates parts in manifest.

>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> for part in part_manifest:
...     part
...
Part(instrument='Flute', member=1, number=1, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=2, number=2, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=3, number=3, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=4, number=4, section='Flute', section_abbreviation='FL')
Part(instrument='Oboe', member=1, number=5, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=2, number=6, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=3, number=7, section='Oboe', section_abbreviation='OB')
Part(instrument='EnglishHorn', number=8, section='EnglishHorn', section_abbreviation='EH')
Part(instrument='Violin', member=1, number=9, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=2, number=10, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=3, number=11, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=4, number=12, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=5, number=13, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=6, number=14, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=7, number=15, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=8, number=16, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=9, number=17, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=10, number=18, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=11, number=19, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=12, number=20, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=13, number=21, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=14, number=22, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=15, number=23, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=16, number=24, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=17, number=25, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=18, number=26, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=1, number=27, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=2, number=28, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=3, number=29, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=4, number=30, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=5, number=31, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=6, number=32, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=7, number=33, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=8, number=34, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=9, number=35, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=10, number=36, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=11, number=37, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=12, number=38, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=13, number=39, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=14, number=40, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=15, number=41, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=16, number=42, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=17, number=43, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=18, number=44, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Return type:Iterator[+T_co]
__len__()

Gets number of parts in manifest.

>>> part_manifest = abjad.PartManifest(
...    abjad.Part(section='BassClarinet', section_abbreviation='BCL'),
...    abjad.Part(section='Violin', section_abbreviation='VN'),
...    abjad.Part(section='Viola', section_abbreviation='VA'),
...    abjad.Part(section='Cello', section_abbreviation='VC'),
...    )
>>> len(part_manifest)
4
>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> len(part_manifest)
44
Return type:int
(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Methods

expand(part_assignment)

Expands part_assignment.

>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> part_assignment = abjad.PartAssignment('Oboe')
>>> for part in part_manifest.expand(part_assignment):
...     part
...
Part(instrument='Oboe', member=1, number=5, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=2, number=6, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=3, number=7, section='Oboe', section_abbreviation='OB')

Read-only properties

parts

Gets parts in manifest.

>>> part_manifest = abjad.PartManifest(
...    abjad.Part(section='BassClarinet', section_abbreviation='BCL'),
...    abjad.Part(section='Violin', section_abbreviation='VN'),
...    abjad.Part(section='Viola', section_abbreviation='VA'),
...    abjad.Part(section='Cello', section_abbreviation='VC'),
...    )
>>> for part in part_manifest:
...     part
...
Part(instrument='BassClarinet', number=1, section='BassClarinet', section_abbreviation='BCL')
Part(instrument='Violin', number=2, section='Violin', section_abbreviation='VN')
Part(instrument='Viola', number=3, section='Viola', section_abbreviation='VA')
Part(instrument='Cello', number=4, section='Cello', section_abbreviation='VC')
>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> for part in part_manifest.parts:
...     part
...
Part(instrument='Flute', member=1, number=1, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=2, number=2, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=3, number=3, section='Flute', section_abbreviation='FL')
Part(instrument='Flute', member=4, number=4, section='Flute', section_abbreviation='FL')
Part(instrument='Oboe', member=1, number=5, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=2, number=6, section='Oboe', section_abbreviation='OB')
Part(instrument='Oboe', member=3, number=7, section='Oboe', section_abbreviation='OB')
Part(instrument='EnglishHorn', number=8, section='EnglishHorn', section_abbreviation='EH')
Part(instrument='Violin', member=1, number=9, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=2, number=10, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=3, number=11, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=4, number=12, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=5, number=13, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=6, number=14, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=7, number=15, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=8, number=16, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=9, number=17, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=10, number=18, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=11, number=19, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=12, number=20, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=13, number=21, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=14, number=22, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=15, number=23, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=16, number=24, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=17, number=25, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=18, number=26, section='FirstViolin', section_abbreviation='VN-1', zfill=2)
Part(instrument='Violin', member=1, number=27, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=2, number=28, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=3, number=29, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=4, number=30, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=5, number=31, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=6, number=32, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=7, number=33, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=8, number=34, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=9, number=35, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=10, number=36, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=11, number=37, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=12, number=38, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=13, number=39, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=14, number=40, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=15, number=41, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=16, number=42, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=17, number=43, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
Part(instrument='Violin', member=18, number=44, section='SecondViolin', section_abbreviation='VN-2', zfill=2)
>>> abjad.Part(section='FirstViolin', member=18) in part_manifest.parts
True
>>> abjad.Part(section='FirstViolin', member=19) in part_manifest.parts
False
Return type:List[Part]
sections

Gets sections in manifest.

>>> part_manifest = abjad.PartManifest(
...    abjad.Part(section='BassClarinet', section_abbreviation='BCL'),
...    abjad.Part(section='Violin', section_abbreviation='VN'),
...    abjad.Part(section='Viola', section_abbreviation='VA'),
...    abjad.Part(section='Cello', section_abbreviation='VC'),
...    )
>>> part_manifest.sections
[]
>>> part_manifest = abjad.PartManifest(
...    abjad.Section(
...         abbreviation='FL',
...         count=4,
...         name='Flute',
...         ),
...    abjad.Section(
...         abbreviation='OB',
...         count=3,
...         name='Oboe',
...         ),
...    abjad.Part(
...         section_abbreviation='EH',
...         section='EnglishHorn',
...         ),
...    abjad.Section(
...         abbreviation='VN-1',
...         count=18,
...         instrument='Violin',
...         name='FirstViolin',
...         ),
...    abjad.Section(
...         abbreviation='VN-2',
...         count=18,
...         instrument='Violin',
...         name='SecondViolin',
...         ),
...    )
>>> for section in part_manifest.sections:
...     section
...
Section(abbreviation='FL', count=4, instrument='Flute', name='Flute')
Section(abbreviation='OB', count=3, instrument='Oboe', name='Oboe')
Section(abbreviation='VN-1', count=18, instrument='Violin', name='FirstViolin')
Section(abbreviation='VN-2', count=18, instrument='Violin', name='SecondViolin')
>>> section = abjad.Section(
...     abbreviation='VN-1',
...     count=18,
...     instrument='Violin',
...     name='FirstViolin',
...     )
>>> section in part_manifest.sections
True
>>> section = abjad.Section(
...     abbreviation='VN-1',
...     count=36,
...     instrument='Violin',
...     name='FirstViolin',
...     )
>>> section in part_manifest.sections
False
Return type:List[Section]