[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hauptstimme Brackets?
From: |
Nathan |
Subject: |
Re: Hauptstimme Brackets? |
Date: |
Wed, 4 Jul 2012 11:38:59 -0700 |
On Wed, Jul 4, 2012 at 11:12 AM, Nick Baskin <address@hidden> wrote:
> Hey all,
>
> Is there any way to create Hauptstimme and Nebenstimme brackets in LilyPond?
> My searches of the manual, LSR, and recent list archives have not been
> fruitful. I am using version 2.14.2.
>
> Cheers,
> Nick Baskin
>
> --
> And she forgot the stars, the moon, and sun,
> And she forgot the blue above the trees,
> And she forgot the dells where waters run,
> And she forgot the chilly autumn breeze...
>
> — Keats, "Isabella, or the Pot of Basil"
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
Here's a solution using markup paths and text spanners:
%%%
\version "2.14.2"
hauptstimmeStart = \markup {
\path #0.25 #'((moveto 0 0)
(lineto 0 -2)
(moveto 0 -1)
(lineto 1 -1)
(moveto 1 0)
(lineto 1 -2)
(moveto 1 0)
(lineto 1.8 0))
}
nebenstimmeStart = \markup {
\path #0.25 #'((moveto 0 -2)
(lineto 0 0)
(lineto 1 -2)
(lineto 1 0)
(lineto 1.8 0))
}
hauptstimmeEnd = \markup {
\path #0.25 #'((moveto 0 0)
(lineto 0.8 0)
(lineto 0.8 -0.8))
}
hauptstimme = {
\once \override TextSpanner #'style = #'none
\once \override TextSpanner #'(bound-details left text) = \hauptstimmeStart
\once \override TextSpanner #'(bound-details right text) = \hauptstimmeEnd
}
nebenstimme = {
\once \override TextSpanner #'style = #'none
\once \override TextSpanner #'(bound-details left text) = \nebenstimmeStart
\once \override TextSpanner #'(bound-details right text) = \hauptstimmeEnd
}
\relative c' {
\hauptstimme
| c4\startTextSpan c4 c4 c4
| c4 c4 c4 c4\stopTextSpan
| c4 c4 c4 c4
\nebenstimme
| c4\startTextSpan c4 c4 c4
| c4 c4 c4 c4\stopTextSpan
}
%%%
Feel free to edit the paths as necessary.
For more information on text spanners, see
http://lilypond.org/doc/v2.14/Documentation/notation/writing-text#text-spanners
For more information on markup paths, see
http://lilypond.org/doc/v2.14/Documentation/notation/graphic#index-drawing-paths
Cheers,
Nathan