Note names through plugins

• Feb 4, 2010 - 14:39

Hi,

I tried to see if the issue has been already raised but I did find nothing. This is an issue which also raises some requests...

Stable version 0.9.5 (under Windows XP SP3, but this is probably irrelevant): In a plugin script, when retrieving the name of a note (via the Note.name property) which has enharmonic alternatives, the name returned does not represent the actual note but is fixed. I mean: both a C# and a Db are given a name "c#". Same for other common or less common cases (Dbb is always named "c"; E## is always named "f#" and so on).

Also: in the .mscx files, the enharmonic alternative actually used for a note IS stored under the tag <tpc> (which gives, I think, the position in the circle of the fifths, from Fbb = -1 to B## = 33). I could be VERY useful for a plugin script to have access to this tag, in order to exactly know the kind of note intended by the user.

Finally: it would be also VERY useful to have access, through an equivalent property of the Note object, to the <userAccidental> tag, as this seems the only way to access microtonal info of the score via a script.

Thanks,

M.


Comments

I have also looked at plugin development and as far as I understand from the documentation, note.name is supposed to give access to the enharmonic name (what's in the tag, I guess, although I don't know the mcsx format). So that might be a bug.
Also, by using "H" instead of "B" for the note half a tone below "C", it is very clear that MuseScore has German roots :-) I don't mean by this that it should be changed, any convention is a good as the other, but you might want to add it to the documentation somewhere.

In reply to by johan

Thanks for the reply.

Version 0.9.5 definitely does not return the enharmonic name actually used in the score but a fixed name for each pitch. I tried the latest pre-release of 0.9.6 (r2674) but I cannot tell: a bug in the Chord object prevents accessing any Note object. It will be fixed of course, so it is only a matter of waiting.

This is a bit unfortunate: I have almost ready a plugin which reads (a subset of) the Scala files (see also this post ) and can apply temperaments distinguishing among all the 35 enharmonic steps of a tonal scale, but I cannot finish to test it until this issue is clarified.

M.

P.S.: I was also a bit surprised by the use of H but, as you say, a convention is just a convention (however, having the note names sorted alphabetically can be convenient, rather then stepping from A to H and then back to C...)

Do you still have an unanswered question? Please log in first to post your question.