The staff position object | MNX specification

# The staff position object

Type: Number

Represents a vertical position in a staff, where 0 is the middle of the staff. This number is positive for positions above the middle of the staff, and it's negative for positions below the middle of the staff.

This value is expressed in "half staff spaces." In other words, the staff position values of two consecutive staff lines are always 2 apart. This allows both lines and spaces to be encoded with simple integer values.

For example: in a standard five-line staff, the middle line is position 0. The space directly above the middle line is position 1. The line directly above the middle line is position 2. The space directly below the middle line is position -1. The line directly below the middle line is position -2.

In a single-line staff, position 0 represents the line itself, position 1 represents the space directly above the line, and position -1 represents the space directly below the line.

In a two-line staff, position 0 represents the space between the two lines, position 1 represents the top line, and position -1 represents the bottom line.

## Parent objects

This object is used by the following parent objects:

- clef: "staffPosition"
- full measure rest: "staffPosition"
- kit component: "staffPosition"
- rest: "staffPosition"

## 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”