lilypond-user
[Top][All Lists]
Advanced

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

Re: Is there a better way to have a boxed part letter at the beginning o


From: William Rehwinkel
Subject: Re: Is there a better way to have a boxed part letter at the beginning of an arbitrary line?
Date: Wed, 16 Aug 2023 14:18:06 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

Dear Kevin,

I use "\sectionLabel"s for this.


\version "2.25.6"
\language "english"

melody = \relative c' {
  \time 6/8
  \key d \major
  \clef treble

  \sectionLabel \markup{ \box \pad-markup #0.5 "A" }
  d8[ e8
e8] g8[ a8 b8] |
  \break
  \sectionLabel \markup{  \box \pad-markup #0.5 "B"  }
  d8[ e8
e8] g8[ a8 b8] |
  \bar "|."
}

\score {
  \new Voice = "mel" { \melody }

  \layout {
    \autoBeamOff
    indent = 0\mm
  }
}

BTw, I just saw the second email you sent in this thread, and I'm not exactly sure what you mean but I would probably have a separate variable with the section labels, and you can combine them, a bit like this:

\version "2.25.7"

sections={ \sectionLabel "1" s1 \sectionLabel "2"}
music = { c'4 d' e' d' c' e' g' c' }

\score {
  \new Staff << \sections \music >>
}


thanks,
-William

On 8/16/23 14:02, Kevin Cole wrote:
A minimum working example will make the question clearer: Although the
following produces what I want, it seems very ugly, and I suspect
there's a better way to accomplish the same thing: Placing the [A] and
[B] boxed letters for the tune parts at the beginning of a line.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.24.2"
\language "english"

melody = \relative c' {
  \time 6/8
  \key d \major
  \clef treble

  d8^\markup \translate #'(-10 . 0) { \box \pad-markup #0.5 "A" }[ e8
e8] g8[ a8 b8] |
  \break
  d8^\markup \translate #'(-10 . 0) { \box \pad-markup #0.5 "B" }[ e8
e8] g8[ a8 b8] |
  \bar "|."
}

\score {
  \new Voice = "mel" { \melody }

  \layout {
    \autoBeamOff
    indent = 0\mm
  }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


-- 
+ ------------------------------------------- +
|   William Rehwinkel - Oberlin College and   |
|                          Conservatory '24   |
|        william@williamrehwinkel.net         |
| PGP key:                                    |
| https://ftp.williamrehwinkel.net/pubkey.txt |
+ ------------------------------------------- +

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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