Hi all,

I'm trying to define a music function that adds a gliss after a note
down to a second parenthesized grace note. I've tried the following, but
the gliss doesn't show up:

    \version "2.19.83"
    \language "english"

    bendDown =
    #(define-music-function
       (parser location firstNote secondNote)
       (ly:music? ly:music?)
        #{
          \afterGrace
          $firstNote
          \glissando
          \once \override Stem.stencil = ##f
          \once \override Flag.stencil = ##f
          \parenthesize $secondNote
        #}
      )

    \score {
      \new Staff \with { instrumentName = #"Flute" }
      {
        \bendDown g'2 f'4
      }
    }

More than this, what I'm truly puzzled by is that if I remove
"\afterGrace" and just let the second note be a normal note, I get an error:

    error: syntax error, unexpected EVENT_IDENTIFIER

    \glissando

If I copy paste the function text replacing the variables, then I get
almost what I want, except that the stem of the grace note is still there:

    \score {
      \new Staff \with { instrumentName = #"Flute" }
      {
        \afterGrace
        g'2
        \glissando
        \once \override Stem.stencil = ##f
        \once \override Flag.stencil = ##f
        \parenthesize f'4
      }
    }

What does seem to totally work is to use a regular grace instead of an
afterGrace, except that I can't seem to write it as a music function
without getting that same "unexpected EVENT_IDENTIFIER" error:

    \score {
      \new Staff \with { instrumentName = #"Flute" }
      {
        g'2
        \glissando
        \grace
        \once \override Stem.stencil = ##f
        \once \override Flag.stencil = ##f
        \parenthesize f'4
      }
    }

Can anyone shed some light on this for me?

Thanks in advance!

Marc

Attachment: pEpkey.asc
Description: application/pgp-keys

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

Reply via email to