Rest Object

עודכן לפני 4 שנים

This documentation applies to plugins for 1.x only!


Documentation for 2.x+ is built into the Plugin Creator of Musescore.

( ⇒ In Musescore press Ctrl+Shift+P, then F1 to bring it up. )


Click here for Documentation for 3.x



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();
or
  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 = cursor.rest();

See also:

Cursor Object , Harmony Object , Score Object .

Properties

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

Methods

addHarmony(Harmony harmony)

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