Plugin - Note object: tied property is reversed / userAccidental is partial

• Feb 24, 2010 - 20:26
Type
Plugins
Severity
S4 - Minor
Status
closed
Project

In the scripting object Note:
A) tied property return values 1 and 2 are exchanged with respect to the README.scripts documentation (and to the values which make more sense...).

B) userAccidental property only returns 'special' accidentals (quarter-tone); for any other it returns 0. While this matches the <userAccidental> tag of the .mscx file format, it makes unnecessary complex to determine the note accidental (of whatever type). I suggest to change the property into accidental and returns the accidental type value.

The attached ZIP contained an edited version of the scnote.cpp file implementing the two changes above (the property accidental can be written to, but only the userAccidental internal value is changed) Each edited point is clearly marked by comments.

Thanks,

M.

Attachment Size
scnote.zip 2.21 KB

Comments

I fixed the tie part of the bug.
Regarding the accidentals, I'm not sure how to proceed. I guess we should be able to get and set all accidentals from the plugin framework.

Accidentals are set automatically by MuseScore depending on the tonal pitch class (tpc) of a note and the measure context. An explicit set accidental (userAccidental) overrides the automatic accidentals but does not influence playback or the measure context.

Werner,

Thank you for the explanation about the difference between the accidental and userAccidental concepts. And, yes, the bug part is fixed indeed (thanks, lasconic).

Probably it would be nice to have the possibility to act on accidentals from a plugin, but this is more on the feature request side. I'll try to see if I can come out with a proposal, but all my setup is falling apart! First the problems with SVN, now Qt Creator crashes as soon I load any project: I need an exorcist...

Thanks,

M.