I am having trouble subdividing "grace notes" (they look like grace notes
but aren't created with \grace) into three and four subgroups of 32nd
notes.  I've attached images of what I need to do and what I am getting
with the code below:

\version "2.19.15"
\language "english"

staffUp = \change Staff = "upper"
staffDown = \change Staff = "lower"

graceOn = {
  \teeny
  \override Stem.no-stem-extend = ##t
  \override Stem.length-fraction = #0.7
}
graceOff = {
  \normalsize
  \revert Stem.no-stem-extend
  \revert Stem.length-fraction
}

subGroupThirtySecond = {
  \set subdivideBeams = ##t
  \set baseMoment = #(ly:make-moment 1/32)
  \set beatStructure = #'(8 8)
}
subGroupOff = {
  \set subdivideBeams = ##f
}

global = {
  \key c \major
  \time 2/4
}

upperStaffTop = \relative c'' {
  b8 \rest
    <<
      {
        \voiceOne \staffDown fs,= _( [ \staffUp d''16-. ] )
      }
      \new Voice {
        \voiceTwo
        \subGroupThirtySecond
        \scaleDurations 4/11 {
          \staffDown \stemUp fs,,=16. \graceOn gs32 bf c d
          \staffUp \stemDown fs gs bf c
        }
        \subGroupOff
      }
    >>
    d16 \rest d8 \rest |
}

upperStaffBottom = \relative c' {
}

lowerStaffTop = \relative c' {

}

lowerStaffBottom = \relative c, {
  bf4.-- bf'8-. |
}

%%
%% Below is boilerplate
%%

upperStaff = {
  \clef treble
  \global
  <<
    \new Voice { \voiceOne \upperStaffTop }
    \new Voice { \voiceTwo \upperStaffBottom }
  >>
}

lowerStaff = {
  \clef bass
  \global
  <<
    \new Voice { \voiceThree \lowerStaffTop }
    \new Voice { \voiceFour \lowerStaffBottom }
  >>
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upperStaff
    \new Staff = "lower" \lowerStaff
  >>
  \layout{
  }
}

Knute Snortum
(via Gmail)
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to