GSoC: Week 4

Posted 3 years ago

This week I finished the GUI for the new excerptsdialog. This is an important step, because it is now possible to test the function with different scores and choose the voices individually.
My actual PR.

Achievements

As already said I finished the GUI. I didn't had much problems with it, but it was quite a big change on the dialog, so it did take its time. Major change was to use QTreeWidgetItems instead of QListItems for the actual parts of an excerpt, so it is possible to expand a part and select some voices.

NewGUI.jpg

The new excerptsdialog has two main parts. In the left at point 1 in the picture we can select the excerpt as we already can do it. The right part has changed. At the moment we only have one Widget in the right which shows us all instrument of the score. If we want to add an instrument to the score we check the box before an entry of the instrument list. This method makes it impossible to add an instrument more than once. This is sometimes needed, for example if you have an SA-TB score and want a S-A-T-B you have to add both instruments two times.
To achieve this I added one Widget which lists all the instruments of the score (2) and another which lists the added instruments and provides the possibility to select the voices for every staff (3).

The changes are executed by clicking on "Ok", but the tracklist I implemented last weeks is set after every change on the voice selection, so it is stored correctly.

I had one big problem when I wanted to add one instrument twice as described above. The problem was the use of a QMap. To add a new element to _tracks I used to function insert(key, value). The problem is that it simply overwrites the last entry which has the same key. I choose to use a QMultiMap, so I could use the insert method as before, because now it simply adds a new entry and does keep the old. Therefore I had to change some things I implemented before, because now it is possible, that there is more than one destination track for the same source.

There is a question I asked myself again and again. What is the difference between a part and an excerpt. When translating it to German I think part means more a specific instrument of the score and excerpt a selection of instruments of the score, so I would have said the dialog is called excerptsdialog, so we should name it excerpts and not parts and give it the heading (as I did already) Excerpts. But I'm not a native English speaker, so correct me if there is a different meaning of parts, but for me it often isn't clear why we can use part and excerpt synonymous.

Goals for the next week

For the next week I plan to create some test cases for the new excerptsdialog which are extending the current tst_parts. Maybe I'll do some more investigation on the gaps implementation, because one big aim for this was to get rid of some expanding of voices and stuff like this, so I'll check if we can remove some redundant code.
If it is possible and I can't work much more on the excerptsdialog I would go on with my next topic, so I'll have more time for my exams at the end of July, but actually this isn't really needed because it seems as I am good in time.

Edit: Maybe I could add some explanation in the documentation, too.

Until next week,
Felix


Comments

If I may help with the language:

At least in American English, "excerpt" refers to a length of the score that is extracted—for example, in a 100-measure piece, if you took measures 18–75 only, you would have an excerpt from the piece. Here's a brief Shostakovich excerpt: https://musescore.com/user/1265936/scores/552451 (Or if you prefer Dvorak: https://musescore.com/user/49518/scores/70239)

"Part" means exactly what it means in MuseScore—a sheet with the music for a specific instrument, extracted from the full score. It is less common for a part to have more than one instrument, but when it does happen (say for multiple percussion instruments, or the vocals from a choral + orchestral score) it's still a part, not an excerpt. So please don't change that.

I would also use "in" instead of "of"—and is "Partitur" supposed to be "Score"?

What do you think of putting the second and third sections below the first, so the dialog would not be stretched so wide?

In reply to by Isaac Weiss

Can't confirm the time sig part of your report, it does show up for me. Key sig indeed is missing though. Can't confirm the overlapping checkboxes either.

Anothwer proplen: the add/remove duttons should either be disabled on existing parts, or work (i.e. allow modifications).

Also I wonder whether to make them + and - (here and in some other places), less work for translators?

Another bug, in a 2-staff instrument (e.g. piano), not selecting voice 1 in either staff results in a single staff excerpt. Hmm, probably not, that score only had voice 1 notes in the bottom staff, and 'hide empty staves' just did it's job ;-)

In reply to by Isaac Weiss

I fixed the dialog size, but I can't reproduce the overlapping checkboxes. Maybe it's possible to fix it by using static size for these columns, but I would prefer not to do so. I think the difference is that under your OS the columns are resized to the header. Probably this is always the case, but under Linux and Windows the default column width is wide enough for a checkbox..

I indeed forgot about the KeySig's and in some cases even the clefs, thanks for this.

@Jojo
I changed Add and Remove to + and - and disabled them if they have no effect, but I enabled the part List of an Excerpt partly, so you can see which voices are checked but change nothing.