> The examples in the manual don't really require Scheme knowledge.

Mostly true, but my lack of Scheme knowledge prevents me from fully
understanding the error messages when things go wrong. Here is my attempt:

\version  "2.18.0"

crossGlissando =
#(define-music-function
  (parser location noteA noteB)
  (ly:music? ly:music?)
  #{
    #noteA \glissando
    \change Staff = "up"
    #noteB
    \change Staff = "down"
  #})

\score {
  \new StaffGroup <<
    \new Staff = up
    \new Staff = down {
      \new Voice {
        \crossGlissando c' d'
      }
    }
  >>
}

And the associated errors:
error: syntax error, unexpected EVENT_IDENTIFIER
#noteA
\glissando

error: music function cannot return #<unspecified>
\crossGlissando c' d'

My guess is that a music function can't do a glissando because, per
the 
docs<http://lilypond.org/doc/v2.18/Documentation/web/source/Documentation/internals/glissandoevent>,
"glissando-event is in music objects of type GlissandoEvent." Evidently
music functions are supposed to return something else. This made me wonder
if I can use an event function, but I was also unsuccessful with that route.

Thanks.,
Ben
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to