question about Score::pasteStaff()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

question about Score::pasteStaff()

mtherieau
Am investigating this issue: Undoing multi-voice paste does not produce multi-voice rest on previously occupied note

I added some detailed analysis comments there and think I have the source of the issue isolated to Score::pasteStaff() and/or makeGap1().  Essentially it seems that when pasteStaff() and makeGap1() are "making a gap", they fail to remove the secondary voice elements, which results in those elements being missing from the undo history.

Am now trying to see if I can work through a proposed solution and so would like to solicit some guidance on whether looping through the elements of the secondary voices when "making a gap" should be done in Score::pasteStaff() or in makeGap1()?  It seems that pasteStaff() has access to the contents of the paste buffer as well as the boundaries of the current selection and so could be better suited to decide whether all voice elements should be removed? Or maybe this code path should just get a simple fix that extends makeGap1() so that it always removes all the secondary voice elements in the specified time range? not sure...

regards,
markt

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: question about Score::pasteStaff()

Werner Schweer
Selections (ranges) always contain complete staves (all four voices). It
can be assumes that
the first voice has no time gaps. Other voices can be incomplete and may
have time gaps.
This may create some complications.
 
Another (currently unhandled) complication is that cut/paste cannot
cross a tuplet. Same for makeGap1(),
which cannot (should not) handle this situation.

I dont have a good answer for your question but have the feeling that
handling this in makeGap()
is more usable.

Last you should probably  not waste your time solving this in the
branch. Please use the trunk version.

regards,
/werner

Am 23.09.2011 16:01, schrieb mtherieau:

> Am investigating this issue:  http://musescore.org/en/node/12599 Undoing
> multi-voice paste does not produce multi-voice rest on previously occupied
> note
>
> I added some detailed analysis comments there and think I have the source of
> the issue isolated to Score::pasteStaff() and/or makeGap1().  Essentially it
> seems that when pasteStaff() and makeGap1() are "making a gap", they fail to
> remove the secondary voice elements, which results in those elements being
> missing from the undo history.
>
> Am now trying to see if I can work through a proposed solution and so would
> like to solicit some guidance on whether looping through the elements of the
> secondary voices when "making a gap" should be done in Score::pasteStaff()
> or in makeGap1()?  It seems that pasteStaff() has access to the contents of
> the paste buffer as well as the boundaries of the current selection and so
> could be better suited to decide whether all voice elements should be
> removed? Or maybe this code path should just get a simple fix that extends
> makeGap1() so that it always removes all the secondary voice elements in the
> specified time range? not sure...
>
> regards,
> markt
>
>
>
> --
> View this message in context: http://musescore-developer.685061.n2.nabble.com/question-about-Score-pasteStaff-tp6824336p6824336.html
> Sent from the MuseScore Developer mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: question about Score::pasteStaff()

mtherieau
thanks for the info werner.  I'll first switch to trunk and then see if I can tease out a proposed fix by looking further into makeGap().  I guess I was hoping that this would be a straightforward and obvious fix, but it seems to be a bit more subtle than that.

One further question: is the tuplet issue or any other trunk development under way that may affect this issue?  (I don't mind spending time to come up with a proposed fix, but wanted to check first that there are no plans to overhaul this code in the next little while.)

regards,
markt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: question about Score::pasteStaff()

Werner Schweer
The tuplet problem can be handled by checking this special condition and
give
feedback to the user that the operation is not possible. There is no
plan to solve
this by actually splitting the tuplet (which would be weird i believe)
or by
simplifying the score.

Am 23.09.2011 19:44, schrieb mtherieau:

> thanks for the info werner.  I'll first switch to trunk and then see if I can
> tease out a proposed fix by looking further into makeGap().  I guess I was
> hoping that this would be a straightforward and obvious fix, but it seems to
> be a bit more subtle than that.
>
> One further question: is the tuplet issue or any other trunk development
> under way that may affect this issue?  (I don't mind spending time to come
> up with a proposed fix, but wanted to check first that there are no plans to
> overhaul this code in the next little while.)
>
> regards,
> markt
>
>
> --
> View this message in context: http://musescore-developer.685061.n2.nabble.com/question-about-Score-pasteStaff-tp6824336p6825088.html
> Sent from the MuseScore Developer mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Mscore-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: question about Score::pasteStaff()

mtherieau
ok -- thanks for that info.  To be clear, I'm not planning on trying to solve any issues besides the undo issue ("one thing at time" ;-), but I do appreciate the warning that other issues may come into play.

regards,
markt
Loading...