Simultaneous

Simultaneous(
    type: EdgeType,
    origin: EdgeOrigin = EdgeOrigin.ASSERTED,
    anchor: TimingAnchor = TimingAnchor.ONSET,
    displacement: Duration | None = None,
)

A pin between events of two independent lines: this happens when that does (give or take the displacement). Symmetric in meaning, stored directed.

A pin asserts nothing about who performs either line; span walks never cross one.

>>> from openmusickit.systems.wsmn.temporal.symbols import quarter
>>> early = Simultaneous(displacement=-quarter)
>>> early.type, early.anchor, early.displacement
(<EdgeType.SIMULTANEOUS: 'simultaneous'>, <TimingAnchor.ONSET: 'onset'>, MetricalDuration(-1, 4))
>>> early
Simultaneous(anchor=onset, displacement=MetricalDuration(-1, 4))

Attributes

Name Description
origin
meta
id
anchor
displacement
type

Methods

Name Description
__repr__
nudge Nudges the displacement of this edge in the specified direction by the specified amount.

__repr__

__repr__()

nudge

nudge(direction: NudgeDirection, amount: Duration)

Nudges the displacement of this edge in the specified direction by the specified amount.

The displacement is a signed Duration: negative means the target starts before the anchor.

>>> from openmusickit.systems.wsmn.temporal.symbols import quarter, half
>>> edge = Branch()
>>> edge.nudge(NudgeDirection.FORWARD, quarter)
>>> edge.nudge(NudgeDirection.BACKWARD, half)
>>> edge.displacement
MetricalDuration(-1, 4)

Raises

Name Type Description
TemporalCompatibilityError if amount belongs to a different temporal system than the current displacement.