CompositeMusicSpecifier

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_builtins { graph [label=builtins]; node [color=1]; "builtins.object" [URL="https://docs.python.org/3.7/library/functions.html#object", label=object, target=_top]; } subgraph cluster_tsmakers { graph [label=tsmakers]; node [color=2]; "tsmakers.CompositeMusicSpecifier.CompositeMusicSpecifier" [URL="../api/tsmakers/CompositeMusicSpecifier.html#tsmakers.CompositeMusicSpecifier.CompositeMusicSpecifier", color=black, fontcolor=white, label="Composite\nMusic\nSpecifier", target=_top]; "tsmakers.HashCachingObject.HashCachingObject" [URL="../api/tsmakers/HashCachingObject.html#tsmakers.HashCachingObject.HashCachingObject", label="Hash\nCaching\nObject", target=_top]; "tsmakers.HashCachingObject.HashCachingObject" -> "tsmakers.CompositeMusicSpecifier.CompositeMusicSpecifier"; } "builtins.object" -> "tsmakers.HashCachingObject.HashCachingObject"; }

class tsmakers.CompositeMusicSpecifier.CompositeMusicSpecifier(discard_inner_offsets=None, primary_music_specifier=None, primary_voice_name=None, rotation_indices=None, secondary_music_specifier=None, secondary_voice_name=None)[source]

A composite music specifier.

>>> music_specifier = tsmakers.CompositeMusicSpecifier(
...     primary_music_specifier="one",
...     primary_voice_name="A",
...     rotation_indices=(0, 1, -1),
...     secondary_voice_name="B",
...     secondary_music_specifier=tsmakers.MusicSpecifierSequence(
...         application_rate="phrase",
...         music_specifiers=("two", "three", "four"),
...     ),
... )
>>> durations = [1, 2]
>>> timespans = music_specifier(
...     durations=durations,
...     layer=1,
... )
>>> ts_list = abjad.TimespanList(
...     [
...         abjad.AnnotatedTimespan(
...             start_offset=_.start_offset,
...             stop_offset=_.stop_offset,
...             annotation=_.voice_name,
...         )
...         for _ in timespans
...     ]
... )
>>> abjad.show(ts_list, scale=0.5, key="annotation")  
>>> durations = [1, 2]
>>> timespans = music_specifier(
...     durations=durations,
...     layer=2,
...     seed=1,
... )
>>> ts_list = abjad.TimespanList(
...     [
...         abjad.AnnotatedTimespan(
...             start_offset=_.start_offset,
...             stop_offset=_.stop_offset,
...             annotation=_.voice_name,
...         )
...         for _ in timespans
...     ]
... )
>>> abjad.show(ts_list, scale=0.5, key="annotation")  
>>> durations = [1, 2]
>>> timespans = music_specifier(
...     durations=durations,
...     layer=3,
...     padding=1,
...     seed=2,
... )
>>> ts_list = abjad.TimespanList(
...     [
...         abjad.AnnotatedTimespan(
...             start_offset=_.start_offset,
...             stop_offset=_.stop_offset,
...             annotation=_.voice_name,
...         )
...         for _ in timespans
...     ]
... )
>>> abjad.show(ts_list, scale=0.5, key="annotation")  

Attributes Summary

__call__

Call self as a function.

discard_inner_offsets

primary_music_specifier

primary_voice_name

rotation_indices

secondary_music_specifier

secondary_voice_name


Special methods

overridden __call__(durations=None, layer=None, division_masks=None, division_mask_seed=None, padding=None, seed=None, start_offset=None, timespan_specifier=None, voice_name=None)[source]

Call self as a function.

(HashCachingObject).__eq__(expr)

Return self==value.

(HashCachingObject).__format__(format_specification='')

Default object formatter.

(HashCachingObject).__hash__()

Return hash(self).

(HashCachingObject).__repr__()

Return repr(self).

(HashCachingObject).__str__()

Return str(self).


Read-only properties

discard_inner_offsets
primary_music_specifier
primary_voice_name
rotation_indices
secondary_music_specifier
secondary_voice_name