Align voiceOne and voiceFour

2022-01-10 Thread Vlado Ilić
Hello everyone, here's the example:

\version "2.22.1"
\relative c'' {
\key e \major
<< {dis4. dis8}
\\
 {e,4 dis}
\\
 {}
\\
 {fis2}
>>
}

This example is exactly what i need but with small exception, dis4 in first
voice and fis2 in fourth voice to be aligned vertically, not e4 in second
voice.
How can i do this? I've tried combinations of /shiftOn and /shiftOff but
havent got the desired results, in some scenarios e4 and fis2 switch places
but
i want fis2 aligned with dis4 and then e4 right of it.
Thanks in advance


Re: Align voiceOne and voiceFour

2022-01-10 Thread Vlado Ilić
Ah, that's it! Thank you!

уто, 11. јан 2022. у 00:43 Valentin Petzel  је
написао/ла:

> Hello Vlado,
>
> You can of course manually resolve the shifts:
>
> \version "2.22.1"
> \relative c'' {
> \key e \major
> << {dis4. dis8}
> \\
>  { \tweak NoteColumn.force-hshift #1.1 e,4 dis}
> \\
>  {}
> \\
>  { \tweak NoteColumn.force-hshift #0 fis2}
> >>
> }
>
> Cheers,
> Valentin
>
>
>
> Am Montag, 10. Jänner 2022, 21:41:20 CET schrieb Vlado Ilić:
> > Hello everyone, here's the example:
> >
> > \version "2.22.1"
> > \relative c'' {
> > \key e \major
> > << {dis4. dis8}
> > \\
> >  {e,4 dis}
> > \\
> >  {}
> > \\
> >  {fis2}
> >
> > }
> >
> > This example is exactly what i need but with small exception, dis4 in
> first
> > voice and fis2 in fourth voice to be aligned vertically, not e4 in second
> > voice.
> > How can i do this? I've tried combinations of /shiftOn and /shiftOff but
> > havent got the desired results, in some scenarios e4 and fis2 switch
> places
> > but
> > i want fis2 aligned with dis4 and then e4 right of it.
> > Thanks in advance


Print brace, clef and key signature at start of Coda separated by blank space

2023-08-16 Thread Vlado Ilić
Hello everyone, example:
\version "2.24.1"

upper = {
\key as \minor
c'1
\stopStaff
s1*4
\startStaff
\section
\sectionLabel "Coda"
c'1
\bar ".|"
}

lower = {
\key as \minor
c'1
\stopStaff
s1*4
\startStaff
\section
\sectionLabel "Coda"
c'1
\bar "|."
}

\score {
  \new PianoStaff
  <<
\new Staff = "upper" \upper
\new Staff = "lower" \lower
  >>
}

How can I force lilypond to print pianostaff brace, clef and key signature
at the beginning of Coda that is not on line break?


How to change coda mark symbol in \repeat segno structure?

2023-08-17 Thread Vlado Ilić
Hello,

I'm trying to change coda symbol that appears when using  \repeat segno
structure.If i understand correctly, Mark_engraver is responsible for it
and Layout Object is CodaMark.
I've tried setting \override CodaMark.text = \markup {"test"} in Voice,
Staff and Score context but nothing changes.
What am I missing?


Re: How to change coda mark symbol in \repeat segno structure?

2023-08-18 Thread Vlado Ilić
That's it, thanks!

пет, 18. авг 2023. у 08:32 Jean Abou Samra  је
написао/ла:

> This should do the trick:
>
> \version "2.24.2"
>
> {
>   \repeat segno 2 {
> c'1
> \alternative {
>   \volta 1 {
> \once \set Score.codaMarkFormatter =
>   #(lambda args
>  #{ \markup "foo bar" #})
> c'1
>   }
>   \volta 2 \volta #'() { \section \sectionLabel Coda }
> }
>   }
>   c'1
> }
>
>


Re: Print brace, clef and key signature at start of Coda separated by blank space

2023-08-18 Thread Vlado Ilić
Thank you both, it works great!

I had some huge scheme code before v2.24 that i found on maillist, but it
stopped working on v2.24, so i had to disable it.
And since I've converted old scores to new \repeat segno structure, i hoped
that now there is a easy way of doing it, but now i know it's still a
complex matter.

Now if i understand correctly, this code only handles start brace, but
cross-staff vertical line is drawn manually with markup?

I've actually did it similarly with markup:

\version "2.24.1"

upper = {
  \key as \minor
  c'1
  \stopStaff
  s1*4
  \once \omit Staff.BarLine
  \once \omit PianoStaff.SpanBar
  \startStaff
  \once \set Staff.forceClef = ##t
  \once \override Staff.Clef.full-size-change = ##t
  \once \override Staff.Clef.extra-offset = #'(0.8 . 0)
  \override PianoStaff.KeySignature.extra-offset = #'(-0.7 . 0)
  \key as \minor
  \override TextScript.X-offset = #-15.33
  \override TextScript.Y-offset = #1.945
  \section
  \sectionLabel "Coda"
  c'1^\markup { \lower #6.5
\override #'(font-encoding . fetaBraces)
\lookup "brace179"
\hspace #-0.2
\override #'(line-cap-style . square)
\with-dimensions #'(0 . 0) #'(0 . 0)
\override #'(thickness . 2)
\draw-line #'(0 . -12.875)
  }
  \bar "|."
}

lower = {
  \key as \minor
  c'1
  \stopStaff
  s1*4
  \once \omit Staff.BarLine
  \startStaff
  \once \set Staff.forceClef = ##t
  \once \override Staff.Clef.full-size-change = ##t
  \once \override Staff.Clef.extra-offset = #'(0.8 . 0)
  \key as \minor
  \section
  \sectionLabel "Coda"
  c'1
  \bar "|."
}

\score {
  \new PianoStaff
  <<
\new Staff = "upper" \upper
\new Staff = "lower" \lower
  >>
}

but it is a manual positioning nightmare, any slight change can get it
misaligned.

пет, 18. авг 2023. у 16:35 Jean Abou Samra  је
написао/ла:

> Oops: I am so sorry, Jean. Must work out how to turn AutoCorrect off, or
> actually read messages before I send them.
>
> Apologies, once again
>
>
>
> No worries, I didn't take it personally, I was just amused at seeing *yet
> another* spelling for my name :)
>
> (You're far from the only one misspelling or misunderstanding my name on
> the Internet or in real life, I've had Abou Sarra, Abou Sanra, Abou Samba,
> etc. etc. People also think I'm "Jean-Abou Samra" or "Jean A. Samra"
> instead of "Jean" "Abou Samra", which is understandable given cultural
> differences… At least don't suffer from encoding misfortunes, unlike those
> with an Ł, Ö or É in their name...)
>
>
> Anyway, Vlado: the solution Alex gave is indeed among the simplest ones
> devised so far for this problem. It's unfortunately not really simple, but
> at least it works. There is also
>
> https://lsr.di.unimi.it/LSR/Item?id=198
>
> with a simpler variant where there are no system start braces to replicate
> (those are the main source of complexity).
>
> There have been various talks of enabling this with built-in commands over
> the years, and I even started work on it at some point, but it was not
> quite simple.
>


Volta spanner only on first and last repeat bar

2023-08-19 Thread Vlado Ilić
I can shorten a volta spanner to first bar with
\set Score.voltaSpannerDuration
But how can I make it show on the last bar?

For example, the first repeat bar is on page 1 and the last bar is on page
3, how can i avoid printing volta spanner on the 2nd page?


Time signature at the end of measure before jump to coda

2024-08-03 Thread Vlado Ilić
So i need something like in the first picture, on coda i have different
time signature than the one before the jump so i need to mark time change
just before the jump. Also related, in the second image i need to mark time
and key change before jumping from D.S. to the beginning of the piece. How
can i achieve that? Thanks


Shorten volta spanner to first and last measure only

2024-08-03 Thread Vlado Ilić
I see there is a

\set Score.voltaSpannerDuration = #(ly:make-moment 3/4)

but it only prints the volta spanner on the beginning of alternative
music, is it possible to print it also on the last measure of
alternative?

For example, if i have 28 measures of alternative music, only to print
volta spanner on measure 1 and measure 28


Re: Time signature at the end of measure before jump to coda

2024-08-03 Thread Vlado Ilić
Thanks,
While it does show what i want, problem is that next measures (g4 in this
example) also takes 6/8 time. Example

\version "2.24.4"

music = \fixed c' {
  f1
  \repeat segno 2 {
g1
\alternative {
  \volta 1 { \repeat unfold 4 { a2 }
  \break
  \key f \major
  \time 6/8
  \repeat unfold 9 { a4 }
  \break

  }
  \volta 2 \volta #'() {
  \section
  \sectionLabel Coda
  }
}
  }

  \key c \major
  \time 6/8
  \repeat unfold 9 {a4}
  \fine
}

\score { \music }

In this example, from bar 7 there's a jump to segno in bar 2, bar 7 is in f
major and 6/8 time but a bar 2 is in c major and 4/4 so i want to mark that
at the end of bar 7 (key and time is shown on end of bar from coda but i
need key and time from bar 2), also from bar 2 there is a jump to coda on
bar 8 and because the coda is in 6/8 i want to mark that on end of bar 2,
if i add the solution:

\version "2.24.4"

music = \fixed c' {
  f1
  \repeat segno 2 {
g1
\once \override Score.BreakAlignment.break-align-orders =
##((left-edge
staff-ellipsis
cue-end-clef
ambitus
breathing-sign
signum-repetitionis
clef
cue-clef
key-cancellation
key-signature
time-signature
staff-bar
custos)
  (left-edge
staff-ellipsis
cue-end-clef
ambitus
breathing-sign
signum-repetitionis
clef
cue-clef
key-cancellation
key-signature
time-signature
staff-bar
custos)
  (left-edge
staff-ellipsis
ambitus
breathing-sign
signum-repetitionis
clef
key-cancellation
key-signature
time-signature
staff-bar
cue-clef
custos))
  \once \override Staff.Parentheses.font-size = 4
  \parenthesize \time 6/8
\alternative {
  \volta 1 { \repeat unfold 4 { a2 }
  \break
  \key f \major
  \time 6/8
  \repeat unfold 9 { a4 }
  \break

  }
  \volta 2 \volta #'() {
  \section
  \sectionLabel Coda
  }
}
  }

  \key c \major
  \time 6/8
  \repeat unfold 9 {a4}
  \fine
}

\score { \music }


it breaks the measures 3 and 4, so i need to mark time signature just as
symbol, not as real time for next measures.

On Sat, Aug 3, 2024 at 8:08 PM Xavier Scheuer  wrote:

> On Sat, 3 Aug 2024 at 17:17, Vlado Ilić  wrote:
> >
> > So i need something like in the first picture, on coda i have different
> time signature than the one before the jump so i need to mark time change
> just before the jump. Also related, in the second image i need to mark time
> and key change before jumping from D.S. to the beginning of the piece. How
> can i achieve that? Thanks
>
> Hello,
>
> For 1, use \once \override Score.BreakAlignment.break-align-orders.
>
> \relative c'' {
>   \partial 8 e16 f
>   \once \override Score.BreakAlignment.break-align-orders =
> ##((left-edge
> staff-ellipsis
> cue-end-clef
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> cue-clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> custos)
>   (left-edge
> staff-ellipsis
> cue-end-clef
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> cue-clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> custos)
>   (left-edge
> staff-ellipsis
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> cue-clef
> custos))
>   \once \override Staff.Parentheses.font-size = 4
>   \parenthesize \time 6/8
>   g4
> }
>
> Kind regards,
> Xavier
>


Cross-nesting \repeat segno and \repeat volta

2024-08-03 Thread Vlado Ilić
I'm wondering the same thing, here's my example:

\version "2.24.4"

\relative c' {
c1

\mark \markup{\segno}
\repeat volta 2 {
d
\mark \markup{\coda}
\alternative {
  \volta 1 {
e
}
\volta 2 {
f
}
}
}
g_\markup { \hspace #8 \center-column {
\line {\italic "D.S." \segno \italic "al" \coda}
\italic "e poi la Coda"
}
}
\break
\sectionLabel "Coda"
\repeat unfold 5 {a}
\bar "|."
}

Is it possible to write this using repeat segno structure?


Re: Time signature at the end of measure before jump to coda

2024-08-07 Thread Vlado Ilić
This is what i came up with

\version "2.24.4"

\relative c'' {

 f
 \tweak extra-offset #'(0 . -2)
 \rightHandFinger
 \markup{
   \parenthesize{
\fontsize #4 \compound-meter #'(6 8)
}
}
}

It's hacky but it works.

On Sun, Aug 4, 2024 at 1:43 AM Vlado Ilić  wrote:

> Thanks,
> While it does show what i want, problem is that next measures (g4 in this
> example) also takes 6/8 time. Example
>
> \version "2.24.4"
>
> music = \fixed c' {
>   f1
>   \repeat segno 2 {
> g1
> \alternative {
>   \volta 1 { \repeat unfold 4 { a2 }
>   \break
>   \key f \major
>   \time 6/8
>   \repeat unfold 9 { a4 }
>   \break
>
>   }
>   \volta 2 \volta #'() {
>   \section
>   \sectionLabel Coda
>   }
> }
>   }
>
>   \key c \major
>   \time 6/8
>   \repeat unfold 9 {a4}
>   \fine
> }
>
> \score { \music }
>
> In this example, from bar 7 there's a jump to segno in bar 2, bar 7 is in
> f major and 6/8 time but a bar 2 is in c major and 4/4 so i want to mark
> that at the end of bar 7 (key and time is shown on end of bar from coda but
> i need key and time from bar 2), also from bar 2 there is a jump to coda on
> bar 8 and because the coda is in 6/8 i want to mark that on end of bar 2,
> if i add the solution:
>
> \version "2.24.4"
>
> music = \fixed c' {
>   f1
>   \repeat segno 2 {
> g1
> \once \override Score.BreakAlignment.break-align-orders =
> ##((left-edge
> staff-ellipsis
> cue-end-clef
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> cue-clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> custos)
>   (left-edge
> staff-ellipsis
> cue-end-clef
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> cue-clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> custos)
>   (left-edge
> staff-ellipsis
> ambitus
> breathing-sign
> signum-repetitionis
> clef
> key-cancellation
> key-signature
> time-signature
> staff-bar
> cue-clef
> custos))
>   \once \override Staff.Parentheses.font-size = 4
>   \parenthesize \time 6/8
> \alternative {
>   \volta 1 { \repeat unfold 4 { a2 }
>   \break
>   \key f \major
>   \time 6/8
>   \repeat unfold 9 { a4 }
>   \break
>
>   }
>   \volta 2 \volta #'() {
>   \section
>   \sectionLabel Coda
>   }
> }
>   }
>
>   \key c \major
>   \time 6/8
>   \repeat unfold 9 {a4}
>   \fine
> }
>
> \score { \music }
>
>
> it breaks the measures 3 and 4, so i need to mark time signature just as
> symbol, not as real time for next measures.
>
> On Sat, Aug 3, 2024 at 8:08 PM Xavier Scheuer  wrote:
>
>> On Sat, 3 Aug 2024 at 17:17, Vlado Ilić  wrote:
>> >
>> > So i need something like in the first picture, on coda i have different
>> time signature than the one before the jump so i need to mark time change
>> just before the jump. Also related, in the second image i need to mark time
>> and key change before jumping from D.S. to the beginning of the piece. How
>> can i achieve that? Thanks
>>
>> Hello,
>>
>> For 1, use \once \override Score.BreakAlignment.break-align-orders.
>>
>> \relative c'' {
>>   \partial 8 e16 f
>>   \once \override Score.BreakAlignment.break-align-orders =
>> ##((left-edge
>> staff-ellipsis
>> cue-end-clef
>> ambitus
>> breathing-sign
>> signum-repetitionis
>> clef
>> cue-clef
>> key-cancellation
>> key-signature
>> time-signature
>> staff-bar
>> custos)
>>   (left-edge
>> staff-ellipsis
>> cue-end-clef
>> ambitus
>> breathing-sign
>> signum-repetitionis
>> clef
>> cue-clef
>> key-cancellation
>> key-signature
>> time-signature
>> staff-bar
>> custos)
>>   (left-edge
>> staff-ellipsis
>> ambitus
>> breathing-sign
>> signum-repetitionis
>> clef
>> key-cancellation
>> key-signature
>> time-signature
>> staff-bar
>> cue-clef
>> custos))
>>   \once \override Staff.Parentheses.font-size = 4
>>   \parenthesize \time 6/8
>>   g4
>> }
>>
>> Kind regards,
>> Xavier
>>
>