Improved Excerptsdialog

Posted 8 years ago

In the future it should be possible to have parts for every single voice in your score, so the idea is, that you can have a main score with SATB and piano with S, A, T and B in one stave and one excerpt with SA-TB, S and A in one staff and T and B in another and another excerpt with every voice in a single excerpt.

To achieve this, a new layout for the excerptsdialog is needed. So let us collect, what we could and should be able to do:

GUI

  1. We want to have a simple use for the current behavior (add instruments to a excerpt)
  2. We want to select the voices which should be used and showed for every instrument in a part
  3. We want to have the same instrument twice in one excerpt (but probably with different voices)

So the new GUI could look like this:
(sorry for the bad picture, but it shows all the necessary things)
PartGUI Tree and Instrumentlist.jpg

It looks a bit like the Instrumentdialog, and in fact, it is used in the excerptsdialog.

On the left, we have the currently existing parts with a delete, a new all and a new button.
In the middle we have the available instruments, in the end without a tree structure, but maybe some additional buttons. We can select then an Instrument and add it to the part or create a new one.
On the right we have the instrumentlist for the selected part and here there will be a tree structure, so we can additionally select the voices we want to use.

With this GUI all cases could be handled, a disadvantage would be, that it's a bit more difficult to use, but the actual one does not allow to add the same instrument two times.

Implementation

The implementation is quite difficult.

The main attribute of a part is, that it is linked to the score, so changes in a part are also changing the main score. So to have the newly created parts linked to the score, but only show some voices, there are at least two possibilities.

  1. We could do something like the linked staffs which already exist for voices again, so we could easily select voices and copy them into a stave of a part. But there will be some problems if the voice has gaps, etc. Another problem is, that this is quite a big task and is different from the actual part creation.

  2. We add an attribute for each stave of a created part, which stores the selected voices (the voices you want to extract from the stave in the main score). If all voices are selected, all voices are shown and you can select all voices. If there is only one voice selected the other voices should be hidden, but it is not enough to make them invisible, because we would then still be able to change (or even see) the other voices.

For the GSoC project I chose the second possibility, because it uses the actual implementation best.
But we'll have to make some changes in the layout function to hide every new entry in another part or score and think about how we can make a voice completely unselectable. Another problem will be that we can make a gap in voices except voice 1, which means we can erase a rest, so maybe a part would look like the following:

Gap problem.png

Another problem could be to export the score to Capella or something else, because we have to convert the attribute for which voices of an instrument are used in a part to the corresponding in Capella (if it exists).

If you have an idea how I could deal with the problems I mentioned, don't hesitate to get in contact with me!


Comments

I can't speak to the code, but I don't really understand what the middle section is for in that GUI mockup. Isn't it covered in the right-hand section?

In reply to by Isaac Weiss

Thanks for your reply, but no it isn't. In the middle section you are able to select an instrument you want to add to your excerpt by clicking Add. If we have a look at the current GUI, we aren't able to add one instrument twice, so with this GUI it could be done easily.
But your post shows me, that it isn't clear why and what on a first look, but in my opinion this would be best to cover as many common use cases as possible.

EDIT: Maybe the visible checkbox has confused you, so please ignore this, it's there because I copied this from the instrumentsdialog but it won't be there in the end.

There is a wish from some people (including myself) to partially overhaul linked staves to linked voices. The simplistic idea would be:
1. A staff is essentially merely a means to display a voice.
2. Up to four voices may be combined on a staff

This change would simplify away places in code having to deal with those gaps/jumps; but of course still has some unaddressed issues/consequences. Some of the first ones that spring into my mind:
1. Voices are no longer allowed to have gaps, you can however still make rests invisible.
2. Being an instrument might no longer be a property of the staff, but becomes one of the voice; not sure how "combinable" those voices should be in an excerpt.
3. What properties get linked or not has to be revised thoroughly (the visibility of a rest for example is probably not linked; staff text becomes a harder case, ...)

Being at the start of a new major release development cycle is imo the best moment to consider a change with such a big impact.

In reply to by jeetee

You're right this was also my first idea, but actually the impact of this change would be quit too big for my GSoC project. Of course it is much better to have linked voices for this purpose, but think of that:
If we get it managed to create excerpts with the current Implementation, where else do we need to have linked voices anymore? I can't think of any other place than maybe an implode tool, but you wouldn't need an implode tool, if you could generate a part for every voice.
So maybe some time in the future, when we have a big problem with the current design it might be a good idea to implement linked voices. But for the moment the change would be quite much too big.
Because I like the idea of the linked voices, I'll maybe stick to this after my GSoC project, but my idea of taking the current implementation was chosen, which shows that the head development team is thinking the same.

As you already pointed out, there are several differences between linked staves and linked voices. Personally I wouldn't say that the instrument should get a voice property, but this might be useful for the implode tool.