Simultaneous text spanners

View: New views
5 Messages — Rating Filter:   Alert me  

Simultaneous text spanners

by James W. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
lilypond-user@...
http://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Simultaneous text spanners

by David Stocker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
> lilypond-user@...
> 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 { }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@...
http://lists.gnu.org/mailman/listinfo/lilypond-user
David Stocker dstocker@thenotesetter.com www.thenotesetter.com

Re: Simultaneous text spanners

by James W. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(My original reply went to David only, sorry)
Thanks, for your quick response David. It's a little less elegant than I
was hoping for, but it does work!

Any alternative solutions out there? If not, that's fine, David's solution
does work.

Thanks,
James Worlton


On Tue, Nov 3, 2009 at 12:31 PM, David Stocker
<dstocker@...> wrote:

> 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
>> lilypond-user@...
>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>


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

Re: Simultaneous text spanners

by James W. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For what it's worth, to get rid of the clashing note column warning in
the terminal, just substitute the notes in the "hidden" voices with
fake notes (spacer rests) of the appropriate duration.

James Worlton

On Tue, Nov 3, 2009 at 1:16 PM, James W. <jworlton@...> wrote:

> (My original reply went to David only, sorry)
> Thanks, for your quick response David. It's a little less elegant than I
> was hoping for, but it does work!
>
> Any alternative solutions out there? If not, that's fine, David's solution
> does work.
>
> Thanks,
> James Worlton
>
>
> On Tue, Nov 3, 2009 at 12:31 PM, David Stocker
> <dstocker@...> wrote:
>> 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
>>> lilypond-user@...
>>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>>>
>>>
>>
>


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

Re: Simultaneous text spanners

by Trevor Bača-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Setting ...

  \override NoteColumn #'ignore-collision = ##t

... might also work.

Trevor.


On Tue, Nov 3, 2009 at 2:30 PM, James W. <jworlton@...> wrote:
For what it's worth, to get rid of the clashing note column warning in
the terminal, just substitute the notes in the "hidden" voices with
fake notes (spacer rests) of the appropriate duration.

James Worlton

On Tue, Nov 3, 2009 at 1:16 PM, James W. <jworlton@...> wrote:
> (My original reply went to David only, sorry)
> Thanks, for your quick response David. It's a little less elegant than I
> was hoping for, but it does work!
>
> Any alternative solutions out there? If not, that's fine, David's solution
> does work.
>
> Thanks,
> James Worlton
>
>
> On Tue, Nov 3, 2009 at 12:31 PM, David Stocker
> <dstocker@...> wrote:
>> 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
>>> lilypond-user@...
>>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>>>
>>>
>>
>


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



--
Trevor Bača
trevorbaca@...

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