XML backup/export/import/edit tools
In various feature requests and discussions, sophisticated users point out that some capabilities that can be achieved by extracting the XML from an .mcsz, backing it up, editing it with TextPad etc., and replacing it. It's not for the faint of heart, but doing this provides access to a range of operations that would be tedious or difficult via the MS UI.
Perhaps this has already been considered (I didn't find anything): Could we provide a more structured way to import/export/manipulate XML elements, eliminating some of the risk and tedium of doing this manually?
The ideal might be something along the lines of HTML editing modes in WYSIWYG editors, where we could actually make textual updates in place from within the UI, using a standard text editor window (which could presumably be assembled from open source components). Such an interface might also protect us, to some extent, from making dangerous changes.
Alternatively, it could be a help just to have some simple commands for doing backup/extract/replace/etc., especially if we could incorporate some primitive automatic versioning via file names/dates.
Perhaps as a next step it might also be possible to split/merge the XML elements (like HTML editors that only provide access to the body section), to protect the more "dangerous" parts versus the "safely editable" parts.
This is obviously not in the core mission of MuseScore, but perhaps it could streamline the operations of some power users, and lower the technical threshold a little for becoming a power user.
Comments
A power user doesn't need this, (s)he just uses unzip and vi(m) (or any other such tools, e.g 7zip and Notepad++)
In reply to A power user doesn't need… by Jojo-Schmitz
Naturally, but when this type of editing is done frequently/repetitively it might same some steps, particularly in terms of naming and version management. And it might make it easier for serious but less-tech-aware users to take advantage of the capability without having to worry about the "careful, only for power users" warning. But perhaps I'm only seeing edge cases where this would be helpful.
In reply to Naturally, but when this… by spinality
You may or may not recognize me from the forums, but I've only used it to fix few bugs where something was written wrong. I guess you would call me a power user.
In reply to Naturally, but when this… by spinality
It really is only few corner cases where this is needed.
I doubt we will see this for the purpose of hacking with the MSCX, but we might see something like it for the purpose of providing an alternative representation of the musical data. We wouldn't provide a text viewer/editor (no point in doing that when others already exist) but instead the XML structure would be displayed in a tree view, like this:
Inkscape has something similar for editing SVG files.
The tree view has an advantage over a raw text viewer in that there can be some content awareness. For example:
&
" in the MSCX displayed as "&
" in the viewer)Measure
" displayed as "Bar
" for users in the UK)<note><pitch>60</pitch><tpc>21</tpc></note>
" displayed as "C#4
").It would also mean that we can restrict the user's choice of what to enter to values that are actually valid. This means editing in the tree view could not corrupt the score, unlike in a text editor.
The main reason we might consider doing something like this would be for the benefit of blind users who rely on a screen reader to tell them what is happening on the screen. MuseScore's score view is not very accessible to screen readers, and I don't think it can ever be made fully accessible. However, a tree structure like this would be fully accessible right from the get-go, as we can rely on Qt's built-in accessibility features.
Another area that the tree view would be useful is for the score comparison tool, to show what has changed between two versions of a score.
In reply to I doubt we will see this for… by shoogle
Wasn't/Isn't there an object debugger when building a debugbuild that allows you to see something along these lines (though more internal structure and less user friendly oriented)?
In reply to Wasn't/Isn't there an object… by jeetee
Qt Creator has an object debugger. I'm not aware of one being built into MuseScore.
In reply to Qt Creator has an object… by shoogle
Run in experimental mode (-e) then see Edit → Debugger…