Plugins cannot add notes

• Sep 1, 2014 - 12:15
Type
Plugins
Severity
S4 - Minor
Status
PR created
Project

There seem to be two different ways for a plugin to add a note, neither of which work currently:

1) Use cursor.addNote(pitch)
this either crashes or replaces whatever note already existed at the current cursor position.
(Use attached files 'addNoteProblem.mscz' and 'addNoteProblem.qml' for a demonstration)

2a) Use newElement, edit note
Setting the pitch property of a newly created Note object that has not yet been added to the score crashes. (See 'noteCrash.qml' for a demonstration.)

2b) Use newElement, add to chord and edit after adding to chord:
This works, but cannot be undone. Undo won't remove the added note but move it to a very distant pitch and tpc.
(Use attached files 'addNoteProblem.mscz' and 'addNoteUndoProblem.qml' for a demonstration)

Using 244f40d on Mac 10.9.4

Attachment Size
addNoteProblem.mscz 1.57 KB
addNoteProblem.qml 734 bytes
noteCrash.qml 226 bytes
addNoteUndoProblem.qml 887 bytes

Comments