MeasurewiseAttackPointOptimizer

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.system" { graph [label="abjad.system"]; node [color=1]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjadext/nauert/../../abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph "cluster_abjadext.nauert" { graph [label="abjadext.nauert"]; node [color=2]; "abjadext.nauert.AttackPointOptimizer.AttackPointOptimizer" [URL="../api/abjadext/nauert/AttackPointOptimizer.html#abjadext.nauert.AttackPointOptimizer.AttackPointOptimizer", label="Attack\nPoint\nOptimizer", shape=oval, style=bold, target=_top]; "abjadext.nauert.MeasurewiseAttackPointOptimizer.MeasurewiseAttackPointOptimizer" [URL="../api/abjadext/nauert/MeasurewiseAttackPointOptimizer.html#abjadext.nauert.MeasurewiseAttackPointOptimizer.MeasurewiseAttackPointOptimizer", color=black, fontcolor=white, label="Measurewise\nAttack\nPoint\nOptimizer", target=_top]; "abjadext.nauert.AttackPointOptimizer.AttackPointOptimizer" -> "abjadext.nauert.MeasurewiseAttackPointOptimizer.MeasurewiseAttackPointOptimizer"; } 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" -> "abjadext.nauert.AttackPointOptimizer.AttackPointOptimizer"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.nauert.MeasurewiseAttackPointOptimizer.MeasurewiseAttackPointOptimizer

Measurewise attack-point optimizer.

Attempts to optimize attack points in an expression with regard to the effective time signature of that expression.

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8 g'8 a'8 b'8 c''8")
>>> abjad.show(staff) 
>>> source_tempo = abjad.MetronomeMark((1, 4), 60)
>>> q_events = abjadext.nauert.QEventSequence.from_tempo_scaled_leaves(
...     staff[:],
...     tempo=source_tempo,
...     )
>>> target_tempo = abjad.MetronomeMark((1, 4), 54)
>>> q_schema = abjadext.nauert.MeasurewiseQSchema(
...     tempo=target_tempo,
...     )
>>> quantizer = abjadext.nauert.Quantizer()

Without the measure-wise attack-point optimizer:

>>> result = quantizer(
...     q_events,
...     q_schema=q_schema,
...     )
>>> abjad.show(result) 

With the measure-wise attack-point optimizer:

>>> optimizer = abjadext.nauert.MeasurewiseAttackPointOptimizer()
>>> result = quantizer(
...     q_events,
...     attack_point_optimizer=optimizer,
...     q_schema=q_schema,
...     )
>>> abjad.show(result) 

Only acts on measures.


Attributes Summary

__call__ Calls measurewise attack-point optimizer.

Special methods

__call__(argument)

Calls measurewise attack-point optimizer.

Returns none.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.