NoteMaker

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.core" { graph [label="abjad.core"]; node [color=1]; "abjad.core.NoteMaker.NoteMaker" [URL="../api/abjad/core/NoteMaker.html#abjad.core.NoteMaker.NoteMaker", color=black, fontcolor=white, label="Note\nMaker", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/core/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjad/core/../system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } 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.AbjadValueObject.AbjadValueObject" -> "abjad.core.NoteMaker.NoteMaker"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.core.NoteMaker.NoteMaker(decrease_monotonic=True, repeat_ties=False)

Note-maker.

Makes notes according to pitches and durations.

Cycles through pitches when the length of pitches is less than the length of durations:

>>> maker = abjad.NoteMaker()
>>> notes = maker([0], [(1, 16), (1, 8), (1, 8)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Cycles through durations when the length of durations is less than the length of pitches:

>>> maker = abjad.NoteMaker()
>>> notes = maker(
...     [0, 2, 4, 5, 7],
...     [(1, 16), (1, 8), (1, 8)],
...     )
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Creates ad hoc tuplets for nonassignable durations:

>>> maker = abjad.NoteMaker()
>>> notes = maker([0], [(1, 16), (1, 12), (1, 8)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Set decrease_monotonic=True to express tied values in decreasing duration:

>>> maker = abjad.NoteMaker(decrease_monotonic=True)
>>> notes = maker([0], [(13, 16)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Set decrease_monotonic=False to express tied values in increasing duration:

>>> maker = abjad.NoteMaker(decrease_monotonic=False)
>>> notes = maker([0], [(13, 16)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Uses repeat ties:

>>> maker = abjad.NoteMaker(repeat_ties=True)
>>> notes = maker([0], [(13, 16)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Works with pitch segments:

>>> maker = abjad.NoteMaker()
>>> segment = abjad.PitchSegment([-2, -1.5, 6, 7, -1.5, 7])
>>> notes = maker(segment, [(1, 8)])
>>> staff = abjad.Staff(notes)
>>> abjad.show(staff) 

Set pitches to a single pitch or a sequence of pitches.

Set durations to a single duration or a list of durations.

Returns selection.


Attributes Summary

__call__ Calls note-maker on pitches and durations.
decrease_monotonic Is true when durations decrease monotonically.
repeat_ties Is true when ties are repeat ties.

Special methods

__call__(pitches, durations)

Calls note-maker on pitches and durations.

Returns selection.

(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).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

decrease_monotonic

Is true when durations decrease monotonically.

Returns true, false or none.

repeat_ties

Is true when ties are repeat ties.

Return type:Optional[bool]