Score Example 0001-01

Each line of numeric data represents a graphical musical object. Data in this format is called PMX (parameter matrix) data. The first number on the line (called P1, for "parameter 1") indicates the type of object:

 1 = Note 2 = Rest 3 = Clef 5 = Slur
 6 = Beam 9 = Graphical object 14 = Barline 16 = Time signature

The next three parameters on each line (P2, P3 & P4) have a fixed meaning for all objects:

 P2 = Staff number. Each staff on the page is numbered from 1 on the bottom of the page. Since there is only one staff, all objects are placed on staff 1 in the above PMX data. P3 = Horizontal position. The left margin is 0.0 and the right margin is 200.0. Notice that the above PMX data is sorted by the P3 column which represents the music from left to right. P4 = Vertical position. The bottom line of a staff is 3, each space or line above that increments by one: P4 position Vertical P4=1 2 3 4 5 6 7 8 9 10 11 12 13 0 -1 -2 -3 -4

The meaning of parameter 5 and higher depends on the type of object specified in P1. For beams and slurs and other objects which are described by a starting point and an ending point, P5 represents the vertical position of the right side of the object and P6 represents the horizontal position of the right side of the object. For notes, P5 represents multiple sub-parameters which are stored in the 100's, 10's, 1's, and fractional digits of the P5 number:

Higher parameters have less in common between different objects types. For example P11 for slurs represents dashing, for beams it represents the left horizontal position of secondary beams, and for notes P11 represents the type of articulation attached to the note:

Exercises

1. Change the meter from 3/4 to 6/8.
2. Remove all slurs.
3. Put fermata on the last note (P11=14). Put a fermata under the last note (P11=-14). Put a fermata over the final barline (P8=-1).
4. Remove the beams and replace with flags on the note stems (P9=1).
5. Move the first note up an octave and flip the stem direction on the note.
6. Change the first dynamic to f and add a p dynamic under the last note.

Contrasting with PMX data which would be difficult for people to type in directly, The same music can be expressed as a user-input macro:

Input data consists of five stages, each ending in a semi-colon (;):

1. Note pitches, barlines, clefs, key and time signatures.
tr/3 4/e4/m/c5/pa/m/f/d/m/b/b/c/d/e/m/c/a/eu/m/cu/a/m/f/e/ds/m/d/e/fs/d/m/e/r/ml;
 tr Treble clef 3 4 3/4 time signature e4 E4 pitch, where C4 is middle C. m barline (measure). c5 C5 pitch, an octave above middle C. pa The p prefix means switch from the octave mode of pitch selection to the proximity mode. In proximity mode, the octave of the pitch (a in this case) is decided by which A above or below the previous note (C5) is closer to C5. In this case A4 is closer to C5, so the final pitch is A4. c5 F4. Proximity mode is still active (prefix a pitch with o to switch back to octave mode), and F4 is the closest F to A4. eu Using e by itself would select E3 since proximity mode is still active. To temporarily override the octave selection (both in proximity and octave modes), post fix u to indicate that the current pitch is above (up) the previous pitch. fs F-sharp. r Rest. ml Measure Left: a barline with repeat sign on its left side.
2. Note durations. z[q/h/q/h/q/q/ex4/q/q]/@z; This example contains two data-entry shortcuts: an expansion macro and an element multiplier. Both of these shortcuts can be used in the pitch stage of music entry as well.
 z[...] Define an expansion macro (and apply it the first time). The contents within [] can be repeated by using @z. Up to 26 macro expansions can be defined at any time, using any letter for the macro name. @z Apply the z macro a second time. q Quarter note (4 is equivalent to q). h Half note (2 is equivalent to h). ex4 Insert four e rhythms (eighth notes, equivalent to 8). Expands to e/e/e/e/ which is the same as 8/8/8/8/ or 8x4.
3. Marks. p 1; place a piano dyanmic under the first note on the line of music.
4. Beams. 2b; This is automatic beaming: beam notes by quarter notes (2 eighth notes). Beams can also be created by explicitly listing the starting and ending note, similar to the slur stage.
5. Slurs. 2 3/4 5/7 10/11 12/14 15/16 17/19 22; Place a slur from note 2 to 3, 4 to 45, 7 to 10, etc.

Notice in the previous example that the notes are not very well spaced. By default, the notes are spaced according to their durations without consideration for other musical elements such as barlines or accidentals when entered in User Input mode. Use the LJ command to space the music properly on the line.

Exercises

1. Change the meter from 3/4 to 6/8.
2. Remove all slurs.
3. Put fermata on the last note (mark stage: FE). Put a fermata under the last note (-FE).
4. Remove the beams.
5. Move the first note up an octave.
6. Change the first dynamic to f and add a p dynamic under the last note.

Object data can be arranged into any order. Objects will be printed in the order in which they occur. Here is an example of sorting by P1 codes (object type) rather than by P3 (horizontal position):

```

```