I looked at this. Here is a simple patch to avoid writing bar numbers if they will be overwritten. I don't know if this will work in all circumstances.
But I am not sure how the multi edit is supposed to work in the notation editor. In the matrix editor it seems to work well. For event edit it just opens a window for each segment. In the notation editor the red thumbwheel is there for switching segments but I can't see how it works!!! Is this work in progress ?
Thanks for the test composition. That helps illustrate the issue. Select both segments in the Segment Canvas, and then press N to see the problem. It looks like the notation editor is trying to compress the empty space away, but the standard rulers didn't get the memo..
I think the red thumbwheel is not needed in notation as one can select the Segment to edit by switching to arrow cursor (Select and Edit F2) mode and clicking on the staff for the Segment you want to select. The Matrix editor can only show one segment at a time, so it actually needs the red thumbwheel. Notation does not. I suspect the red thumbwheel can be removed from notation after confirming that it isn't connected to anything.
Update: The red thumbwheel is indeed needed in notation as it allows switching between segments that overlap on the same track.
Last edit: Ted Felix 2021-02-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Works for me :)
Yes I was so fixated on the red thumbwheel I didn't check the clicking on the staff !!
I guess the thumbwheel should either be removed or made to work properly (switching the staff)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the red thumbwheel works and is essential when segments overlap on
the same track (polyphony).
In such a case clicking on the staff can't
work and the wheel is the only way to select which segment to edit.
Yves
Last edit: Ted Felix 2021-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The red thumbwheel works and is essential when segments overlap on
the same track (polyphony).
In such a case clicking on the staff can't
work and the wheel is the only way to select which segment to edit.
So, please, don't remove it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah - OK now I understand. The wheel only works within a track. I was testing with single segments in each track so the wheel was having no effect !!!
Does it make sense to allow the wheel to select all staffs ?
In the matrix editor all segments can be selected using the wheel.
I made an experimental change to try this - see patch
Maybe there is a more elegant way to move to the first/last staff in a track.
Also slotCurrentSegmentNext is called in the layer stuff so this change may affect that.
This patch crashes for me when I continue to turn the thumbwheel past the bottom staff with the mouse wheel. I didn't test it in isolation, though. I applied it after the following two patches, so that might be part of the problem.
I suspect that the finicky nature of the wheel would make it more irritating to have it continue to other staffs when one is trying to work with layers on a single staff. I'm not sure, though, as I don't use the notation editor much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh right. Sorry. Missed out a check for null staff. Here is the correct patch based on the newest svn (The other changes work fine for me). This patch also means the alt-pageup/down keys also cycle to the next staff up/down !
Yes maybe this is a matter of taste but if you leave things as they are there should be some indication to the user that the segment change wheel only works horizontally - maybe change the tooltip ?
As you indicated in the previous version of this commit, this might have an effect on other callers to slotCurrentSegmentNext(). Turns out only "Create layer from selection" is affected, and it's no worse than it already was. In fact in one case it is improved. And this new staff-to-staff feature makes it easier to get back to where we want to be anyway. I left a "???" comment in NotationView::slotMagicLayer() if you want to have a look and see if we can do that better.
Sorry for the slow response times. These are some pretty tough patches for me to get through. I will try and review/test/push the rest as I have time. The patches are definitely appreciated.
Hi. No problem with the response time - and thanks for maintaining rosegarden - I appreciate it! The new svn version seems fine. I can try to look at the layer stuff - never used it much before.
Thanks again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had a look at the layer stuff. There are some spurious rests being generated. They seem to come from the fillWithRests call in AddLayerCommand.cpp. I think this call is bad - the segment gets filled with rests on creation. Also the navigation keys were not working after creating a layer on a single staff. Added some enterActionState stuff to improve this. See the patch.
The magic layer stuff is certainly a bit dodgy - undo doesn't work. It could only work if the paste command could be created for an as yet nonexistant segment!
One idea - Allow segments to have ids. Create the segment with a new id and allow the paste command to find the segment by id. Then everything could go into a macro command ! The id could then be used to select the new layer.
If you think this is a possible approach I can work on it.
Looking at this now... Re: Segment IDs, that would be a big improvement across the system. But it seems like a massive undertaking. Maybe it can just be introduced gradually? Throughout rg, the Segment pointer address is used to identify each Segment. There are even situations where the Segment is deleted but its address is still being used as an ID (ouch). See CompositionMapper::segmentDeleted() for an example.
See Composition::m_segments which is the container of Segments that is indexed by address. Also see Segment::m_runtimeSegmentId which appears to be the beginnings of your idea. Though a true Segment ID should be serialized and that could lead to some interesting forwards/backwards compatibility problems.
That said, we should still be able to get the job done without introducing Segment IDs. I know it feels very dirty (and it is), but use the Segment address as the ID for selecting the Segment (in this case, Staff). That's, unfortunately, the way rg works.
So, it looks like Notation selection works in terms of Staffs instead of Segments. So it's like we need a new NotationScene::setCurrentSegment(Segment *) based on setCurrentStaff(NotationStaff *) that instead of searching for the NotationStaff pointer in m_staffs, searches for the Segment pointer using m_staffs[i]->getSegment(). Feels like the path of least resistance right now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, this needs some more thinking. I suspect selecting the staff is not the issue. It's selecting the current layer. So maybe a setCurrentLayer(Segment *) could be introduced somewhere based on the next/prior segment/layer routine? Out of time for now...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes the Segment::m_runtimeSegmentId is exactly what I was thinking of. And as the name suggests the id is for runtime only - it isn't saved in the document. This could be a help for improving the layer code.
...
Thinking about it...
...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I looked at this. Here is a simple patch to avoid writing bar numbers if they will be overwritten. I don't know if this will work in all circumstances.
But I am not sure how the multi edit is supposed to work in the notation editor. In the matrix editor it seems to work well. For event edit it just opens a window for each segment. In the notation editor the red thumbwheel is there for switching segments but I can't see how it works!!! Is this work in progress ?
Here is my test composition
Thanks for the test composition. That helps illustrate the issue. Select both segments in the Segment Canvas, and then press N to see the problem. It looks like the notation editor is trying to compress the empty space away, but the standard rulers didn't get the memo..
I think the red thumbwheel is not needed in notation as one can select the Segment to edit by switching to arrow cursor (Select and Edit F2) mode and clicking on the staff for the Segment you want to select. The Matrix editor can only show one segment at a time, so it actually needs the red thumbwheel. Notation does not. I suspect the red thumbwheel can be removed from notation after confirming that it isn't connected to anything.
Update: The red thumbwheel is indeed needed in notation as it allows switching between segments that overlap on the same track.
Last edit: Ted Felix 2021-02-22
Patch appears to work well. Thanks. Will push to svn shortly...
Should be fixed in [r16071]. Please test latest svn.
Related
Commit: [r16071]
Works for me :)
Yes I was so fixated on the red thumbwheel I didn't check the clicking on the staff !!
I guess the thumbwheel should either be removed or made to work properly (switching the staff)
I compiled r16071 just now and it works for me too. Thanks for fixing it.
Last edit: Ted Felix 2021-03-07
The red thumbwheel works for me as the pop-up-info says: it switches
between the segments to select them the active ones.
Although I never realised before your post that it is there :-)
Last edit: Ted Felix 2021-03-07
Yes, the red thumbwheel works and is essential when segments overlap on
the same track (polyphony).
In such a case clicking on the staff can't
work and the wheel is the only way to select which segment to edit.
Yves
Last edit: Ted Felix 2021-03-07
The red thumbwheel works and is essential when segments overlap on
the same track (polyphony).
In such a case clicking on the staff can't
work and the wheel is the only way to select which segment to edit.
So, please, don't remove it.
Thanks Yves. I remember now. And yes, it works exactly as described. We'll definitely leave that in there.
Ah - OK now I understand. The wheel only works within a track. I was testing with single segments in each track so the wheel was having no effect !!!
Does it make sense to allow the wheel to select all staffs ?
In the matrix editor all segments can be selected using the wheel.
I made an experimental change to try this - see patch
Maybe there is a more elegant way to move to the first/last staff in a track.
Also slotCurrentSegmentNext is called in the layer stuff so this change may affect that.
This patch crashes for me when I continue to turn the thumbwheel past the bottom staff with the mouse wheel. I didn't test it in isolation, though. I applied it after the following two patches, so that might be part of the problem.
I suspect that the finicky nature of the wheel would make it more irritating to have it continue to other staffs when one is trying to work with layers on a single staff. I'm not sure, though, as I don't use the notation editor much.
Oh right. Sorry. Missed out a check for null staff. Here is the correct patch based on the newest svn (The other changes work fine for me). This patch also means the alt-pageup/down keys also cycle to the next staff up/down !
Yes maybe this is a matter of taste but if you leave things as they are there should be some indication to the user that the segment change wheel only works horizontally - maybe change the tooltip ?
Pushed as [r16074]. Please test latest svn.
As you indicated in the previous version of this commit, this might have an effect on other callers to slotCurrentSegmentNext(). Turns out only "Create layer from selection" is affected, and it's no worse than it already was. In fact in one case it is improved. And this new staff-to-staff feature makes it easier to get back to where we want to be anyway. I left a "???" comment in
NotationView::slotMagicLayer()if you want to have a look and see if we can do that better.Sorry for the slow response times. These are some pretty tough patches for me to get through. I will try and review/test/push the rest as I have time. The patches are definitely appreciated.
Related
Commit: [r16074]
Hi. No problem with the response time - and thanks for maintaining rosegarden - I appreciate it! The new svn version seems fine. I can try to look at the layer stuff - never used it much before.
Thanks again
I also want to express my appreciation for Ted and want to thank you/him
for the work done and time invested!
Last edit: Ted Felix 2021-03-07
I had a look at the layer stuff. There are some spurious rests being generated. They seem to come from the fillWithRests call in AddLayerCommand.cpp. I think this call is bad - the segment gets filled with rests on creation. Also the navigation keys were not working after creating a layer on a single staff. Added some enterActionState stuff to improve this. See the patch.
The magic layer stuff is certainly a bit dodgy - undo doesn't work. It could only work if the paste command could be created for an as yet nonexistant segment!
One idea - Allow segments to have ids. Create the segment with a new id and allow the paste command to find the segment by id. Then everything could go into a macro command ! The id could then be used to select the new layer.
If you think this is a possible approach I can work on it.
Looking at this now... Re: Segment IDs, that would be a big improvement across the system. But it seems like a massive undertaking. Maybe it can just be introduced gradually? Throughout rg, the Segment pointer address is used to identify each Segment. There are even situations where the Segment is deleted but its address is still being used as an ID (ouch). See
CompositionMapper::segmentDeleted()for an example.See
Composition::m_segmentswhich is the container of Segments that is indexed by address. Also seeSegment::m_runtimeSegmentIdwhich appears to be the beginnings of your idea. Though a true Segment ID should be serialized and that could lead to some interesting forwards/backwards compatibility problems.That said, we should still be able to get the job done without introducing Segment IDs. I know it feels very dirty (and it is), but use the Segment address as the ID for selecting the Segment (in this case, Staff). That's, unfortunately, the way rg works.
So, it looks like Notation selection works in terms of Staffs instead of Segments. So it's like we need a new
NotationScene::setCurrentSegment(Segment *)based onsetCurrentStaff(NotationStaff *)that instead of searching for theNotationStaffpointer inm_staffs, searches for the Segment pointer usingm_staffs[i]->getSegment(). Feels like the path of least resistance right now.Actually, this needs some more thinking. I suspect selecting the staff is not the issue. It's selecting the current layer. So maybe a
setCurrentLayer(Segment *)could be introduced somewhere based on the next/prior segment/layer routine? Out of time for now...Yes the
Segment::m_runtimeSegmentIdis exactly what I was thinking of. And as the name suggests the id is for runtime only - it isn't saved in the document. This could be a help for improving the layer code....
Thinking about it...
...
Patch is a definite improvement. Thanks.
Patch posted as [r16083] and [r16084]. Please test latest svn.
Related
Commit: [r16083]
Commit: [r16084]
While I was looking at this I noticed that the position cursor is not updated when switching the layout mode.
Here is a quick fix for that !
Pushed as [r16072]. Please build latest svn and test.
Related
Commit: [r16072]