setDuration()
Set how long the note lasts in the written score.
note.setDuration(duration)
The note's length is adjusted to keep the same proportion to the duration.
Parameters
note.setDuration(duration)
| Parameter | Type | Default | Description |
|---|---|---|---|
duration |
int or float |
required | The new duration, as a float where 1.0 is a quarter note. |