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_abjadext.nauert.qeventproxy" { graph [label="abjadext.nauert.qeventproxy"]; node [color=1]; "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=2]; "builtins.object" [URL="https://docs.python.org/3.10/library/functions.html#object", label=object, target=_top]; } "builtins.object" -> "abjadext.nauert.qeventproxy.QEventProxy"; }


Classes

QEventProxy

Q-event proxy.

class abjadext.nauert.qeventproxy.QEventProxy(q_event=None, *offsets)[source]

Q-event proxy.

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

>>> q_event = nauert.PitchedQEvent(130, [0, 1, 4])
>>> nauert.QEventProxy(q_event, 0.5)
QEventProxy(q_event=PitchedQEvent(offset=Offset((130, 1)), pitches=(NamedPitch("c'"), NamedPitch("cs'"), NamedPitch("e'")), index=None, attachments=()), offset=Offset((1, 2)))

Not composer-safe.

Used internally by the quantize function.


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.

__hash__

Hashes q-event proxy.

__repr__

Gets repr.

index

Index of q-event proxy.

offset

Offset of q-event proxy.

q_event

Q-event of q-event proxy.


Special methods

overridden __eq__(argument)[source]

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

Return type:

bool

overridden __hash__()[source]

Hashes q-event proxy.

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

Return type:

int

overridden __repr__()[source]

Gets repr.


Read-only properties

index

Index of q-event proxy.

offset

Offset of q-event proxy.

q_event

Q-event of q-event proxy.