[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-bug
Subject:    =?UTF-8?Q?Re=3a_In_TabStaff=2c_=5cgrace_with_=5coverride_misbehaves?= =?UTF-8?Q?_when_it=e2=80=99s_t
From:       Jean Abou Samra <jean () abou-samra ! fr>
Date:       2021-07-20 11:56:48
Message-ID: 0b950598-b54c-ed3d-2971-b5097b056ae7 () abou-samra ! fr
[Download RAW message or body]

Le 20/07/2021 à 13:14, Nate Whetsell a écrit :
> Hi there,
> 
> Thanks for all your work on LilyPond!
> 
> In a TabStaff, if a grace note is the first note and the \grace contains overrides, \
> the overrides seem to be applied to whatever follows the grace note (instead of the \
> grace note itself). Here’s an example that illustrates the behavior: 
> ```
> \version "2.22.1"
> 
> % Font size is unexpectedly increased for what follows the grace note.
> \score {
> \new TabStaff {
> \grace { \override TabNoteHead.font-size = #3 c' \revert TabNoteHead.font-size } d'
> }
> }
> 
> % But when something precedes the grace note, font size increases as expected.
> \score {
> \new TabStaff {
> r \grace { \override TabNoteHead.font-size = #3 c' \revert TabNoteHead.font-size } \
> d' }
> }
> ```
> 
> (I also tried this using the latest version from the Git repo, and the behavior is \
> the same.) 
> All the best,
> Nate


Hello,

Thanks for your report. The same happens in Staff:

\version "2.23.4"

{
   \grace {
     \override NoteHead.font-size = 3
     c'
     \revert NoteHead.font-size
   }
   d'
}

This is because graces have special settings, which
include a value for NoteHead.font-size (as well as
TabNoteHead.font-size). When the first grace note
arrives, the settings start applying and override what
you did. Then, the \revert pops those settings off the
stack, and your setting shines start to shine through.
A second \revert would cancel your \override:

\version "2.23.4"

{
   \grace {
     \override NoteHead.font-size = 3
     c'
     \revert NoteHead.font-size
     \revert NoteHead.font-size
   }
   d'
}

Unfortunately, grace timing is such a tricky thing
that I doubt we'll be able to do much better here.

Fortunately, there exists a user interface to change
the layout of grace notes:

\version "2.23.4"

\new Voice {
   $(add-grace-property 'Voice 'NoteHead 'font-size 3)
   \grace {
     c'
   }
   d'
}

(do note the importance of the explicit \new Voice).

Please see the snippet "Tweaking grace layout within music" at
lilypond.org/doc/v2.23/Documentation/notation/special-rhythmic-concerns.html#grace-notes


Best regards,
Jean

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic