MNX example: Rest positions | MNX specification

# Rest positions

You can optionally encode the vertical position of a rest — a situation that is most often encountered in multivoice music — by using "staffPosition" within the "rest" object. In this example, the rests are positioned slightly above, to make room for the bottom voice; this is staff position 2.

{ "mnx": { "version": 1 }, "global": { "measures": [ { "time": { "count": 4, "unit": 4 } } ] }, "parts": [ { "measures": [ { "clefs": [ { "clef": { "sign": "G", "staffPosition": -2 } } ], "sequences": [ { "content": [ { "duration": { "base": "quarter" }, "notes": [ { "pitch": { "octave": 5, "step": "E" } } ] }, { "duration": { "base": "quarter" }, "rest": { "staffPosition": 2 } }, { "id": "ev3", "duration": { "base": "eighth" }, "notes": [ { "pitch": { "octave": 5, "step": "F" } } ] }, { "id": "ev4", "duration": { "base": "eighth" }, "notes": [ { "pitch": { "octave": 5, "step": "E" } } ] }, { "duration": { "base": "quarter" }, "rest": { "staffPosition": 2 } } ] }, { "content": [ { "duration": { "base": "quarter" }, "notes": [ { "pitch": { "octave": 4, "step": "C" } } ] }, { "duration": { "base": "quarter" }, "notes": [ { "pitch": { "octave": 4, "step": "E" } } ] }, { "duration": { "base": "quarter" }, "notes": [ { "pitch": { "octave": 4, "step": "D" } } ] }, { "duration": { "base": "quarter" }, "notes": [ { "pitch": { "octave": 4, "step": "C" } } ] } ] } ] } ] } ] }