lilypond-user
[Top][All Lists]
Advanced

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

Re: Simultaneous text spanners


From: David Stocker
Subject: Re: Simultaneous text spanners
Date: Tue, 03 Nov 2009 13:31:20 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

One possible solution is to make a hidden voice. The code is a little more laborious, and you'll get lots of clashing note column warnings from the terminal, but it produces two separate spanners with individual start and stop points.

Hope that helps,

David

%%begin duling-spanners

\version "2.13.6"

spanOne = {
\override TextSpanner #'(bound-details left text) = \markup { "span one" }
}

spanTwo = {
\override TextSpanner #'(bound-details left text) = \markup { "span two" }
}

\score {
  \new Staff {
    \clef "bass"
    \time 4/4
    <<
      \new Voice = "visible" {
    \relative c {
      \oneVoice
      \spanOne c4 \startTextSpan c c c
      d4 d d d \stopTextSpan
      e4 e e e
    }
      }
      \new Voice = "hidden" {
    \relative c {
      \hideNotes
      c4 c \spanTwo c \startTextSpan c
      d4 d d d
      e4 e \stopTextSpan e e
    }
      }
    >>
  }
  \layout { }
}

%%end duling-spanners

James W. wrote:
Hello,

Kind of new to Lilypond (been using it for a few months), but love it so far.

My question: Is it possible to have simultaneous text spanners in a single
voice context? In my example below, there are obvious problems with the
two undistinguished \stopTextSpanner commands. But I think it illustrates
what I'm trying to do. If it is not possible this way, how would I go about
doing it? I've read the Learning Manual a couple of times, the Notation
Manual, looked in the archives of this mailing list, etc. Any help will be
greatly appreciated.

% begin example
\version "2.13.6"

spanOne = {
   \override TextSpanner #'(bound-details left text) = \markup { "span one" }
}

spanTwo = {
   \override TextSpanner #'(bound-details left text) = \markup { "span two" }
}

\score {
   \new Staff {
       \relative c {
           \clef bass
           \time 4/4

           \spanOne c4 \startTextSpan c \spanTwo c \startTextSpan c
           d4 d d d \stopTextSpan
           e4 e \stopTextSpan e e
       }

   }

   \layout { }
}
% end example

Thanks,
James Worlton


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

\version "2.13.6"

spanOne = {
   \override TextSpanner #'(bound-details left text) = \markup { "span one" }
}

spanTwo = {
   \override TextSpanner #'(bound-details left text) = \markup { "span two" }
}

\score {
   \new Staff {
     \clef "bass"
     \time 4/4
     <<
       \new Voice = "visible" {
         \relative c {
           \oneVoice
           \spanOne c4 \startTextSpan c c c
           d4 d d d \stopTextSpan
           e4 e e e
         }
       }
       \new Voice = "hidden" {
         \relative c {
           \hideNotes
           c4 c \spanTwo c \startTextSpan c
           d4 d d d
           e4 e \stopTextSpan e e
         }
       }
     >>
   }
   \layout { }
}

reply via email to

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