Add Rest
// Add rest.
builder.addRest(voiceId, restLength, restOptions?);
// Example: add quarter rest
builder.addRest(0, "4n");
Arguments:
-
voiceIdThere are 4 voice tracks:0,1,2and3. -
restLengthRest length (equal to note length) can be:"1n"(whole note),"2n"(half note), etc."4."(dotted quarter note),"4.."(double dotted quarter note), etc.
-
restOptions(optional) Rest options is object. All fields are optional.
{
staffPos: Note | string | number, // position on staff (e.g. "C4")
hide: boolean // invisible rest
}