All,

Going off the of the thread here:

http://lists.gnu.org/archive/html/lilypond-user/2016-09/msg00374.html

and some personal email exchanges, I tried out a few things (found a
working solution, though not ideal) and ran into something curious. I'd
like to do something like the following, but it doesn't seem to work:

%%%%%%%%%

\version "2.19.36"

myStartTextSpan = #(define-music-function (mus) (ly:music?)
#{
  \once \override TextSpanner.bound-details.left.text = "rit."
  $mus \startTextSpan
#})

myStopTextSpan = #(define-music-function (mus) (ly:music?)
#{
  $mus \stopTextSpan
  <>^\markup \italic "a tempo"
#})

\relative c' {
  \myStartTextSpan b'1
  c1
  \myStopTextSpan e,1
  g1
}

%%%%%%%%%

This results in "unexpected EVENT_IDENTIFIER" errors at both

  $mus \startTextSpan

and

  $mus \stopTextSpan

When I put everything into a single expression without using music
functions, it works as expected:

%%%%%%%%%

\version "2.19.36"

\relative c' {
  \override TextSpanner.bound-details.left.text = "rit."
  b'1\startTextSpan
  c1
  e,1\stopTextSpan
  <>^\markup \italic "a tempo"
  g1
}

%%%%%%%%%

This is just a simple example. The real use-case has numerous other
\override statements that should occur prior to \startTextSpan, but the
general idea is the same.

Anyone know what's going on here?

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

Reply via email to