[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying and failing to engrave a segno repeat with coda: More alterna
From: |
Kenneth Wolcott |
Subject: |
Re: Trying and failing to engrave a segno repeat with coda: More alternatives than repeats. |
Date: |
Fri, 9 Jun 2023 09:57:22 -0700 |
Hi Valentin;
Wow, that's a lot to digest; thanks, I'll try to work through that.
Ken
On Fri, Jun 9, 2023 at 2:02 AM Valentin Petzel <valentin@petzel.at> wrote:
>
> Hello Ken,
>
> please try to give a MWE and to describe what you actually want to achieve. It
> is hard to get what you want from just a handful of screenshots of jump marks.
>
> I suppose this is supposed to be something like
>
> A [SEGNO] B [Fine→Coda] C [Dal segno al Fine e poi la coda] [Coda] D
>
> So essentially A → B → C → B → D
>
> What you are doing is something like
>
> {
> c'1 c'
> \repeat segno 2 {
> d' d'
> }
> \alternative {
> \volta 1 { }
> \volta 2 { e' e' }
> { f' f' }
> }
> }
>
> instead you should be doing something like this
>
> {
> c'1 c'
> \repeat segno 2 {
> d' d'
> }
> \alternative {
> { e' e' }
> { f' f' }
> }
> }
>
> Or as given in the documentation
>
> {
> c'1 c'
> \repeat segno 2 {
> d' d'
> }
> \alternative {
> { e' e' }
> { \section \sectionLabel "Coda" }
> }
> f' f'
> }
>
> Now, Lilypond will then produce marks that are more inspired by classical use
> of codas, while this is more a pop-style use of coda marks (where you will
> find
> interesting instructions like this "D.S. al coda" (lit. from the sign to the
> Coda, so start playing repeat from the segno and stop once you reach the
> Coda).
>
> Now, if you want you can simply tell Lilypond to do this thing by simple
> styling directives:
>
> {
> c'1 c'
> \repeat segno 2 {
> d' d'
> }
> \alternative {
> { e' e' }
> { f' f' }
> }
> }
>
> \layout {
> \context {
> \Score
> dalSegnoTextFormatter =
> #(lambda (context return-count marks)
> (let* ((start-markup (car marks))
> (end-markup (cadr marks))
> (next-markup (caddr marks))
> (result (if start-markup "D.S." "D.C.")))
> (if next-markup
> (markup result "al Coda")
> (if end-markup
> (markup result "al" end-markup)
> result))))
> \override CodaMark.self-alignment-X = ##f
> \override CodaMark.font-size = #0
> codaMarkFormatter =
> #(lambda (count context)
> (let* ((coda-markup (format-coda-mark (ceiling (/ count 2)) context)))
> (if (= (remainder count 2) 1)
> (markup #:put-adjacent X LEFT #:center-align coda-markup
> #:fontsize -1 "To Coda ")
> (markup #:put-adjacent X RIGHT #:center-align coda-markup
> #:fontsize -1 " Coda"))))
> }
> }
>
> Cheers,
> Valentin