Score comparison tool: design and possibilities
Since the previous topic on my GSoC project has grown a bit large I create this topic to discuss some questions related to the score comparison tool development. The previous topic will be left for discussions concerning MSCX fileformat changes.
The next stage of my GSoC project is a development of score comparison tool itself. In my recent blog post I told about some progress in development of score comparison engine which is currently built on top of textual diff library (I used
diff_match_patch which was already found in
thirdparty/ section of MuseScore sources but this can be changed). It is not yet finished but is already able to yield sane results for some simple changes between scores. So the work on the score comparison tool itself can be started so some more or less complete tool will be available which will then be improved.
We have some discussions on the score comparison tool design with my mentors (@shoogle, @anatoly-os), and @shoogle made a document containing some ideas on what this tool could look like. With his permission I'll publish here a link to it, and in this post will briefly describe my ideas on score comparison tool design and its possible features, partially based on those ideas described by @shoogle. Feell free to propose some other ideas and give any feedback on what I will describe.
It seems to be a common conclusion that the best location for the tool is a bottom of the window. There is also an option to show the compared scores side-by-side: although the tool is planned to be mostly textual for now, possibility of visual assessment of differences can be more convenient. This can be combined with a feature of automatic scrolling of the shown scores to the relevant location when choosing some particular difference. To make it more convenient to see the compared scores side-by-side perhaps it worth to temporarily hide panels related to editing scores like it is shown below. This seems to make sense if editing scores while comparing them is not needed but I am not sure about this.
In general, the score comparison tool should have at least two or three modes:
1. Showing raw textual diff between MSCX code for the compared scores;
2. Showing a list of changes with some little context about them described;
3. Showing a full tree representation of score with certain branches expanded and differing elements specially marked.
I am not sure that the third mode is needed but it can be useful in that it gives more information about the changed elements' context than the second. The first mode would allow to quickly see raw textual diff of MSCX codes without any advanced (and potentially containing errors) processing being done on it.
Some examples on how the latest two types could look like are given in the diff_view.png attached to this post. Second mode from the list above is roughly corresponds to what is called Intelligent view on the picture, and the other two examples show two possible options to implement the third mode.
Some notable features:
- Click on a change item moves score views to the relevant locations.
- Differ between an element insert/removal and properties changes.
- Possibly some advanced recognition of changes (transposition of series of notes, moving or copying of some content to the other part of score). Would be nice to have but this will probably be developed not in the first version of the tool.
Design of the tool
Concerning the general design of the tool I'll include this screenshot from the mentioned above @shoogle's presentation:
There you can see a file or version chooser widget, a radio button switching between modes of showing differences between scores, and on the right side there is a tree view showing the corresponding diff. If there are not too much place perhaps the left widget (file/version chooser) can be done not too wide or even replaced with a button launching a file choice dialog. Still if the score diff tool span for the full window width as suggested above there will probably not be such a problem.
So I hope I didn't miss too much in this brief description. I will be glad to hear any feedback or questions on that!