Cursor can be used by plugins to manipulate the score.
More...
Cursor can be used by plugins to manipulate the score.
◆ RewindMode
| Enumerator |
|---|
| SCORE_START | Rewind to the start of a score.
|
| SELECTION_START | Rewind to the start of a selection.
|
| SELECTION_END | Rewind to the end of a selection.
|
◆ add()
Adds the given element to a score at this cursor's position.
◆ addNote()
| void addNote |
( |
int |
pitch | ) |
|
Adds a note to the current cursor position.
The duration of the added note equals to what has been set by the previous setDuration() call.
- Parameters
-
| pitch | MIDI pitch of the added note. |
◆ next()
Move the cursor to the next segment.
- Returns
false if the end of the score is reached, true otherwise.
◆ nextMeasure()
Move the cursor to the first segment of the next measure.
- Returns
false if the end of the score is reached, true otherwise.
◆ rewind()
Rewind cursor to a certain position.
- Parameters
-
| mode | Determines the position where to move this cursor. See Cursor::RewindMode to see the list of avaliable rewind modes. |
- Note
- In MuseScore 2.X, this function took an integer value (0, 1 or 2) as its parameter. For compatibility reasons, the old values are still working, but it is recommended to use RewindMode enumerators instead.
◆ setDuration()
| void setDuration |
( |
int |
z, |
|
|
int |
n |
|
) |
| |
Set duration of the notes added by the cursor.
- Parameters
-
| z | numerator |
| n | denominator. If n == 0, sets duration to a quarter. |
- See also
- addNote()
◆ filter
◆ keySignature
Key signature of current staff at tick pos.
(read only)
The documentation for this class was generated from the following files:
- mscore/plugin/api/cursor.h
- mscore/plugin/api/cursor.cpp