GSoC weekly update : August 1st to August 7th

Posted 3 years ago

Hello,
As mentioned in the last post, this week I worked on fixing some issues with the existing implementation for range annotations. The initial implementation didn't work for empty measures, but only for a range consisting of a start chordrest and an end chordrest. However, we figured out that using start segment and end segment of the selection instead of the start chordrest and end chordrest would be a better way, and would take care of all the cases of range selections. This is done in the current PR. I have also added the possibility for highlighting a single note/rest.
Apart from this, I have also added the option to change color used for highlighting the range, this can be done via the inspector. I've also added a border for the annotation.
One issue I was facing is that upon adding a range annotation to the last measure of any system, it was being drawn elsewhere. On inspection, it was apparent that the QPointF p2 was not being calculated correctly in rangePos() , due to incorrect end segment being returned. This is because the tick value for the end of one measure is the same as the tick value for the start of the next measure. This has been taken care of in the current PR.
Apart from this, the range annotation earlier was being drawn on top of everything else, making it impossible to select the individual notes and so on inside the range annotation. Hence it's better to draw range annotation later, which is also taken care of. I have also implemented read and write for the range annotations, thereby facilitating the saving and loading of the same.

The current annotation feature looks like this :
test
I selected the ranges where I wanted to apply an annotation, and applied Add->Annotation->Range Annotation.
Perhaps we can do away with the borders and just have a highlight across the range selection. This would look something like this :
test
As you can see, it is also possible to apply the highlight to a single note. If you have any inputs about how the annotations should look, feel free to let me know.

Next week I plan to wind up the implementation by adding possible properties like border width, margin and opacity as settable parameters by the user, and any additional functionality after discussion with my mentor. As the end comes near, we are moving towards an annotation feature for MuseScore! Stay tuned :)

Until later,
shredpub.