Hi all,

Maybe you know this already, but I just wanted to drop hop into this 
conversation and mention that, while the two solutions suggested by Michael and 
Shane will work well for at least writing a solo piece, you may start to 
experience some issues as you typeset multiple parts, e.g. time signatures and 
clefs behaving erratically at the beginning of a measure, or in the case of 
Shane’s solution, the main beats not aligning vertically. The former case has 
been brought up quite a few times in this mailing list in the past (I was one 
of them, without knowing its history as I am also relatively new to LilyPond). 
See, for example:

https://lists.gnu.org/archive/html/lilypond-user/2020-11/msg00288.html

So using Michael’s \startGliss function and MWE, consider this not so MWE:

\score {
 \new StaffGroup
 <<
  \new Staff
  \relative c' {
   \clef bass
   \startGliss b, f'8 r8 r4
   \startGliss b, f'8 r8 r4
   \time 3/4
   \startGliss b, f'8 r8 r4 r4
  }
  \new Staff
  \relative c, {
   \clef bass
   %    \grace s4 %{ COMMENT/UNCOMMENT THIS LINE %}
   f4 r4 f4 r4
   \time 3/4
   % \grace s4  %{ COMMENT/UNCOMMENT THIS LINE %}
   f4 r4 r4
  }
 >>
}

Shane’s solution, while the main beat may be displaced because of 
\(un)hideNotes, caught my attention for multiplying the main note with a 
fraction because it could be useful to typeset a passage where composer insists 
that the start of the grace note(s) need to be aligned to the main beat (though 
it would not be a common practice):

<< {  \teeny \tweak Stem.length #6 b8*1/2 ( \normalsize d'4*3/4  ) } \\ { g4 } 
>> r4 r4 r4

Just to put this out there to avoid headaches down the road!

Yoshi




-- -- --
Yoshiaki Onishi
https://github.com/yoshiakionishi/lilypond-snippets






Reply via email to