Rest Object

Last updated 2012-03-17

Represents a rest, i.e. a silent constituent of a voice (opposed to Chord, which is made of notes).

A new Rest can be created with:
  rest = new Rest();
  rest = new Rest(score);
where score is a Score Object .

The Rest existing at a given time of a given voice of a given staff of a score can be obtained by moving a Cursor to the needed staff / voice / time and using:

   if ( cursor.isRest() )
      rest =;

See also:

Cursor Object , Harmony Object , Score Object .


Name Type Description
tickLen integer length of the rest; expressed in conventional units (see Tick Length values ).


addHarmony(Harmony harmony)

Add the Harmony harmony to the staff point corresponding to the rest.