Personally, for the plugin I'm working on (listing the measures with according 
to repeat list), what I'd need to have access to is :
        * The measure number  (variable _no)

        * The repeat list
        * The current tick position

        * Possibility to set the current tick position

This might imply to expose the current ScoreView object.


vgStef



________________________________
 De : Jörn Eichler <[email protected]>
À : [email protected] 
Envoyé le : mardi 2 Septembre 2014 5h18
Objet : [Mscore-developer] Plugin API: missing features
 

Hi!

The more I try to come up with a logical and clear way of describing what's 
needed to make the plugin API to at least support everything that was possible 
in v1.3, the more I run into problems. So I decided to just start a list and 
add ideas to it here:

First of all: Comments welcome! Especially where design questions arise. 


Needed by existing plugins that should be ported:

- adding notes                (implode/explode)
- setting note head types        (slash notation)
- transposing parts: setting tpc1 and tpc2 requires knowledge of the 
transposing interval of an instrument.

Nice to have (to improve existing plugins):

- get access to the current clef
- get access to the current time signature

Comments:

1)Adding notes: Adding notes from inside a plugin currently doesn't work. One 
of the problems is that write access to a property of a Note object needs 
special care when the object was just created by Cursor.newElement:
An assignment to note.pitch will lead to a call to note->chord()->measure() 
with a _chord == null pointer.

I think it would be useful to adjust the functions in the Note object, handling 
write access of a plugin, to check, if valid values for _chord exist. If not, 
the property could simply be assigned because the Note object is not yet placed 
somewhere in the score. These properties are affected: pitch, tpc1, tpc2

Undo has currently problems handling notes that have been added by 
chord.add(Element). I'll try so see if this can be fixed easily.

2)Note heads: There seem to be problems with the enums here. I'll have a look 
at it.

3)Transposing parts: This seems to be a difficult one. To me it looks like 
we'll have to expose two more objects (Instrument, Interval) to the plugin 
framework if the plugin should set tpc1 and tpc2 on its own.
Maybe it would be better to provide a way to automatically set both when only 
one is written (because it's pretty much clear what the other one needs to be…) 
This however is tricky if combined with 1) because the properties might be set 
before the note is actually added to the score and by that time, there would be 
no way to know if the note will be added to a transposing part. So we'd need 
extra checking in Chord.add(Element).


heuchi


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to