#1215 Adding grace note moves slur

One Of These Days
closed
notation (282)
2
2015-09-15
2009-07-09
No

If two notes are joined with a slur and a grace note is added in front of the first note, the start of the slur moves from the first "real" note to the grace note. The attachment show what is wanted.

Discussion

  • Steve Blackwell

    Steve Blackwell - 2009-07-09

    grace note in front of slurred note

     
  • D. Michael McIntyre

    I remember looking at and thinking about this, but I don't see any comments. Anyway, the problem still exists, and it's a rather complicated horizontal layout problem to fix.

     
  • D. Michael McIntyre

    • milestone: --> One Of These Days
     
  • Tito Latini

    Tito Latini - 2015-09-14

    Fixed in r14102.

    It is a generic bug with grace notes and the graphical marks
    represented by Indication events (slur, phrasing slur, (de)crescendo,
    glissando, quindicesima up/down, ottava up/down, trill line, fig
    parameter chord and figuration). I have ignored the Symbol events
    (segno, coda and breath).

    For example, the order of the events of two slurred notes is:

    slur   note0   note1
    

    before the change, if we add a grace note, the result is:

    slur   grace0   note0   note1
    

    because the subordering of slur (and all the Indication events) is
    minor than the subordering of the grace note. If we add another grace
    note, the result is the same:

    slur   grace1   grace0   note0   note1
    

    After the change, if we add a grace note before two slurred note, the
    order of the events is:

    grace0   slur   note0   note1
    

    and if we add a second grace, we get

    grace1   grace0   slur   note0   note1
    

    If we remove the slur:

    grace1   grace0   note0   note1
    

    the subordering of the grace notes is incremented because there aren't
    other Indication events. Therefore, if we re-apply the slur to the two notes,
    the order of the events becomes:

    slur   grace1   grace0   note0   note1
    

    If we want the grace notes before the slur, it is enough to remove and
    re-insert these notes:

    grace1   grace0   slur   note0   note1
    

    Here is an example with two Indication events: a decrescendo of some
    slurred notes. The order of the events is:

    descrescendo   slur   note0   note1   ...
    

    If we add two grace notes:

    grace1   grace0   decrescendo   slur   note0   note1   ...
    

    If we remove the slur:

    grace1   grace0   decrescendo   note0   note1   ...
    

    and the subordering of the grace notes is not incremented because
    there is another Indication event (decrescendo).
    If we remove the descrescendo:

    grace1   grace0   note0   note1   ...
    

    the subordering of the grace notes is incremented, therefore if we
    insert a new Indication event, it precedes the graces notes.

    In summary, the rule is the follow: if we add a grace note before an
    Indication event, the event of the grace note precedes the indication.
    If we add an Indication event where there is a grace note, the
    inserted event precedes the grace note.

    I think it is a flexible solution to work with grace notes and
    Indication events.

    Note: the code is practically duplicated in EraseCommand.cpp and
    EraseEventCommand.cpp because it is possible to remove an event
    with the eraser tool (EraseEventCommand) and with the delete key
    after a selection (EraseCommand). Feel free to simplify the code
    by using a specific common method.

     
  • D. Michael McIntyre

    • status: open --> closed
    • assigned_to: Tito Latini
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks