The event object | MNX specification

# The event object

Type: Dictionary

The event object represents a discrete period of time during which one or more notes are performed, or in which a rest occurs.

All events require a `value` attribute to provide their duration as a note value. This duration is implicitly multiplied by the current time modification ratio, as specified by the process of sequencing the content of the event’s containing element.

## Attributes

Name | Type | Required? | Description
--- | --- | --- | ---
duration | note value | Yes | The duration of this event.
fermata | fermata | No |
kitNotes | An array of kit note objects | No |
lyrics | lyrics | No | Lyrics for this event.
markings | event markings | No |
notes | An array of note objects | No |
orient | orientation | No | A specific orientation for this event. If not provided, the orientation is inherited from any ancestor element that specified it. If no ancestor did so, the orientation is determined automatically according to the implementation’s rendering rules.
rest | rest | No |
slurs | An array of slur objects | No |
staff | staff number | No | A specific staff index for this event. If not provided, the value is inherited from any ancestor element that specified it. If no ancestor did so, the value is determined automatically according to the implementation’s rendering rules. The primary purpose of this attribute is to override a default staff assignment at the sequence level — as in cross-staff keyboard notation.
stemDirection | stem direction | No | Whether the stem of the note(s) in this event is up or down. If not provided, this is left to consuming software to decide automatically.
type | The string `"event"` | No | Optional. "type" is used to disambiguate between different types of objects within a sequence, and "type" is assumed to be "event" if it's not explicitly specified.

Plus globally available attributes: _c, _x, id

## Parent objects

This object is used by the following parent objects:

- grace: "content"
- multi-note tremolo: "content"
- sequence: "content"

## Examples

This object is used in the following examples:

Accidentals, Articulations, Beams, Beams (across barlines), Beams (hooks), Beams (secondary beam breaks implied), Beams (secondary beam breaks), Beams (with inner grace notes), Clef changes, Dotted notes (augmentation dots), Dynamics, Full-measure rests, Grace note, Grace notes (beamed), Grand staff piano music, Jumps (D.S. al Fine), Jumps (Dal Segno), Key signatures, Lyric line metadata, Lyrics (basic), Lyrics (multi-line), Multimeasure rests, Multiple layouts, Multiple voices, Organ layout, Ottavas (8va), Parts, Repeats, Repeats (more than once repeated), Repeats (with alternate endings, advanced), Repeats (with alternate endings, simple), Repeats (with implied start repeat), Rest positions, Slurs, Slurs (for chords), Slurs (targeting specific notes), Tempo markings, Three-note chord and half rest, Tie targets, Ties, Time signature glyphs, Time signatures, Tremolos (multi-note), Tremolos (single-note), Tuplets, Two-bar C major scale, “Hello world”