Previous | Up | Home | Next

Measurement Units and Coordinate System.


NIFF's measurement system is designed:

  1. to allow enough flexibility to accommodate page-oriented notation programs, non-page-oriented notation programs and scanning programs,
  2. to allow a fine enough resolution to describe high-quality printed music,
  3. to use integers rather than floating point numbers, for the purpose of avoiding rounding errors and incompatibility among platforms, and
  4. to describe each size and position measurement in a way that is semantically useful.

In addition, an attempt has been made to limit rounding errors during translation between the reading and writing programs' measurement units. For this reason, each writing program has its choice of units for absolute measurements.

Absolute Units and Staff Steps

NIFF uses two different measurement systems - absolute units and staff steps.

Absolute units are the writing program's own choice of units, declared in the Setup Section NIFF Information chunk. The unit choice is expressed in two field values: the standard unit (inches, centimeters, or points), and the number of absolute units per standard unit. For example, if the resolution used by the writing program were 4000 dots per inch, the writing program would choose a standard unit of "inches" and the number of absolute units per standard unit would be 4000.

The placement of a symbol whose meaning depends on its vertical position on a staff line or space is given as a staff step. The origin of the staff step system is the bottom line, which is given the value zero. Step numbers increase by one for each successive line or space in an upward direction from the origin. Negative numbers are used for the spaces and ledger lines below the origin.

Measurements and symbol placement are discussed in detail in the Symbol Relationships section below.

Page Coordinate System.

The size of a page is given as its height and width in absolute units. The origin of the page's coordinate system is the top left corner of the page (as in the lower right quadrant of a Cartesian coordinate system). Measurements are increasingly positive to the right and towards the bottom of the page.

The origin of a staff is the left end of its top line. The origin of a system is the staff origin of its top staff.

Font size.

The size of text fonts is given in twips. (One twip = 1/20 of a point, or 1/1440 of an inch.) This allows for scaling of fonts between point sizes, for those who can use this feature (e.g. a 210 twip font = a 10 1/2 point font).

The size of music fonts is described in two different ways: font size (in twips) and space height (in absolute units). Since there is no agreement on the meaning of font size between different music fonts, the space height is intended to provide a clue about the intended size of the symbols on a standardized scale. It is equal to the vertical distance in absolute units between two adjacent staff lines of a staff on which the music font symbols would appear of normal size.

Previous | Up | Home | Next