lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subdividing "grace notes"


From: Pierre Perol-Schneider
Subject: Re: Subdividing "grace notes"
Date: Wed, 10 Dec 2014 19:38:34 +0100

Hi,

You'll have somehow to put some space between both staves (here with dynamics and markup) in order to find a nice beam slope.
So here you go :

\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
  -\tweak X-offset #-6
  -\tweak Y-offset #-5
  _\markup\override #'(baseline-skip . 2.0)\tiny\italic\column { "(comme un très" "léger glissando)" }
    <<
      {
        \offset positions #'(3 . 0) Beam
        \voiceOne \staffDown
        \once\override Slur.control-points = #'((1 . 0) (5 . -2) (22 . 0) (25 . 13))
       fs, ( [ \staffUp d''16-. ] )
      }
      \new Voice {
        \voiceTwo
        \subGroupThirtySecond
        \scaleDurations 4/11 {
          \staffDown \stemUp
          fs,,=16.
          \graceOn
          \set stemLeftBeamCount = #3
          \set stemRightBeamCount = #1
          gs32
          \set stemLeftBeamCount = #1
          bf c
          \set stemRightBeamCount = #1
          d
          \staffUp \stemDown
          \set stemLeftBeamCount = #1
        
          fs gs bf c
        }
        \subGroupOff
      }
    >>
    d16 \rest d8 \rest |
}

upperStaffBottom = \relative c' {
}

lowerStaffTop = \relative c' {

}

lowerStaffBottom = \relative c, {
  bf4.-- ^\pp 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{
  }
}


HTH,
Pierre

2014-12-10 19:03 GMT+01:00 Knute Snortum <address@hidden>:
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
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

[Prev in Thread] Current Thread [Next in Thread]