Menu

#34 Grace synchronization

Accepted
nobody
None
abandoned
Enhancement
2018-03-11
2006-09-19
Anonymous
No

Originally created by: *anonymous

Originally created by: hanw...@gmail.com

Fix problems with synchronization of different staves where one staff has a
grace note, and the other one doesn't, causing key/time sig changes,
\prpoerty settings, barlines etc. to go out of sync. 

Related

Issues: #1302
Issues: #2305
Issues: #24
Issues: #25
Issues: #256
Issues: #3139
Issues: #3391
Issues: #34
Issues: #3693
Issues: #385
Issues: #4144
Issues: #630
Issues: #70

Discussion

<< < 1 2 (Page 2 of 2)
  • Google Importer

    Google Importer - 2012-08-18

    Originally posted by: colingh...@gmail.com

    A recent post to bug-lilypond by Štěpán Němec here:

    entitled "Second staff beginning with an acciaccatura defeats "\override Staff.Timsignature" which showed the well-known problem of starting with a grace note:

    :::TeX
    % here, the first staff gets time signature, but shouldn't
    
    \version "2.14.2"
    
    \new PianoStaff <<
      \new Staff {
        \override Staff.TimeSignature #'stencil = ##f
        c
      }
      \new Staff {
        \override Staff.TimeSignature #'stencil = ##f
        \acciaccatura c c
      }
    >>
    

    That post led to very concise presentation of the standard workaround from Reinhold Kainhofer here:

    Same problem as we have in all cases when one voice starts with grace notes... You need to add spacer grace notes too all other staves, too:

    :::TeX
    \version "2.14.2"
    
    \new PianoStaff <<
      \new Staff {
        \override Staff.TimeSignature #'stencil = ##f
        \acciaccatura s c
      }
      \new Staff {
        \override Staff.TimeSignature #'stencil = ##f
        \acciaccatura c c
      }
    >>
    

    Cheers,
    Reinhold

     

    Last edit: Simon Albrecht 2015-09-14
  • Google Importer

    Google Importer - 2014-10-02

    Originally posted by: dak@gnu.org

    Ok, let me try another solution sketch here.  Inside of sequential music, we have grace fixups that shorten any music of non-zero duration followed by an arbitrary number of music with zero duration followed by a music with a non-zero grace duration by the specified grace duration, so that all the music with zero duration (like overrides etc) after it are executed at a point of time _before_ their nominal point of time.

    Basically, we need a grace fixup for simultaneous music as well that, in the presence of a graceful start time in the next event, sucks forward all zero-length music in parallel music to occur at the same graceful start time.

    Now here is the rub: in sequential music, the order in the music _supports_ the contention that overrides etc occuring before a grace phrase should be executed _before_ the grace phrase, namely in sequence.

    In simultaneous music, we have no such indication.  As an extreme example, if we have
    <<
      \new Staff { \grace { e'8 } g'1 }
      \new Staff { \once\override NoteHead.color #red c'1 }
    >>
    we don't want the \once\override to be over before it has had a chance to affect c'1.  On the other hand, for
    << \new Staff { \grace { e'8 } g'1 }
       \new Staff { \once\set Staff.instrumentName = "Fagott" c'1 }
    >>
    we don't want to have the instrumentName setting delayed until it can no longer affect the staff.

    So \once has to become more complex, with the _onset_ obeying simultaneous grace fixups, but the revert coming on time.

    The reversal of \once is an obvious candidate where we don't want a simultaneous grace fixup to occur.  It can probably be dealt with with a variation on the finalization hook procedure being told the expected time of delivery, just requeueing when it is too early yet.

    I consider it unlikely that this is the only problem though.  Something like c1*0 is a zero-length event.  Nobody complained so far about the output of, say,
    { c'1 g'8*0 \acciaccatura { e'8 f' } c''1 }
    but I'm not sure everything else will be similarly good-natured.

    For something like
    <<
      \new Staff { c'1 \time 3/4 \acciaccatura { e'8 f' } c''2. }
      \new Staff { c'1 \time 3/4 c''2. }
    >>
    we probably want grace adjustment.

    And even a separate timing track like
    <<
      \new Staff { c'1 \acciaccatura { e'8 f' } c''2. }
      \new Staff { c'1 c''2. }
      \new Devnull { s1 \time 3/4 s2. }
    >>
    would arguably benefit from grace adjustment.  But will it be for every case?

     
  • Thomas Morley

    Thomas Morley - 2016-03-29

    There's a snippet in LSR
    http://lsr.di.unimi.it/LSR/Item?id=978
    trying to provide a woraround.
    How do you think about it? Worth tagging docs or even point to it in NR?

     
    • Phil Holmes

      Phil Holmes - 2016-03-30

      Personally, I think it's too complicated to put in the documentation.

       
<< < 1 2 (Page 2 of 2)