cursor.next() and nextMeasure()
Can anybody explain, please, why next plugin code
cursor.rewind(0); cursor.setDuration(1, 4); cursor.addNote(60);
cursor.next(); cursor.setDuration(1, 8); cursor.addNote(64);
cursor.next(); cursor.setDuration(1, 8); cursor.addNote(64);
generates such score (see image)?
It looks like last “next()” works like “nextMeasure()” isn’t it?
And what to do to add third note just after second?
Attachment | Size |
---|---|
cursor_next-1.JPG | 12.5 KB |
Comments
Try this:
{syntaxhighlighter JAVASCRIPT}
cursor.rewind(0);
cursor.setDuration(1, 4);
cursor.addNote(60);
cursor.setDuration(1, 8);
cursor.addNote(64);
cursor.addNote(64);
{/syntaxhighlighter}
Explanation of the behavior and the difference between next and nextMeasure just answered in https://musescore.org/en/node/97556#comment-433526