Continuous view "panel"

• May 8, 2014 - 04:57

I've been thinking about it for a while and lately, I had time to work on the issue #18338 .

In continuous view mode, I managed to get the instruments, clefs and time signature to always show up.

Here's a short screencast preview : //youtu.be/vr0HcIxah0s

Any comments?

For now i called it the "continuous panel", but I guess we should find a better name.

Should I pull request it?


Comments

Looks really nice! Just one question, that isn't clear from the video - does the display go away when you stop dragging? Or maybe when you enter note input mode or otherwise start working with the score? Could it be made to do so? I feel like once I know where I am and start working, I'd rather have the full width of the screen available.

In reply to by Marc Sabatella

I like it! it's a wonderful start! To improve on it I would:

1/ Use the short instrument names instead of the long names. It would make the panel smaller and should be enough information. Alternatively we could use the long name but put it on top of the clef, and on "top" of the panel.
See Sib5 screenshot or here
2/ I disagree with Marc, and I would keep the "panel" on always. But I would make it "solid".
3/ This panel and the whole continuous view would probably benefit from a limitation of the scrolling vertically.

In reply to by [DELETED] 5

I think if the instrument names displayed above the staff as in the Sibelius version, I wouldn't be as concerned about the loss of space, which is my main reason for wanting to see it go away while working. If that's easy, that would be my vote. Another possibility is to have a button (ideally with keyboard shortcut) to toggle this display. Simply using short names might be good enough too. Certainly better than not having them at all. I guess I'd have to see how it felt in actual use. BTW, I hope the clef and key update if you scroll to a part of the score where they have changed?

And yes, I agree it would be nice to limit vertical scrolling. If there are too many staves to fit on screen, then of course we need to be able to see them all, but for a single instrument especially, there is really no reason for the view to move vettically at all.

In reply to by Marc Sabatella

Thanks for you comments.

The way the panel looks presently is identical as the beginning of the score. For now, it simply translate, redraw and clip the elements that were already laid out for the score view. That was the easiest way to see how this feature could looks like.

I'd like to show the short names, but from my understanding, during the layout stage of the score, the InstrumentNames are removed and replaced by StaffNames, which only contains a string with the long instrument name. We seem to lose all references to InstrumentNames, so I'm a bit stuck. And I don't really want to redo all the layout design and calculations every time we move the score around.

Any idea?
Maybe building a Qlist of short instruments names during the layout stage for further use in my Continuous panel paint function?

For now, there's no implementation of clef/key change across the score. But that's obviously a must in the future.

Concerning vertical scrolling, I don't see any problem the way it is now. It works the same way as in normal view. There could be a default vertical centering, but it's convenient to have the liberty to move the score around when we zoom in and out.

In reply to by vgStef

I kind of figured that you were just using the existing display and that making it look different than regular score view would be tricky.

Here's an idea: what if every time user enters continuous view, you go in and change the text style for long instrument name, to display as in the Sibelius example (small font above staff rather than larger font to left of it)? Save the old text style of course and restore it when done. Only hitch is that this particular text style seems rather flaky - existing staff names seem unaffected, and offsets seems to have no effect. But those are probably bugs that need fixing anyhow.

Regarding scrolling, yes, if the system does not fit on screen, you obviously need to be able to pan around. But if it *does* all fit on screen, why allowing panning? Navigation in this view should feel as much as possible like simple horizontal scrolling.

In reply to by Marc Sabatella

The rotation is pretty easy to do, just like a translation. We rotate the painter, draw on it, then undo the rotate. Here's what I did for the new short names in the continuous panel:

painter.translate(pos);
painter.rotate(-90);
newName->draw(&painter);
painter.rotate(90);
painter.translate(-pos);

The rotation isn't causing the problem. Here's a screenshot of it without the rotation. All the intruments short names are drawn at the same place. So we lost the positions during the layout(). But not in createLayout().

MuseScore.png

Attachment Size
MuseScore.png 59.3 KB

In reply to by vgStef

OK, nice to know on the painter rotation. I suppose some day we could expose something like that in a text style.

I believe the difference between layout() and createLayout() with regard to position is that layout() does a setPos() first, and that normally sets position relative to the element's parent. This is all well and good if the text is somewhere "normal", but staff names, being generated on the fly, are probably special; I have no idea what their parent even is.

This then is probably why positioning doesn't work in the text style - by which I mean, it doesn't work period, not just that it doesn't work in the context of your code. Maybe this is something that could be addressed, and then you wouldn't need to call createLayout()?

But for now, it does look to me like making createLayout() public - or perhaps making ScoreView a friend class for text? - is the way to go.

In reply to by vgStef

But I don't think you can remove that line in general - I would assume it is needed in most cases, as per my comment above.

Maybe you could check something about parent() first, though, like this:

if (parent()->elementType() != SYSTEM)
      setPos();

I like this idea, but could it also be added to normal view.?
Sometimes when I zoom in to work on a measure, I lose track of which instrument belongs to which stave, particularly when I have a large number of instruments, and have to scroll horizonally to be sure I am on the correct stave.

Thanks. great work.

Do you still have an unanswered question? Please log in first to post your question.