Re: Leadsheet with cadenza / ad lib.

2023-06-07 Thread Leo Correia de Verdier
What is aligned in Lilypond is not the bars, but the lengths of the 
notes/skips/rests. CadenzaOn allows you to have a bar of arbitrary length, but 
does not negate the alignment of the note values (it’s also valid for all 
staves, as long as you haven’t moved engravers around). Your harmonies still 
need to have the same length as the melody, so:

harmonies = \chordmode {
  \global
  s16*19
  a1:m
  s16*22
  f1:m
  \fine
}

HTH
/Leo

> 8 juni 2023 kl. 00:44 skrev Stephan Schöll :
> 
> Hi all
> 
> I have a song that starts with 1 bar of adlib (without accompaniment), 1
> bar of silence in the melody, but with a chord, then another melody
> adlib bar without accompaniment, and finally (in this example) again a
> bar with chords only (w/o accompaniment). I cannot figure out how to
> align the bars of the two parts (melody and chords, and further ones
> later) properly. I tried to move the Timing_translator from the score to
> the staff context but without success. Any advice is highly appreciated.
> 
> TIA, Stephan
> 
> BTW: the song is "Somethings' Got A Hold On Me" by Etta James - the
> notes in the MVE do not match yet of course ;-)
> 
> \version "2.24.1"
> 
> global = {
>   \key c \major
>   \time 4/4
> }
> 
> melody = \relative c'' {
>   \global
>   \cadenzaOn
>   \repeat unfold 19 { a16 }
>   \cadenzaOff
>   \bar "|"
>   R1\fermata
>   \cadenzaOn
>   \repeat unfold 21 { f16 } f16\fermata
>   \cadenzaOff
>   \bar "|"
>   R1
>   \fine
> }
> 
> harmonies = \chordmode {
>   \global
>   s1
>   a1:m
>   s1
>   f1:m
>   \fine
> }
> 
> melodyPart = \new Staff {
>   \melody
> }
> 
> chordPart = \new ChordNames { \harmonies }
> 
> \score {
>   <<
> \chordPart
> \melodyPart
>   >>
>   \layout {}
> }
> 
> 



Leadsheet with cadenza / ad lib.

2023-06-07 Thread Stephan Schöll

Hi all

I have a song that starts with 1 bar of adlib (without accompaniment), 1
bar of silence in the melody, but with a chord, then another melody
adlib bar without accompaniment, and finally (in this example) again a
bar with chords only (w/o accompaniment). I cannot figure out how to
align the bars of the two parts (melody and chords, and further ones
later) properly. I tried to move the Timing_translator from the score to
the staff context but without success. Any advice is highly appreciated.

TIA, Stephan

BTW: the song is "Somethings' Got A Hold On Me" by Etta James - the
notes in the MVE do not match yet of course ;-)

\version "2.24.1"

global = {
  \key c \major
  \time 4/4
}

melody = \relative c'' {
  \global
  \cadenzaOn
  \repeat unfold 19 { a16 }
  \cadenzaOff
  \bar "|"
  R1\fermata
  \cadenzaOn
  \repeat unfold 21 { f16 } f16\fermata
  \cadenzaOff
  \bar "|"
  R1
  \fine
}

harmonies = \chordmode {
  \global
  s1
  a1:m
  s1
  f1:m
  \fine
}

melodyPart = \new Staff {
  \melody
}

chordPart = \new ChordNames { \harmonies }

\score {
  <<
    \chordPart
    \melodyPart
  >>
  \layout {}
}




Re: In-staff fermata with 2.25.

2023-06-07 Thread Jean Abou Samra



> Le 7 juin 2023 à 23:52, Thomas Morley  a écrit :
> 
> thanks!
> Though, below commit-message does not explain why a tweak works, but
> an override not.
> Personally I think this is very strange and apart from that, totally
> undocumented.
> Do we have other, but similar, situations where a tweak works an override not?


That's (as in most cases) because the engraver does the C++ equivalent of 
ly:grob-set-property! and is part of the general problem of not destroying user 
tweaks when doing that.



Re: In-staff fermata with 2.25.

2023-06-07 Thread Thomas Morley
Hi Jean,

Am Mi., 7. Juni 2023 um 23:31 Uhr schrieb Jean Abou Samra :
>
> Le mercredi 07 juin 2023 à 23:07 +0200, Thomas Morley a écrit :
>
> Hi,
>
> this came up in the german forum:
> https://lilypondforum.de/index.php/topic,1247.msg6512.html
>
> How to print fermata _in_ staff with 2.25.?
>
>
>
> Amusingly, the same question was asked on the French-speaking list today.
>
> You have to use
> \tweak outside-staff-priority ##f \fermata

thanks!
Though, below commit-message does not explain why a tweak works, but
an override not.
Personally I think this is very strange and apart from that, totally
undocumented.
Do we have other, but similar, situations where a tweak works an override not?

> due to
>
> commit 3185bdd345acf338f748f1d604e101578285e1fe
> Author: Martín Rincón Botero 
> Date: Sat Jan 7 22:45:51 2023 +0100
>
> Outside-staff-priority for fermatas
> According to Gould there is no difference in the vertical stacking
> of trills and trill spanners, which should be below a fermata.
> This is confirmed with all published editions of Debussy's "L'isle
> Joyeuse" on IMSLP, amongst other various snippets of
> unidentifiable sources. An outside-staff-priority for fermatas
> was accordingly given.
>
>
> Jean
>

Thanks agian,
  Harm



Re: In-staff fermata with 2.25.

2023-06-07 Thread Jean Abou Samra
Le mercredi 07 juin 2023 à 23:07 +0200, Thomas Morley a écrit :
> Hi,
> 
> this came up in the german forum:
> https://lilypondforum.de/index.php/topic,1247.msg6512.html
> 
> How to print fermata _in_ staff with 2.25.?


Amusingly, the same question was asked on the French-speaking list today.

You have to use
\tweak outside-staff-priority ##f \fermata
due to

commit 3185bdd345acf338f748f1d604e101578285e1fe
Author: Martín Rincón Botero 
Date: Sat Jan 7 22:45:51 2023 +0100

Outside-staff-priority for fermatas

According to Gould there is no difference in the vertical stacking
of trills and trill spanners, which should be below a fermata.
This is confirmed with all published editions of Debussy's "L'isle
Joyeuse" on IMSLP, amongst other various snippets of
unidentifiable sources. An outside-staff-priority for fermatas
was accordingly given.


Jean



signature.asc
Description: This is a digitally signed message part


In-staff fermata with 2.25.

2023-06-07 Thread Thomas Morley
Hi,

this came up in the german forum:
https://lilypondforum.de/index.php/topic,1247.msg6512.html

How to print fermata _in_ staff with 2.25.?

Below works with 2.24.
\version "2.24.1"

%#(ly:set-option 'debug-skylines #t)

\layout {
  \override Score.VerticalAxisGroup.default-staff-staff-spacing.basic-distance
= 0
  \override Score.VerticalAxisGroup.default-staff-staff-spacing.minimum-distance
= 0
}

<<
  \new Staff { \clef bass R1*6 }
  \new Staff {
\clef bass
\override Script.staff-padding = ##f
c1\fermata
d\fermata
e\fermata
\override Script.direction = #DOWN
e\fermata
f\fermata
g\fermata
  }
>>

But not with 2.25.

Any hints?

Thanks,
  Harm



Re: Harp Pedal Spanners

2023-06-07 Thread David Kastrup
Alexandre Loomis  writes:

> Your code is much more readable, but I'm not sure I understand the
> difference between first and second take?

If LilyPond finds that its first attempt of parsing a longer end up with
post-events (those normally attached to a note or rest) in isolation, it
makes a second attempt of attaching them to what happens to precede
them.

Sometimes (like in the \displayMusic example I gave) this comes too late
to result in the "expected" reading.  The differences end up more
subtle, and while we had a number of complaints while this second pass
has not been implemented, I don't remember anybody writing up an error
report about the more subtle semantics when LilyPond now tries to clean
up its parsing after the fact.

-- 
David Kastrup



Re: Harp Pedal Spanners

2023-06-07 Thread Alexandre Loomis
Your code is much more readable, but I'm not sure I understand the
difference between first and second take?
I just noticed, where I have -3 it is a typo, it should be positive 3

Alex Loomis

On Wed, Jun 7, 2023 at 9:24 AM David Kastrup  wrote:

> Alexandre Loomis  writes:
>
> > Thanks, that was very helpful! Adding \tweak padding 1 to the original
> > function and defining a continue function by
> > nextPed =
> > #(define-music-function (end-text) (markup?)
> >#{
> >  \tweak bound-details.left.padding -3
> >  \startPed "" #end-text
> >#})
> > makes many cases work or almost work by default. It still requires some
> > tweaking, but far less.
>
> That looks like it could instead be defined as
>
> nextPed = -\tweak bound-details.left.padding -3
>   \startPed "" \etc
>
> Note that this creates an "event function" instead of a "music function"
> since that is more appropriate for a \startTextSpan command which can
> only be applied attached to some rhythmic event.  That way you can write
>
> c'\nextPed
>
> instead of
>
> c'-\nextPad
>
> and have LilyPond recognize this in the first take (there has been a
> "second take" around for a few version that obscurs the distinction, but
> it will still show in the output of
>
> \displayLilyMusic c'\nextPad
>
> and similar constructs).
>
> --
> David Kastrup
>


Re: Harp Pedal Spanners

2023-06-07 Thread David Kastrup
Alexandre Loomis  writes:

> Thanks, that was very helpful! Adding \tweak padding 1 to the original
> function and defining a continue function by
> nextPed =
> #(define-music-function (end-text) (markup?)
>#{
>  \tweak bound-details.left.padding -3
>  \startPed "" #end-text
>#})
> makes many cases work or almost work by default. It still requires some
> tweaking, but far less.

That looks like it could instead be defined as

nextPed = -\tweak bound-details.left.padding -3
  \startPed "" \etc

Note that this creates an "event function" instead of a "music function"
since that is more appropriate for a \startTextSpan command which can
only be applied attached to some rhythmic event.  That way you can write

c'\nextPed

instead of

c'-\nextPad

and have LilyPond recognize this in the first take (there has been a
"second take" around for a few version that obscurs the distinction, but
it will still show in the output of

\displayLilyMusic c'\nextPad

and similar constructs).

-- 
David Kastrup



Re: Harp Pedal Spanners

2023-06-07 Thread Alexandre Loomis
Thanks, that was very helpful! Adding \tweak padding 1 to the original
function and defining a continue function by
nextPed =
#(define-music-function (end-text) (markup?)
   #{
 \tweak bound-details.left.padding -3
 \startPed "" #end-text
   #})
makes many cases work or almost work by default. It still requires some
tweaking, but far less.

Alex

On Tue, Jun 6, 2023 at 1:53 PM Kieren MacMillan 
wrote:

> Hi Alexandre,
>
> > I'm trying to notate harp pedals
>
> It would be great to have more complete/robust harp pedal support in
> Lilypond!
>
> > Is there any way to make this more "automatic"?
>
> Unfortunately, I believe TextSpanner still doesn’t implement shorten-pair…
> but you can always use padding to fake it:
>
> startPed =
> #(define-music-function (start-text end-text) (markup? markup?)
>#{
>  \tweak dash-fraction #1.0
>  \tweak bound-details.left.text #start-text
>  \tweak bound-details.left.stencil-align-dir-y #CENTER
>  \tweak font-shape #'upright
>  \tweak bound-details.right.text #end-text
>  \tweak bound-details.right.stencil-align-dir-y #CENTER
>  \tweak bound-details.left-broken.text ##f
>  \tweak bound-details.right-broken.text ##f
>  \tweak bound-details.right.padding 4
>  \tweak padding 1
>  \startTextSpan
>#})
>
> endPed = \stopTextSpan
>
> RH = \relative es'' {
>   ces'16  gis f  gis  des8 r a'16 ges es  ges d8 r |
> }
>
> Pedals = {
>   s4_\startPed "G♯" " ♭" s s \endPed _\startPed "" "♮" s4 \endPed _"D♮" |
> }
>
> \score {
>   \new Staff <<
> \new Voice \RH
> \new Voice \Pedals
>   >>
> }
>
> Maybe Someone™ will have a more automatic and flexible method, but maybe
> this gives you a hint in the right direction?
>
> Best,
> Kieren.
> __
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>


Re: Magnetic snap and whiteout on LyricText: warnings

2023-06-07 Thread Jiří Hon

Hi Jean and Werner,

Thank you very much for this snippet. It brings the lyrics closer to perfection.

Jirka

On 06. 06. 23 16:43, Jean Abou Samra wrote:

Le mardi 06 juin 2023 à 15:56 +0200, Simon Albrecht a écrit :

Hi Jean, hi Werner,

On 05.06.23 22:28, Jean Abou Samra wrote:

Well, for my defense, I did also post a revised version of the
“magnetic lyrics” snippet:

https://www.mail-archive.com/lilypond-user@gnu.org/msg149201.html 



thanks for that pointer and your contributions. I reviewed that thread,
since I had only noticed at the time that your, Jean’s, initial design
wasn’t production-ready and not gotten around to following up…

Based on that, and on successful test on one (!) current score I was
working on, I submitted the snippet to LSR as no. 1169 (pending
approval) in the attached form. I hope that this is in your interest, as
well as that of users who may find it there.

I also hope that LSR admins will review the ‘headers’ within the snippet
code, namely the way you two are being credited and the list archive is
being referred to.



I've approved it.

I replaced the ellipses in the email addresses with the full addresses; there 
is no point in hiding them since they are given publicly on the list archives.

Best,
Jean