QEventProxy

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.QEventProxy.QEventProxy" [URL="../api/abjadext/nauert/QEventProxy.html#abjadext.nauert.QEventProxy.QEventProxy", color=black, fontcolor=white, label="QEvent\nProxy", 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" -> "abjadext.nauert.QEventProxy.QEventProxy"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.nauert.QEventProxy.QEventProxy(*arguments)

Q-event proxy.

Maps Q-event offset with the range of its beatspan to the range 0-1.

>>> q_event = abjadext.nauert.PitchedQEvent(130, [0, 1, 4])
>>> proxy = abjadext.nauert.QEventProxy(q_event, 0.5)
>>> abjad.f(proxy)
abjadext.nauert.QEventProxy(
    abjadext.nauert.PitchedQEvent(
        offset=abjad.Offset(130, 1),
        pitches=(
            abjad.NamedPitch("c'"),
            abjad.NamedPitch("cs'"),
            abjad.NamedPitch("e'"),
            ),
        ),
    abjad.Offset(1, 2)
    )

Not composer-safe.

Used internally by Quantizer.


Attributes Summary

__eq__ Is true when argument is a q-event proxy with offset and q-event equal to those of this q-event proxy.
__format__ Formats q-event.
__hash__ Hashes q-event proxy.
index Index of q-event proxy.
offset Offset of q-event proxy.
q_event Q-event of q-event proxy.

Special methods

__eq__(argument)

Is true when argument is a q-event proxy with offset and q-event equal to those of this q-event proxy. Otherwise false.

Returns true or false.

__format__(format_specification='')

Formats q-event.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

__hash__()

Hashes q-event proxy.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

index

Index of q-event proxy.

offset

Offset of q-event proxy.

q_event

Q-event of q-event proxy.