The design of the notes. Leagues and brackets.

2024-10-08 Thread Виноградов Юрий
Hello. I have a final version of what I need to do. I have an image of what needs to be done.https://disk.yandex.ru/i/l1J3hXqzF9GNMA And there is a part of the code that serves as the basis.https://disk.yandex.ru/d/fb8ANC0ZE8bZEgPlease help me.Юрий Виноградов



Re: Nested analysis brackets order and distance issue

2024-10-06 Thread Werner LEMBERG


> Thanks so much for the improvements in MR 2196; they're excellent and
> improve the look of the brackets in my sketches.
> 
> When I compile the following snippet under 2.25.19, I get output
> that's different than what Kieren describes (for 2.25.11): [...]
>
> Is this the desired output for 2.25.19?

It's not desired but expected.

> I ask only because the (non-monotonic) vertical stacking of the
> brackets seems surprising.

LilyPond doesn't guarantee a specific order of identical script or
spanner events at a given musical moment (as David doesn't get tired
to mention).  You really have to use `outside-staff-priority` to sort
them vertically.


Werner



Re: Nested analysis brackets order and distance issue

2024-10-06 Thread Trevor Bača
On Wed, Sep 25, 2024 at 3:23 PM Werner LEMBERG  wrote:

>
> >> In this example, everything looks fine when there are max. 3 nested
> >> analysis brackets (first score). However, when the brackets are 4
> >> the distance between them is irregular.
> >>
> >> Moreover, how to reverse the order of the brackets so that the
> >> shortest ones are closer to the staff?
> >
> > Compiling your code with my copy of Lilypond (2.25.11) gives four
> > evenly-spaced brackets with the shortest ones closer to the
> > staff.  Maybe it’s a bug introduced since 2.25.11?
>
> Not a bug but an intentional change, see
>
>   https://gitlab.com/lilypond/lilypond/-/merge_requests/2196 ,
>
> which was merged in version 2.25.12.  The documentation changes of
> this MR also describe how to order the brackets as needed.
>

Hi Werner,

Thanks so much for the improvements in MR 2196; they're excellent and
improve the look of the brackets in my sketches.

When I compile the following snippet under 2.25.19, I get output that's
different than what Kieren describes (for 2.25.11):

%%% BEGIN %%%

\version "2.25.19"

\new Voice
\with
{
  \consists Horizontal_bracket_engraver
}
{
  c'4
  - \tweak color "red"
  \startGroup
  - \tweak color "green"
  \startGroup
  - \tweak color "blue"
  \startGroup
  - \tweak color "purple"
  \startGroup
  c'4
  \stopGroup
  c'4
  \stopGroup
  c'4
  \stopGroup
  c'4
  \stopGroup
}

%%% END %%%

[image: nested-analysis-brackets.png]

Is this the desired output for 2.25.19? I ask only because the
(non-monotonic) vertical stacking of the brackets seems surprising.

Thanks again,

Trevor.

-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca


Re: Nested analysis brackets order and distance issue

2024-10-04 Thread Lib Lists
On Wed, 2 Oct 2024 at 08:26, Werner LEMBERG  wrote:
>

>
> The irregular distance is caused by LilyPond trying to vertically fit
> the items as tight as possible, which is what you normally want.
>
> > I'm a bit lost regarding the distance between them.
>
> > I tried this but with no success (and I didn't understand what
> > break-overshoot is supposed to do, so I just tried it).
>
> Looking into the IR you can find the following documentation:
>
>   ‘break-overshoot’ (pair of numbers):
>  ‘horizontal-bracket::calc-break-overshoot’
>

>
> What you need is to change the *padding* between the brackets, i.e.,
> the minimum vertical distance.  Not very surprisingly, the
> corresponding property is called `padding`, and it is also available for
> many other LilyPond grobs.
>
>
> Werner
>
>
> ==
>
>
> music = {
>   c4 \tweak outside-staff-priority #802 \startGroup
>  \tweak outside-staff-priority #801 \startGroup
>  \tweak outside-staff-priority #800 \startGroup
>   c \stopGroup
>   c \stopGroup
>   c \stopGroup
> }
>
> \relative c' {
>   \time 4/4
>
>   \music
>   \override HorizontalBracket.padding = #1
>   \music
> }
>
> \layout {
>   \context {
> \Voice
> \consists Horizontal_bracket_engraver
>   }
> }


Hi Werner,
thank you so much for the clarifications, now it's all clear!

Cheers,
Lib



Re: MIDI format and MIDI resolution

2024-10-03 Thread Cameron Hall
I know this is late, but there are plenty of tools to convert between
format 0 and 1, including timidity. `timidity input.mid -Om -o
output.mid` will convert format 1 to format 0, for example.



Re: Nested analysis brackets order and distance issue

2024-10-01 Thread Werner LEMBERG

Hello Lib,


Sorry for the late reply.

>> >> In this example, everything looks fine when there are max. 3
>> >> nested analysis brackets (first score). However, when the
>> >> brackets are 4 the distance between them is irregular.

The irregular distance is caused by LilyPond trying to vertically fit
the items as tight as possible, which is what you normally want.

> I'm a bit lost regarding the distance between them.

> I tried this but with no success (and I didn't understand what
> break-overshoot is supposed to do, so I just tried it).

Looking into the IR you can find the following documentation:

  ‘break-overshoot’ (pair of numbers):
 ‘horizontal-bracket::calc-break-overshoot’

 A pair of numbers specifying how much a broken spanner sticks
 out of its bounds horizontally on the broken side(s).  For
 broken beams and broken tuplet brackets, the bounds are given
 by the prefatory matter on the left and/or the rightmost
 column on the right.  For broken horizontal brackets, the
 bounds are the leftmost and/or rightmost column; for broken
 measure spanners, the left and/or right edge of the staff.

This shows you that funcion `horizontal-bracket::calc-break-overshoot`
is calculating the default default value for this property, and you
can it override manually by providing a pair of numbers.  In any case,
it is related to brackets that are broken across systems, controlling
some horizontal extents – this is not relevant to your problem of
getting better vertical distances.

What you need is to change the *padding* between the brackets, i.e.,
the minimum vertical distance.  Not very surprisingly, the
corresponding property is called `padding`, and it is also available for
many other LilyPond grobs.


Werner


==


music = {
  c4 \tweak outside-staff-priority #802 \startGroup
 \tweak outside-staff-priority #801 \startGroup
 \tweak outside-staff-priority #800 \startGroup
  c \stopGroup
  c \stopGroup
  c \stopGroup
}

\relative c' {
  \time 4/4

  \music
  \override HorizontalBracket.padding = #1
  \music
}

\layout {
  \context {
\Voice
\consists Horizontal_bracket_engraver
  }
}


Re: chordnames chordmode and markup

2024-09-30 Thread Xavier Scheuer
On Mon, 30 Sept 2024 at 01:13, Walt North  wrote:
>
> Is it possible in someway to get some sort of markup behavior in
chordmode?  They are cases where I want to add a remark for the rhythm
guitar player for one reason or another for some chords.
>
> Simple minded example below.  For a staff note I can add text.  But
lilypond throws an error when I try the same thing on Chordnames.  So I
probably need some other sort of technique to get that effect.

Hello,

2 possibilities are given in here:
https://lists.gnu.org/archive/html/lilypond-user/2022-08/msg00198.html
Use footnote or add Text_engraver and use tweaked direction.

Kind regards,
Xavier


chordnames chordmode and markup

2024-09-29 Thread Walt North
Is it possible in someway to get some sort of markup behavior in 
chordmode?  They are cases where I want to add a remark for the rhythm 
guitar player for one reason or another for some chords.


Simple minded example below.  For a staff note I can add text. But 
lilypond throws an error when I try the same thing on Chordnames.  So I 
probably need some other sort of technique to get that effect.


C:/Users/waltn/AppData/Local/Temp/frescobaldi-3opbiaix/tmpehm0kx93/document.ly:4:28: 
error: string outside of text script or \lyricmode


c1 | c^"hammer 2nd string

" | c | c |


Interpreting music...



\version "2.24.4"

\layout {
  \context {
    \Staff
    %    \RemoveAllEmptyStaves
  }
}
ch = \chordmode {
  %  c1 | c^"hammer 2nd string" | c | c |
  c1 | c | c | c |
}

\score {
  \new ChordNames { \ch }
}

nt = \relative c' {
  c1 | c^"hammer 2nd string" | c | c |
}

\score {
  \new Staff { \nt }
}

\score {
  <<
    \new Staff { \relative { s1 <>^"hammer 2nd string" }}
    \new ChordNames { \ch }
  >>
}





Re: Specific Lyric and CHordname font size

2024-09-29 Thread Kieren MacMillan
Hi Walt,

> Is it possible to set a specific chordname and lyric font size?  I see that 
> \markup can specify an abs font size.  I think I'm close with using font size 
> #3.5 to get to a 16pt font for example. Is that the only say to specify font 
> size in Chords - as a multiple of the global size?

That’s the only way using built-in functions… However, here’s a function I use 
which allows me to set any grob font-size by absolute font size:

%%%  SNIPPET BEGINS
\version "2.24.4"

allowGrobCallback =
#(define-scheme-function (parser location syms) (symbol-list?)
   (let ((interface (car syms))
 (sym (cadr syms)))
 #{
   \with {
 \consists #(lambda (context)
  `((acknowledgers .
  ((,interface . ,(lambda (engraver grob 
source-engraver)
(let ((prop (ly:grob-property grob 
sym)))
  (if (procedure? prop) 
(ly:grob-set-property! grob sym (prop grob)))
  
  ))
  )
   }
 #}))

absFontSize =
#(define-scheme-function (parser location pt)(number?)
   (lambda (grob)
 (let* ((layout (ly:grob-layout grob))
(ref-size (ly:output-def-lookup (ly:grob-layout grob) 
'text-font-size 12)))
   (magnification->font-size (/ pt ref-size))
   )))

\layout {
  \context {
\Score
\allowGrobCallback font-interface.font-size
  }
}

\markup {
  "default font size:" C
  \hspace #2
  \fontsize #2 { "\fontsize #2:" C }
  \hspace #2
  \abs-fontsize #16 { "\abs-fontsize #16:" C }
}

ch = \chordmode { c }

\score {
  <<
\new ChordNames {\ch }
\new Lyrics \lyricmode { "default lyric size: " C  }
  >>
}

\score {
  \layout {
\context {
  \ChordNames
  \override ChordName.font-size = #3.5
}
\context {
  \Lyrics
  \override LyricText.font-size = #3.5
}
  }
  <<
\new ChordNames {\ch }
\new Lyrics \lyricmode { "LyricText.font-size = #3.5: " C  }
  >>
}

\score {
  \layout {
\context {
  \ChordNames
  \override ChordName.font-size = \absFontSize #16
}
  }
  <<
\new ChordNames {\ch }
\new Lyrics \lyricmode { "LyricText.font-size = #3.5: " C  }
  >>
}
%%%  SNIPPET ENDS

See <https://lists.gnu.org/archive/html/lilypond-user/2024-09/msg00023.html> 
[and the rest of that thread] if you’re interested in a deeper dive on the 
whole “absolute font sizes in Lilypond” issue…

Hope this helps!
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.




Fwd: Specific Lyric and CHordname font size

2024-09-29 Thread Walt North
My guitar players are a bit finicky on font size.  Is it possible to set 
a specific chordname and lyric font size?  I see that \markup can 
specify an abs font size.  I think I'm close with using font size #3.5 
to get to a 16pt font for example. Is that the only say to specify font 
size in Chords - as a multiple of the global size? Follows is a sample 
test just for experimentation.



\version "2.24.4"

\paper {
%  text-font-size = 16
}

\markup {
  C text font size
  \hspace #2
  \abs-fontsize #16 { C text font size 16 }
}

ly = \lyricmode { C text font size  }
ch = \chordmode { c }

\score {
  \layout {
    \context {
  \ChordNames
  \override ChordName.font-size = #0
    }
    \context {
  \Lyrics
  \override LyricText.font-size = #0
    }
  }
  <<
    \new ChordNames {\ch }
  \new Lyrics { \ly }
  >>
}
\score {
  \layout {
    \context {
  \ChordNames
  \override ChordName.font-size = #3.5
    }
    \context {
  \Lyrics
  \override LyricText.font-size = #3.5
    }
  }
  <<
    \new ChordNames {\ch }
  \new Lyrics { \ly }
  >>
}




Re: Poor formatting when using partCombine and quoteDuring

2024-09-27 Thread Saul Tobin
Hi Cameron,

I'm sure others on this list may have differing opinions, but personally my
strong advice is to simply enter the music for each part verbatim in a
single variable, with one measure per line. Using variables and quotes for
themes played repeatedly or by many instruments seems like it will make
things easier but in my experience it actually makes things harder in the
long run. (\cueDuring is a different story — I encourage you to use that
liberally, but that's not part of the main musical content the part.) There
are countless reasons why the restatement or doubling of a melody might be
slightly changed in one instance, and it's much easier if all one has to do
is edit the line where the change is needed. Simply writing out the notes
also makes point-and-click work better.

Of course if you are typesetting an existing musical work rather than
composing, you don't need to worry about future musical revisions, so the
use of variables to cut down on data entry could be more viable. There are
many on the list who could speak to that use case better than I. My
experience using Lilypond is almost exclusively for composing original
works.

Saul

On Fri, Sep 27, 2024, 10:06 AM Cameron Hall  wrote:

> On Thu, 26 Sep 2024 21:36:58 -0500
> David Wright  wrote:
>
> > On Wed 25 Sep 2024 at 16:35:51 (-0500), Cameron Hall wrote:
> > > Hello, I'm a fairly new user, and I'm trying to combine some
> > > similar parts together in a score which may contain quoted
> > > sections. However, it seems that using quoteDuring screws up the
> > > layout. Instead of getting neat chords, the stem direction isn't
> > > right, it prints "Solo II" even though both parts have notes (there
> > > shouldn't be any solo), and I get warnings that say "warning: this
> > > Voice needs a \voiceXx or \shiftXx setting".
> > >
> > > %%% BEGIN SNIPPET %%%
> > > \version "2.23.2"
> > >
> > > flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
> > > \addQuote flute \flute
> > >
> > > obOne = \fixed c' { \quoteDuring flute { s1*4 } }
> > > obTwo = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }
> > >
> > > \score {
> > > <<
> > > \new Staff \with { instrumentName = "Flute" } \flute
> > > \new Staff \with { instrumentName = "Oboes" }
> > > \partCombine \obOne \obTwo
> > > >>
> > > }
> > > %%% END SNIPPET %%%
> > >
> > > Adding a \voiceTwo command to the obTwo part gets rid of those
> > > warnings, but still doesn't remove the bogus "Solo II" text.
> >
> > I don't know whether partCombine is meant to be able to handle
> > quoteDuring. You can use one or the other or neither to get
> > something that might be acceptable. As a British singer, the
> > lower staff in the last example is most familiar. I think
> > American hymnbooks use the third style, but without the a2
> > marking that orchestral scores usually have printed.
> >
> > Cheers,
> > David.
>
> Thanks for your feedback! The last example is definitely the best
> looking one for me, and the stem direction clearly indicates which
> notes are played by each part. While this is a contrived example, I am
> working on typesetting a larger concert band score. The flute and 1st
> oboe do have many unison passages, but not all the time, so I can't
> just use the same variable for both as in the example. quoteDuring
> seems like the ideal solution to this, since it allows me to
> selectively grab notes from other parts without ever having to write
> the same thing twice. However, it seems quoteDuring has a lot of flaws
> that I didn't anticipate, mainly because it doesn't actually copy notes
> but just adds a "QuoteMusic" placeholder that seems to only get looked
> at by the engraver, so partCombine is completely unaware of anything
> inside the quote. It also doesn't work if the passage being quoted is
> also a quote itself. Dynamics and expression text also will not get
> merged by partCombine if either is in a quoted section, so that gets
> printed twice.
>
> So, given this situation, do you have any suggestions on how to
> approach this and reduce the amount of duplicated code as much as
> possible? Are there any ways to work around these limitations of
> quoteDuring, or should I abandon it? I supposed I could make variables
> for every single time instruments play in unison, but there would be a
> lot of them, and I'd need some sort of naming convention to make this
> maintainable. Or maybe there's some other way to do this that I haven't
> yet considered. I'm still very new to Lilypond, so I don't know all of
> the possibilities.
>
> Thanks,
> Cameron
>
>


Re: Vertical positions of slurs and accents

2024-09-27 Thread Mats Bengtsson


  
  


On 2024-09-27 17:14, David Sumbler
  wrote:


  Thanks - that's perfect.  The difficulty I had was that I
couldn't figure out what class of object an accent is.  I had
already tried
  
  
  	\override
TextScript.avoid-slur = #'inside
  
  
  but this of course doesn't work.  I couldn't find out from
the documentation how accents etc. are classified, although I
expect it is there somewhere.

I tried Googling for "Lilypond articulations" and looking at the
  hits that pointed to the notation reference manual quickly led me
  to
https://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-attached-to-notes
  where it says:
"The type of grob that an articulation creates depends on what it
  is attached to.
  
      On notes or ordinary rests, articulations create Script
  objects.
      On multi-measure rests, articulations create
  MultiMeasureRestScript objects.
      On \caesura, articulations create CaesuraScript objects. "
  
     /Mats

  




Re: Vertical positions of slurs and accents

2024-09-27 Thread Werner LEMBERG
> The difficulty I had was that I couldn't figure out what class of
> object an accent is.  I had already tried
> 
>  \override TextScript.avoid-slur = #'inside
> 
> but this of course doesn't work.  I couldn't find out from the
> documentation how accents etc. are classified, although I expect it
> is there somewhere.

Look into `scm/script.scm`.  This is indeed not really documented.
I've created

  https://gitlab.com/lilypond/lilypond/-/issues/6753

to track that.


Werner



Re: Vertical positions of slurs and accents

2024-09-27 Thread Timothy Lanfear

On 27/09/2024 16:14, David Sumbler wrote:



On Fri, 2024-09-27 at 07:54 -0700, Knute Snortum wrote:


On Fri, Sep 27, 2024 at 7:42 AM David Sumbler  wrote:
How do I persuade Lilypond to position all accent marks inside 
slurs?  At the moment, in a passage containing numerous accents and 
slurs, I am finding that some accents are outside the slur and some 
inside, which looks a mess!




It's hard to help you with a Minimum WorkingExample (MWE, see 
https://lilypond.org/tiny-examples.html) but a sledgehammer approach 
would be to use...


\override Script.avoid-slur = #'inside

This will force ALL Scripts inside of the slurs, but that means other 
things like pralls and turns too.  You could do them one by one with:


\tweak avoid-slur = #'inside

Post a MWE for us to work with and we'll give you a better answer.


Thanks - that's perfect.  The difficulty I had was that I couldn't 
figure out what class of object an accent is.  I had already tried


\override TextScript.avoid-slur = #'inside

but this of course doesn't work.  I couldn't find out from the 
documentation how accents etc. are classified, although I expect it is 
there somewhere.


If you would like to modify the avoid-slur behaviour of all accents (but 
not other articulations) you could try this.


\version "2.24.0"

#(let* ((name 'accent)
    (newvalue '(avoid-slur . inside))
    (articulation (assoc-ref default-script-alist name)))
   (set! articulation (assoc-remove! articulation (car newvalue)))
   (set! articulation (assoc-set! articulation (car newvalue) (cdr 
newvalue)))
   (set! default-script-alist (assoc-set! default-script-alist name 
articulation)))


{
  a'4( b'^\trill c''^> d'')
}


--
Timothy Lanfear, Bristol, UK.


Re: Vertical positions of slurs and accents

2024-09-27 Thread Knute Snortum
--
Knute Snortum



On Fri, Sep 27, 2024 at 8:14 AM David Sumbler  wrote:

>
>
> On Fri, 2024-09-27 at 07:54 -0700, Knute Snortum wrote:
>
>
> On Fri, Sep 27, 2024 at 7:42 AM David Sumbler  wrote:
>
> How do I persuade Lilypond to position all accent marks inside slurs?  At
> the moment, in a passage containing numerous accents and slurs, I am
> finding that some accents are outside the slur and some inside, which looks
> a mess!
>
>
> It's hard to help you with a Minimum WorkingExample (MWE, see
> https://lilypond.org/tiny-examples.html) but a sledgehammer approach
> would be to use...
>
> \override Script.avoid-slur = #'inside
>
> This will force ALL Scripts inside of the slurs, but that means other
> things like pralls and turns too.  You could do them one by one with:
>
> \tweak avoid-slur = #'inside
>
> Post a MWE for us to work with and we'll give you a better answer.
>
>
> Thanks - that's perfect.  The difficulty I had was that I couldn't figure
> out what class of object an accent is.  I had already tried
>
> \override TextScript.avoid-slur = #'inside
>
> but this of course doesn't work.  I couldn't find out from the
> documentation how accents etc. are classified, although I expect it is
> there somewhere.
>

I don't know if this is in the documentation, but I found it by searching
for "lilypond visual grob index":

https://lilypond.org/ly-examples/visualindex.pdf


Re: Vertical positions of slurs and accents

2024-09-27 Thread David Sumbler


On Fri, 2024-09-27 at 07:54 -0700, Knute Snortum wrote:
> 
> On Fri, Sep 27, 2024 at 7:42 AM David Sumbler 
> wrote:
> > How do I persuade Lilypond to position all accent marks inside
> > slurs?  At the moment, in a passage containing numerous accents and
> > slurs, I am finding that some accents are outside the slur and some
> > inside, which looks a mess!
> > 
> 
> 
> It's hard to help you with a Minimum WorkingExample (MWE,
> see https://lilypond.org/tiny-examples.html) but a sledgehammer
> approach would be to use...
> 
> \override Script.avoid-slur = #'inside
> 
> This will force ALL Scripts inside of the slurs, but that means other
> things like pralls and turns too.  You could do them one by one with:
> 
> \tweak avoid-slur = #'inside
> 
> Post a MWE for us to work with and we'll give you a better answer.

Thanks - that's perfect.  The difficulty I had was that I couldn't
figure out what class of object an accent is.  I had already tried

 \override TextScript.avoid-slur = #'inside

but this of course doesn't work.  I couldn't find out from the
documentation how accents etc. are classified, although I expect it is
there somewhere.

David


Re: Vertical positions of slurs and accents

2024-09-27 Thread Knute Snortum
On Fri, Sep 27, 2024 at 7:42 AM David Sumbler  wrote:

> How do I persuade Lilypond to position all accent marks inside slurs?  At
> the moment, in a passage containing numerous accents and slurs, I am
> finding that some accents are outside the slur and some inside, which looks
> a mess!
>

It's hard to help you with a Minimum WorkingExample (MWE, see
https://lilypond.org/tiny-examples.html) but a sledgehammer approach would
be to use...

\override Script.avoid-slur = #'inside

This will force ALL Scripts inside of the slurs, but that means other
things like pralls and turns too.  You could do them one by one with:

\tweak avoid-slur = #'inside

Post a MWE for us to work with and we'll give you a better answer.


--
Knute Snortum


Vertical positions of slurs and accents

2024-09-27 Thread David Sumbler
How do I persuade Lilypond to position all accent marks inside slurs?
 At the moment, in a passage containing numerous accents and slurs, I
am finding that some accents are outside the slur and some inside,
which looks a mess!

David



Re: Poor formatting when using partCombine and quoteDuring

2024-09-27 Thread Knute Snortum
On Fri, Sep 27, 2024 at 7:06 AM Cameron Hall  wrote:

>
> So, given this situation, do you have any suggestions on how to
> approach this and reduce the amount of duplicated code as much as
> possible?
>

It's not as powerful as \quoteDuring, but you could use variables to hold
the unison parts:  (I've used \relative here but it might be more useful to
use \fixed in this situation.)

%%%
\version "2.24.4"

unison = { e4 f g e }

flute = \relative {
  c''4 d e c |
  \unison
  d4 e f d
}

clarinet = \relative {
  e''4 d c e
  \unison
  f4 e d f
}

\score {
  <<
\new Staff \flute
\new Staff \clarinet
  >>
}
%%%


--
Knute Snortum


Re: Poor formatting when using partCombine and quoteDuring

2024-09-27 Thread Cameron Hall
On Thu, 26 Sep 2024 21:36:58 -0500
David Wright  wrote:

> On Wed 25 Sep 2024 at 16:35:51 (-0500), Cameron Hall wrote:
> > Hello, I'm a fairly new user, and I'm trying to combine some
> > similar parts together in a score which may contain quoted
> > sections. However, it seems that using quoteDuring screws up the
> > layout. Instead of getting neat chords, the stem direction isn't
> > right, it prints "Solo II" even though both parts have notes (there
> > shouldn't be any solo), and I get warnings that say "warning: this
> > Voice needs a \voiceXx or \shiftXx setting".
> > 
> > %%% BEGIN SNIPPET %%%
> > \version "2.23.2"
> > 
> > flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
> > \addQuote flute \flute
> > 
> > obOne = \fixed c' { \quoteDuring flute { s1*4 } }
> > obTwo = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }
> > 
> > \score {
> > <<
> > \new Staff \with { instrumentName = "Flute" } \flute
> > \new Staff \with { instrumentName = "Oboes" }
> > \partCombine \obOne \obTwo  
> > >>  
> > }
> > %%% END SNIPPET %%%
> > 
> > Adding a \voiceTwo command to the obTwo part gets rid of those
> > warnings, but still doesn't remove the bogus "Solo II" text.  
> 
> I don't know whether partCombine is meant to be able to handle
> quoteDuring. You can use one or the other or neither to get
> something that might be acceptable. As a British singer, the
> lower staff in the last example is most familiar. I think
> American hymnbooks use the third style, but without the a2
> marking that orchestral scores usually have printed.
> 
> Cheers,
> David.

Thanks for your feedback! The last example is definitely the best
looking one for me, and the stem direction clearly indicates which
notes are played by each part. While this is a contrived example, I am
working on typesetting a larger concert band score. The flute and 1st
oboe do have many unison passages, but not all the time, so I can't
just use the same variable for both as in the example. quoteDuring
seems like the ideal solution to this, since it allows me to
selectively grab notes from other parts without ever having to write
the same thing twice. However, it seems quoteDuring has a lot of flaws
that I didn't anticipate, mainly because it doesn't actually copy notes
but just adds a "QuoteMusic" placeholder that seems to only get looked
at by the engraver, so partCombine is completely unaware of anything
inside the quote. It also doesn't work if the passage being quoted is
also a quote itself. Dynamics and expression text also will not get
merged by partCombine if either is in a quoted section, so that gets
printed twice.

So, given this situation, do you have any suggestions on how to
approach this and reduce the amount of duplicated code as much as
possible? Are there any ways to work around these limitations of
quoteDuring, or should I abandon it? I supposed I could make variables
for every single time instruments play in unison, but there would be a
lot of them, and I'd need some sort of naming convention to make this
maintainable. Or maybe there's some other way to do this that I haven't
yet considered. I'm still very new to Lilypond, so I don't know all of
the possibilities.

Thanks,
Cameron



Re: Poor formatting when using partCombine and quoteDuring

2024-09-26 Thread David Wright
On Wed 25 Sep 2024 at 16:35:51 (-0500), Cameron Hall wrote:
> Hello, I'm a fairly new user, and I'm trying to combine some similar parts 
> together in a score which may contain quoted sections. However, it seems that 
> using quoteDuring screws up the layout. Instead of getting neat chords, the 
> stem direction isn't right, it prints "Solo II" even though both parts have 
> notes (there shouldn't be any solo), and I get warnings that say "warning: 
> this Voice needs a \voiceXx or \shiftXx setting".
> 
> %%% BEGIN SNIPPET %%%
> \version "2.23.2"
> 
> flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
> \addQuote flute \flute
> 
> obOne = \fixed c' { \quoteDuring flute { s1*4 } }
> obTwo = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }
> 
> \score {
>   <<
>   \new Staff \with { instrumentName = "Flute" } \flute
>   \new Staff \with { instrumentName = "Oboes" } \partCombine 
> \obOne \obTwo
>   >>
> }
> %%% END SNIPPET %%%
> 
> Adding a \voiceTwo command to the obTwo part gets rid of those warnings, but 
> still doesn't remove the bogus "Solo II" text.

I don't know whether partCombine is meant to be able to handle
quoteDuring. You can use one or the other or neither to get
something that might be acceptable. As a British singer, the
lower staff in the last example is most familiar. I think
American hymnbooks use the third style, but without the a2
marking that orchestral scores usually have printed.

Cheers,
David.
\version "2.23.2"

flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
\addQuote flute \flute

obOne = \fixed c' { \quoteDuring flute { s1*4 } }
obTwo = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }

\score {
<<
\new Staff \with { instrumentName = "Flute" } \flute
\new Staff \with { instrumentName = "Oboes" } \partCombine \obOne \obTwo
>>
}

\version "2.23.2"

flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
\addQuote flute \flute

oboes = \fixed c' { \quoteDuring flute { c4 c e e f f e2 d4 d c c b, b, c2 } }

\score {
<<
\new Staff \with { instrumentName = "Flute" } \flute
\new Staff \with { instrumentName = "Oboes" } \oboes
>>
}

\version "2.23.2"

flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }

oboes = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }

\score {
<<
\new Staff \with { instrumentName = "Flute" } \flute
\new Staff \with { instrumentName = "Oboes" } \partCombine { \flute } { \oboes }
>>
}

\version "2.23.2"

flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }

oboes = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }

\score {
<<
\new Staff \with { instrumentName = "Flute" } \flute
\new Staff \with { instrumentName = "Oboes" } <<
  \new Voice { \voiceOne \flute }
  \new Voice { \voiceTwo \oboes }
>>
>>
}


Re: Nested analysis brackets order and distance issue

2024-09-26 Thread Lib Lists
On Wed, 25 Sept 2024 at 22:22, Werner LEMBERG  wrote:
>
>
> >> In this example, everything looks fine when there are max. 3 nested
> >> analysis brackets (first score). However, when the brackets are 4
> >> the distance between them is irregular.
> >>
> >> Moreover, how to reverse the order of the brackets so that the
> >> shortest ones are closer to the staff?
> >
> > Compiling your code with my copy of Lilypond (2.25.11) gives four
> > evenly-spaced brackets with the shortest ones closer to the
> > staff.  Maybe it’s a bug introduced since 2.25.11?
>
> Not a bug but an intentional change, see
>
>   https://gitlab.com/lilypond/lilypond/-/merge_requests/2196 ,
>
> which was merged in version 2.25.12.  The documentation changes of
> this MR also describe how to order the brackets as needed.
>
>
> Werner

Hi, thanks for your help.
The possibility of changing the order of nested brackets is great!
I'm a bit lost regarding the distance between them.
I tried this but with no success (and I didn't understand what
break-overshoot is supposed to do, so I just tried it).
Thanks for any help,
Lib

\score {
  \relative c' {
\time 4/4
\override HorizontalBracket.break-overshoot = #'(2.0 . 2.0)
c4\tweak outside-staff-priority #802 \startGroup \tweak
outside-staff-priority #801 \startGroup \tweak outside-staff-priority
#800 \startGroup c \stopGroup c \stopGroup c\stopGroup
  }
  \layout {
\context {
  \Voice
  \consists Horizontal_bracket_engraver
}
  }
}



Poor formatting when using partCombine and quoteDuring

2024-09-25 Thread Cameron Hall
Hello, I'm a fairly new user, and I'm trying to combine some similar parts 
together in a score which may contain quoted sections. However, it seems that 
using quoteDuring screws up the layout. Instead of getting neat chords, the 
stem direction isn't right, it prints "Solo II" even though both parts have 
notes (there shouldn't be any solo), and I get warnings that say "warning: this 
Voice needs a \voiceXx or \shiftXx setting".

%%% BEGIN SNIPPET %%%
\version "2.23.2"

flute = \fixed c' { c4 c g g a a g2 f4 f e e d d c2 }
\addQuote flute \flute

obOne = \fixed c' { \quoteDuring flute { s1*4 } }
obTwo = \fixed c' { c4 c e e f f e2 d4 d c c b, b, c2 }

\score {
<<
\new Staff \with { instrumentName = "Flute" } \flute
\new Staff \with { instrumentName = "Oboes" } \partCombine 
\obOne \obTwo
>>
}
%%% END SNIPPET %%%

Adding a \voiceTwo command to the obTwo part gets rid of those warnings, but 
still doesn't remove the bogus "Solo II" text.

Thanks,
Cam



Re: Nested analysis brackets order and distance issue

2024-09-25 Thread Werner LEMBERG

>> In this example, everything looks fine when there are max. 3 nested
>> analysis brackets (first score). However, when the brackets are 4
>> the distance between them is irregular.
>>
>> Moreover, how to reverse the order of the brackets so that the
>> shortest ones are closer to the staff?
>
> Compiling your code with my copy of Lilypond (2.25.11) gives four
> evenly-spaced brackets with the shortest ones closer to the
> staff.  Maybe it’s a bug introduced since 2.25.11?

Not a bug but an intentional change, see

  https://gitlab.com/lilypond/lilypond/-/merge_requests/2196 ,

which was merged in version 2.25.12.  The documentation changes of
this MR also describe how to order the brackets as needed.


Werner


Re: Nested analysis brackets order and distance issue

2024-09-25 Thread Kieren MacMillan
Hi there,

> In this example, everything looks fine when there are max. 3 nested
> analysis brackets (first score). However, when the brackets are 4 the
> distance between them is irregular.
> 
> Moreover, how to reverse the order of the brackets so that the
> shortest ones are closer to the staff?

Compiling your code with my copy of Lilypond (2.25.11) gives four evenly-spaced 
brackets with the shortest ones closer to the staff. Maybe it’s a bug 
introduced since 2.25.11?

Hope that helps!
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.




Nested analysis brackets order and distance issue

2024-09-25 Thread Lib Lists
Hi everybody,
In this example, everything looks fine when there are max. 3 nested
analysis brackets (first score). However, when the brackets are 4 the
distance between them is irregular.

Moreover, how to reverse the order of the brackets so that the
shortest ones are closer to the staff?

Thanks for any help,
Lib

\version "2.25.19"

\score {
  \relative c' {
\time 4/4
c4\startGroup\startGroup\startGroup c \stopGroup c \stopGroup c\stopGroup
  }
  \layout {
\context {
  \Voice
  \consists Horizontal_bracket_engraver
}
  }
}

\score {
  \relative c' {
\time 4/4
   c4\startGroup\startGroup\startGroup\startGroup c \stopGroup c
\stopGroup c\stopGroup c\stopGroup
  }
  \layout {
\context {
  \Voice
  \consists Horizontal_bracket_engraver
}
  }
}



A variation on issues #34: grace notes and \stemNeutral

2024-09-23 Thread Knute Snortum
This is a variation on issue #34 (grace note synchronization) where
\stemNeutral gets ignored in one staff if there's a grace note in the other.

%%%
\version "2.25.18"

rightHand = \relative {
  c'1 |
  \grace { c8 } c2
}

leftHand = \relative {
  \clef bass
  \stemDown f,2 f |
  % \grace { s8 } % <-- uncomment to fix the problem
  \stemNeutral f,8\noBeam f'' c' d
}

\score {
  \new PianoStaff <<
\new Staff \rightHand
\new Staff \leftHand
  >>
}
%%%

The \stemNeutral in the left hand gets ignored unless you use a "spacer
grace note".  This is probably not different enough to post back to the #34
issues page (which has a lot of discussion) but I thought I'd post it here
as it took me a little while to figure out.


--
Knute Snortum


Re: Accent too close to note with acciaccatura and slur

2024-09-21 Thread Werner LEMBERG


> I have been running into... not quite a bug, but an "ugly" (bugly?)
> where the accent is engraved too close to a note with an
> acciaccatura and a slur.  Here's a MWE:
> 
> %%%
> \version "2.25.18"
> 
> \fixed c' { \acciaccatura { f8 } e4->^( f4) }
> %%%
> 
> At the moment I just adjust the accent's Y-offset, but is there a
> better way to deal with this?  Should I create a bug report for
> this?

If you search for 'slur collision' in our bug tracker, you get around
10 hits.  In case nothing fits, then yes, please open a new issue.


Werner



Re: Accent too close to note with acciaccatura and slur

2024-09-21 Thread Knute Snortum
On Sat, Sep 21, 2024 at 11:25 AM  wrote:

> Knute,
>
>
>
> Is positioning the accent above the note permissible?
>
>
>
> \fixed c' { \acciaccatura { f8 } e4^>^( f4) }
>

That's one way to do it...


--
Knute Snortum


RE: Accent too close to note with acciaccatura and slur

2024-09-21 Thread carsonmark
Knute,

 

Is positioning the accent above the note permissible?

 

\fixed c' { \acciaccatura { f8 } e4^>^( f4) }

 

Mark

 

From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
 On Behalf Of Knute Snortum
Sent: Saturday, September 21, 2024 11:13 AM
To: lilypond-user@gnu.org
Subject: Accent too close to note with acciaccatura and slur

 

I have been running into... not quite a bug, but an "ugly" (bugly?) where the 
accent is engraved too close to a note with an acciaccatura and a slur.  Here's 
a MWE:

 

%%%

\version "2.25.18"

\fixed c' { \acciaccatura { f8 } e4->^( f4) }

%%%

 

At the moment I just adjust the accent's Y-offset, but is there a better way to 
deal with this?  Should I create a bug report for this?

 

--

Knute Snortum

 



Accent too close to note with acciaccatura and slur

2024-09-21 Thread Knute Snortum
I have been running into... not quite a bug, but an "ugly" (bugly?) where
the accent is engraved too close to a note with an acciaccatura and a
slur.  Here's a MWE:

%%%
\version "2.25.18"

\fixed c' { \acciaccatura { f8 } e4->^( f4) }
%%%

At the moment I just adjust the accent's Y-offset, but is there a better
way to deal with this?  Should I create a bug report for this?

--
Knute Snortum


Re: devnull with lyrics and ties

2024-09-21 Thread Walt North

Excellent. That does work. Thank you.

On 9/20/2024 8:43 PM, Saul Tobin wrote:
I think you misunderstood. If you allow Score to accept NullVoice, you 
don't need to explicitly instantiate a Staff, you can just do it the 
way you initially wanted.


On Fri, Sep 20, 2024 at 11:01 PM Walt North  wrote:

thanks.   So far no luck.   I'm giving up for the night. Get back
it tomorrow.  Here is what I have tried so far.


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
  \context {
    \Score
    \accepts NullVoice
  }
  \context {
    \Staff
    \accepts NullVoice
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseA" { \break \verseLyricsMelody }
  \new Lyrics \lyricsto "verseA" { \verseOneLyrics }
    >>
  >>
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseB" { \break \verseLyricsMelody }
    >>
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



On 9/20/2024 7:51 PM, Saul Tobin wrote:

Another way to get the extra Staff not to appear is to add the
following to your \layout block:

  \context {
    \Score
    \accepts NullVoice
  }

As an aside directed more at the dev community: is there any good
    reason not to make this the default behavior (and similar for
StaffGroup, etc.)? NullVoice is defined with both Staff and Voice
as aliases. I would have assumed this meant that it could be used
anywhere that Staff could be used.

Saul


On Fri, Sep 20, 2024 at 10:25 PM Saul Tobin
 wrote:

The easiest way to get the staff not to appear would be to
put NullVoice inside a Staff or similar context that you want
to appear.

On Fri, Sep 20, 2024 at 8:19 PM Walt North
 wrote:

Thanks, that took care of the alignment.

However now I see an empty staff.  Is it expected I would
then have to remove all empty staves?  I tried that but
may not have it right


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new NullVoice  = "verseB" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }

  >>



}



On 9/20/2024 4:58 PM, Saul Tobin wrote:


My understanding is that Devnull is not intended for
alignment of lyrics because it does not have the
necessary engraver to create the invisible grobs used
for alignment. It appears to me in your example that
actually the lyrics are just being spaced evenly without
alignment to anything. Nullvoice is intended for your
use case.


On Fri, Sep 20, 2024, 6:06 PM Walt North
 wrote:

Am I missing something?  It seems like using devnull
to align lyrics to does pay attention to ties.  Ties
do seem to be honored when using voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break
\verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



Re: devnull with lyrics and ties

2024-09-20 Thread Saul Tobin
I think you misunderstood. If you allow Score to accept NullVoice, you
don't need to explicitly instantiate a Staff, you can just do it the way
you initially wanted.

On Fri, Sep 20, 2024 at 11:01 PM Walt North  wrote:

> thanks.   So far no luck.   I'm giving up for the night.  Get back it
> tomorrow.  Here is what I have tried so far.
>
>
> \version "2.24.2"
>
> \language "english"
>
> \layout {
>   indent = 0
>   \context {
> \NullVoice
> \RemoveAllEmptyStaves
>   }
>   \context {
> \Score
> \accepts NullVoice
>   }
>   \context {
> \Staff
> \accepts NullVoice
>   }
> }
>
> verseLyricsMelody = \relative c' {
>   c4 c c c~ | c c c c |
> }
>
> verseOneLyrics = \lyricmode {
>   one two three four five six seven eight
> }
>
> \new Score {
>   \new Staff
>   <<
> <<
>   \new NullVoice  = "verseA" { \break  \verseLyricsMelody }
>   \new Lyrics \lyricsto "verseA" { \verseOneLyrics }
> >>
>   >>
> }
>
> \new Score {
>   \new Staff
>   <<
> <<
>   \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
> >>
> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>   >>
> }
>
>
>
> On 9/20/2024 7:51 PM, Saul Tobin wrote:
>
> Another way to get the extra Staff not to appear is to add the following
> to your \layout block:
>
>   \context {
> \Score
> \accepts NullVoice
>   }
>
> As an aside directed more at the dev community: is there any good reason
> not to make this the default behavior (and similar for StaffGroup, etc.)?
> NullVoice is defined with both Staff and Voice as aliases. I would have
> assumed this meant that it could be used anywhere that Staff could be used.
>
> Saul
>
>
> On Fri, Sep 20, 2024 at 10:25 PM Saul Tobin 
> wrote:
>
>> The easiest way to get the staff not to appear would be to put NullVoice
>> inside a Staff or similar context that you want to appear.
>>
>> On Fri, Sep 20, 2024 at 8:19 PM Walt North  wrote:
>>
>>> Thanks, that took care of the alignment.
>>>
>>> However now I see an empty staff.  Is it expected I would then have to
>>> remove all empty staves?  I tried that but may not have it right
>>>
>>>
>>> \version "2.24.2"
>>>
>>> \language "english"
>>>
>>> \layout {
>>>   indent = 0
>>>   \context {
>>> \NullVoice
>>> \RemoveAllEmptyStaves
>>>   }
>>> }
>>>
>>> verseLyricsMelody = \relative c' {
>>>   c4 c c c~ | c c c c |
>>> }
>>>
>>> verseOneLyrics = \lyricmode {
>>>   one two three four five six seven eight
>>> }
>>>
>>> \new Score {
>>>   <<
>>> \new Voice = "verse" { \break \verseLyricsMelody }
>>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>>   >>
>>>   <<
>>> \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
>>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>>
>>>   >>
>>>
>>>
>>>
>>> }
>>>
>>>
>>>
>>> On 9/20/2024 4:58 PM, Saul Tobin wrote:
>>>
>>> My understanding is that Devnull is not intended for alignment of lyrics
>>> because it does not have the necessary engraver to create the invisible
>>> grobs used for alignment. It appears to me in your example that actually
>>> the lyrics are just being spaced evenly without alignment to anything.
>>> Nullvoice is intended for your use case.
>>>
>>> On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:
>>>
>>>> Am I missing something?  It seems like using devnull to align lyrics to
>>>> does pay attention to ties.  Ties do seem to be honored when using voice
>>>> for alignment.
>>>>
>>>> Below is a stripped down example with screenshot.
>>>>
>>>> \version "2.24.2"
>>>>
>>>> \language "english"
>>>>
>>>> \layout {
>>>>   indent = 0
>>>> }
>>>>
>>>> verseLyricsMelody = \relative c' {
>>>>   c4 c c c~ | c c c c |
>>>> }
>>>>
>>>> verseOneLyrics = \lyricmode {
>>>>   one two three four five six seven eight
>>>> }
>>>>
>>>> \new Score {
>>>>   <<
>>>> \new Voice = "verse" { \break \verseLyricsMelody }
>>>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>>>   >>
>>>>   <<
>>>> \new Devnull  = "verseB" { \break  \verseLyricsMelody }
>>>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>>>   >>
>>>> }
>>>>
>>>>
>>>>


Re: devnull with lyrics and ties

2024-09-20 Thread Walt North
thanks.   So far no luck.   I'm giving up for the night.  Get back it 
tomorrow.  Here is what I have tried so far.



\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
  \context {
    \Score
    \accepts NullVoice
  }
  \context {
    \Staff
    \accepts NullVoice
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseA" { \break  \verseLyricsMelody }
  \new Lyrics \lyricsto "verseA" { \verseOneLyrics }
    >>
  >>
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    >>
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



On 9/20/2024 7:51 PM, Saul Tobin wrote:
Another way to get the extra Staff not to appear is to add the 
following to your \layout block:


  \context {
    \Score
    \accepts NullVoice
  }

As an aside directed more at the dev community: is there any good 
reason not to make this the default behavior (and similar for 
StaffGroup, etc.)? NullVoice is defined with both Staff and Voice as 
aliases. I would have assumed this meant that it could be used 
anywhere that Staff could be used.


Saul


On Fri, Sep 20, 2024 at 10:25 PM Saul Tobin 
 wrote:


The easiest way to get the staff not to appear would be to put
NullVoice inside a Staff or similar context that you want to appear.

On Fri, Sep 20, 2024 at 8:19 PM Walt North 
wrote:

Thanks, that took care of the alignment.

However now I see an empty staff.  Is it expected I would then
have to remove all empty staves?  I tried that but may not
have it right


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new NullVoice  = "verseB" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }

  >>



}



On 9/20/2024 4:58 PM, Saul Tobin wrote:


My understanding is that Devnull is not intended for
alignment of lyrics because it does not have the necessary
engraver to create the invisible grobs used for alignment. It
appears to me in your example that actually the lyrics are
just being spaced evenly without alignment to anything.
Nullvoice is intended for your use case.


On Fri, Sep 20, 2024, 6:06 PM Walt North
 wrote:

Am I missing something?  It seems like using devnull to
align lyrics to does pay attention to ties.  Ties do seem
to be honored when using voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



Re: devnull with lyrics and ties

2024-09-20 Thread Walt North
Sorry to be a pest I'm probably  just not getting the syntax 
correct.  I've tried this a couple of ways.


To be clear this is a sample to demonstrate the question. Not what 
the actual score is.


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseA" { \break  \verseLyricsMelody }
  \new Lyrics \lyricsto "verseA" { \verseOneLyrics }
    >>
  >>
}

\new Score {
  \new Staff
  <<
    <<
  \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    >>
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}




On 9/20/2024 7:25 PM, Saul Tobin wrote:
The easiest way to get the staff not to appear would be to put 
NullVoice inside a Staff or similar context that you want to appear.


On Fri, Sep 20, 2024 at 8:19 PM Walt North  wrote:

Thanks, that took care of the alignment.

However now I see an empty staff.  Is it expected I would then
have to remove all empty staves?  I tried that but may not have it
right


\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }

  >>



}



On 9/20/2024 4:58 PM, Saul Tobin wrote:


My understanding is that Devnull is not intended for alignment of
lyrics because it does not have the necessary engraver to create
the invisible grobs used for alignment. It appears to me in your
example that actually the lyrics are just being spaced evenly
without alignment to anything. Nullvoice is intended for your use
case.


On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:

Am I missing something?  It seems like using devnull to align
lyrics to does pay attention to ties.  Ties do seem to be
honored when using voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



Re: devnull with lyrics and ties

2024-09-20 Thread Saul Tobin
Another way to get the extra Staff not to appear is to add the following to
your \layout block:

  \context {
\Score
\accepts NullVoice
  }

As an aside directed more at the dev community: is there any good reason
not to make this the default behavior (and similar for StaffGroup, etc.)?
NullVoice is defined with both Staff and Voice as aliases. I would have
assumed this meant that it could be used anywhere that Staff could be used.

Saul


On Fri, Sep 20, 2024 at 10:25 PM Saul Tobin 
wrote:

> The easiest way to get the staff not to appear would be to put NullVoice
> inside a Staff or similar context that you want to appear.
>
> On Fri, Sep 20, 2024 at 8:19 PM Walt North  wrote:
>
>> Thanks, that took care of the alignment.
>>
>> However now I see an empty staff.  Is it expected I would then have to
>> remove all empty staves?  I tried that but may not have it right
>>
>>
>> \version "2.24.2"
>>
>> \language "english"
>>
>> \layout {
>>   indent = 0
>>   \context {
>> \NullVoice
>> \RemoveAllEmptyStaves
>>   }
>> }
>>
>> verseLyricsMelody = \relative c' {
>>   c4 c c c~ | c c c c |
>> }
>>
>> verseOneLyrics = \lyricmode {
>>   one two three four five six seven eight
>> }
>>
>> \new Score {
>>   <<
>> \new Voice = "verse" { \break \verseLyricsMelody }
>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>   >>
>>   <<
>> \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>
>>   >>
>>
>>
>>
>> }
>>
>>
>>
>> On 9/20/2024 4:58 PM, Saul Tobin wrote:
>>
>> My understanding is that Devnull is not intended for alignment of lyrics
>> because it does not have the necessary engraver to create the invisible
>> grobs used for alignment. It appears to me in your example that actually
>> the lyrics are just being spaced evenly without alignment to anything.
>> Nullvoice is intended for your use case.
>>
>> On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:
>>
>>> Am I missing something?  It seems like using devnull to align lyrics to
>>> does pay attention to ties.  Ties do seem to be honored when using voice
>>> for alignment.
>>>
>>> Below is a stripped down example with screenshot.
>>>
>>> \version "2.24.2"
>>>
>>> \language "english"
>>>
>>> \layout {
>>>   indent = 0
>>> }
>>>
>>> verseLyricsMelody = \relative c' {
>>>   c4 c c c~ | c c c c |
>>> }
>>>
>>> verseOneLyrics = \lyricmode {
>>>   one two three four five six seven eight
>>> }
>>>
>>> \new Score {
>>>   <<
>>> \new Voice = "verse" { \break \verseLyricsMelody }
>>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>>   >>
>>>   <<
>>> \new Devnull  = "verseB" { \break  \verseLyricsMelody }
>>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>>   >>
>>> }
>>>
>>>
>>>


Re: devnull with lyrics and ties

2024-09-20 Thread Walt North
First - the example I sent is a stripped down sample just to demonstrate 
the question I have.


For the actual score the intent is two fold.

Intent one.

The resulting score may be used by multiple instruments and vocalists.  
In the case of the guitar player they only need the lyrics and chords to 
strum to.


Other instruments should have the melody and lyrics to follow.

Vocalists typically just need the lyrics.

This score may be reused in different scenarios with varying 
instruments. Sometimes just a guitar player.  Sometimes other 
instruments in addition.


This may be part of a collection and I don't want to take up page space 
where it is not needed.


Intent two:

Since I'm typing the melody in anyway for some instruments I might as 
well leverage the lyrics alignment feature instead of putting duration 
on the lyrics.


Thanks.


On 9/20/2024 6:29 PM, David Wright wrote:

On Fri 20 Sep 2024 at 15:05:51 (-0700), Walt North wrote:

Am I missing something?  It seems like using devnull to align lyrics
to does pay attention to ties.  Ties do seem to be honored when using
voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
   indent = 0
}

verseLyricsMelody = \relative c' {
   c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
   one two three four five six seven eight
}

\new Score {
   <<
     \new Voice = "verse" { \break \verseLyricsMelody }
     \new Lyrics \lyricsto "verse" { \verseOneLyrics }
   >>
   <<
     \new Devnull  = "verseB" { \break  \verseLyricsMelody }
     \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
   >>
}

I could kind of see where you were going with
https://lists.gnu.org/archive/html/lilypond-user/2024-09/msg00152.html
where you might have a guitarist strumming chords as they
follow the words and chords of a song whose rhythm they know.

But now I'm lost. Say the alignment /was/ in perfect accordance
with your intent: what's the function of the duplicate set of
lyrics? Is that measure number "3" an honest annotation, or just
something that you're going to eliminate?

IOW, can you describe the score that you're trying to produce?

Cheers,
David.




Re: devnull with lyrics and ties

2024-09-20 Thread Vaughan McAlley
On Sat, 21 Sept 2024 at 10:20, Walt North  wrote:

> Thanks, that took care of the alignment.
>
> However now I see an empty staff.  Is it expected I would then have to
> remove all empty staves?  I tried that but may not have it right
>
>
> \version "2.24.2"
>
> \language "english"
>
> \layout {
>   indent = 0
>   \context {
> \NullVoice
> \RemoveAllEmptyStaves
>   }
> }
>
> verseLyricsMelody = \relative c' {
>   c4 c c c~ | c c c c |
> }
>
> verseOneLyrics = \lyricmode {
>   one two three four five six seven eight
> }
>
> \new Score {
>   <<
> \new Voice = "verse" { \break \verseLyricsMelody }
> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>   >>
>   <<
> \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>
>   >>
>
>
>
> }
>
>
>
> On 9/20/2024 4:58 PM, Saul Tobin wrote:
>
> My understanding is that Devnull is not intended for alignment of lyrics
> because it does not have the necessary engraver to create the invisible
> grobs used for alignment. It appears to me in your example that actually
> the lyrics are just being spaced evenly without alignment to anything.
> Nullvoice is intended for your use case.
>
> On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:
>
>> Am I missing something?  It seems like using devnull to align lyrics to
>> does pay attention to ties.  Ties do seem to be honored when using voice
>> for alignment.
>>
>> Below is a stripped down example with screenshot.
>>
>> \version "2.24.2"
>>
>> \language "english"
>>
>> \layout {
>>   indent = 0
>> }
>>
>> verseLyricsMelody = \relative c' {
>>   c4 c c c~ | c c c c |
>> }
>>
>> verseOneLyrics = \lyricmode {
>>   one two three four five six seven eight
>> }
>>
>> \new Score {
>>   <<
>> \new Voice = "verse" { \break \verseLyricsMelody }
>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>   >>
>>   <<
>> \new Devnull  = "verseB" { \break  \verseLyricsMelody }
>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>   >>
>> }
>>
>>
>>
A good rule of thumb is when in doubt, explicitly instantiate Staves:

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  \new Staff
  <<
\new Voice = "verse" { \break \verseLyricsMelody }
\new NullVoice  = "verseB" { \break  \verseLyricsMelody }
\new Lyrics \lyricsto "verse" { \verseOneLyrics }
\new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}

Vaughan


Re: devnull with lyrics and ties

2024-09-20 Thread Saul Tobin
The easiest way to get the staff not to appear would be to put NullVoice
inside a Staff or similar context that you want to appear.

On Fri, Sep 20, 2024 at 8:19 PM Walt North  wrote:

> Thanks, that took care of the alignment.
>
> However now I see an empty staff.  Is it expected I would then have to
> remove all empty staves?  I tried that but may not have it right
>
>
> \version "2.24.2"
>
> \language "english"
>
> \layout {
>   indent = 0
>   \context {
> \NullVoice
> \RemoveAllEmptyStaves
>   }
> }
>
> verseLyricsMelody = \relative c' {
>   c4 c c c~ | c c c c |
> }
>
> verseOneLyrics = \lyricmode {
>   one two three four five six seven eight
> }
>
> \new Score {
>   <<
> \new Voice = "verse" { \break \verseLyricsMelody }
> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>   >>
>   <<
> \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>
>   >>
>
>
>
> }
>
>
>
> On 9/20/2024 4:58 PM, Saul Tobin wrote:
>
> My understanding is that Devnull is not intended for alignment of lyrics
> because it does not have the necessary engraver to create the invisible
> grobs used for alignment. It appears to me in your example that actually
> the lyrics are just being spaced evenly without alignment to anything.
> Nullvoice is intended for your use case.
>
> On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:
>
>> Am I missing something?  It seems like using devnull to align lyrics to
>> does pay attention to ties.  Ties do seem to be honored when using voice
>> for alignment.
>>
>> Below is a stripped down example with screenshot.
>>
>> \version "2.24.2"
>>
>> \language "english"
>>
>> \layout {
>>   indent = 0
>> }
>>
>> verseLyricsMelody = \relative c' {
>>   c4 c c c~ | c c c c |
>> }
>>
>> verseOneLyrics = \lyricmode {
>>   one two three four five six seven eight
>> }
>>
>> \new Score {
>>   <<
>> \new Voice = "verse" { \break \verseLyricsMelody }
>> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>>   >>
>>   <<
>> \new Devnull  = "verseB" { \break  \verseLyricsMelody }
>> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>>   >>
>> }
>>
>>
>>


Re: devnull with lyrics and ties

2024-09-20 Thread David Wright
On Fri 20 Sep 2024 at 15:05:51 (-0700), Walt North wrote:
> Am I missing something?  It seems like using devnull to align lyrics
> to does pay attention to ties.  Ties do seem to be honored when using
> voice for alignment.
> 
> Below is a stripped down example with screenshot.
> 
> \version "2.24.2"
> 
> \language "english"
> 
> \layout {
>   indent = 0
> }
> 
> verseLyricsMelody = \relative c' {
>   c4 c c c~ | c c c c |
> }
> 
> verseOneLyrics = \lyricmode {
>   one two three four five six seven eight
> }
> 
> \new Score {
>   <<
>     \new Voice = "verse" { \break \verseLyricsMelody }
>     \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>   >>
>   <<
>     \new Devnull  = "verseB" { \break  \verseLyricsMelody }
>     \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>   >>
> }

I could kind of see where you were going with
https://lists.gnu.org/archive/html/lilypond-user/2024-09/msg00152.html
where you might have a guitarist strumming chords as they
follow the words and chords of a song whose rhythm they know.

But now I'm lost. Say the alignment /was/ in perfect accordance
with your intent: what's the function of the duplicate set of
lyrics? Is that measure number "3" an honest annotation, or just
something that you're going to eliminate?

IOW, can you describe the score that you're trying to produce?

Cheers,
David.



Re: devnull with lyrics and ties

2024-09-20 Thread Walt North

Thanks, that took care of the alignment.

However now I see an empty staff.  Is it expected I would then have to 
remove all empty staves?  I tried that but may not have it right



\version "2.24.2"

\language "english"

\layout {
  indent = 0
  \context {
    \NullVoice
    \RemoveAllEmptyStaves
  }
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new NullVoice  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }

  >>



}



On 9/20/2024 4:58 PM, Saul Tobin wrote:


My understanding is that Devnull is not intended for alignment of 
lyrics because it does not have the necessary engraver to create the 
invisible grobs used for alignment. It appears to me in your example 
that actually the lyrics are just being spaced evenly without 
alignment to anything. Nullvoice is intended for your use case.



On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:

Am I missing something?  It seems like using devnull to align
lyrics to does pay attention to ties.  Ties do seem to be honored
when using voice for alignment.

Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



Re: devnull with lyrics and ties

2024-09-20 Thread Saul Tobin
My understanding is that Devnull is not intended for alignment of lyrics
because it does not have the necessary engraver to create the invisible
grobs used for alignment. It appears to me in your example that actually
the lyrics are just being spaced evenly without alignment to anything.
Nullvoice is intended for your use case.

On Fri, Sep 20, 2024, 6:06 PM Walt North  wrote:

> Am I missing something?  It seems like using devnull to align lyrics to
> does pay attention to ties.  Ties do seem to be honored when using voice
> for alignment.
>
> Below is a stripped down example with screenshot.
>
> \version "2.24.2"
>
> \language "english"
>
> \layout {
>   indent = 0
> }
>
> verseLyricsMelody = \relative c' {
>   c4 c c c~ | c c c c |
> }
>
> verseOneLyrics = \lyricmode {
>   one two three four five six seven eight
> }
>
> \new Score {
>   <<
> \new Voice = "verse" { \break \verseLyricsMelody }
> \new Lyrics \lyricsto "verse" { \verseOneLyrics }
>   >>
>   <<
> \new Devnull  = "verseB" { \break  \verseLyricsMelody }
> \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
>   >>
> }
>
>
>


devnull with lyrics and ties

2024-09-20 Thread Walt North
Am I missing something?  It seems like using devnull to align lyrics to 
does pay attention to ties.  Ties do seem to be honored when using voice 
for alignment.


Below is a stripped down example with screenshot.

\version "2.24.2"

\language "english"

\layout {
  indent = 0
}

verseLyricsMelody = \relative c' {
  c4 c c c~ | c c c c |
}

verseOneLyrics = \lyricmode {
  one two three four five six seven eight
}

\new Score {
  <<
    \new Voice = "verse" { \break \verseLyricsMelody }
    \new Lyrics \lyricsto "verse" { \verseOneLyrics }
  >>
  <<
    \new Devnull  = "verseB" { \break  \verseLyricsMelody }
    \new Lyrics \lyricsto "verseB" { \verseOneLyrics }
  >>
}



Re: scheme: problem with variable and value

2024-09-20 Thread K. Blum

Hi Timothy,


Am 20.09.2024 um 21:28 schrieb Timothy Lanfear:


You need

(markup #:override `(box-padding . ,myvalue) #:box text)



thanks a lot, that does the trick!

Cheers,
Klaus



Re: scheme: problem with variable and value

2024-09-20 Thread Timothy Lanfear


On 20/09/2024 20:20, K. Blum wrote:

\version "2.24.3"

#(define-markup-command (dosomething layout props text) (markup?)
   (let* ((myvalue 1))
 (interpret-markup
  layout props
  ; (markup #:override '(box-padding . 1) #:box text))   ; works
  (markup #:override '(box-padding . myvalue) #:box text))   ; 
doesn't work

 ))

\markup \dosomething "blah" 


You need

(markup #:override `(box-padding . ,myvalue) #:box text)

--
Timothy Lanfear, Bristol, UK.


scheme: problem with variable and value

2024-09-20 Thread K. Blum

Dear community,

I try to use a variable instead of a simple hard-coded value (outside the MWE, 
this would be the result of a calculation):

%---
\version "2.24.3"

#(define-markup-command (dosomething layout props text) (markup?)
   (let* ((myvalue 1))
 (interpret-markup
  layout props
  ; (markup #:override '(box-padding . 1) #:box text))   ; works
  (markup #:override '(box-padding . myvalue) #:box text))   ; doesn't work
 ))

\markup \dosomething "blah"
%---

This ends up in an error message:
--
C:/Portable/lilypond-2.24.3/share/lilypond/2.24.3/ly/init.ly:65:2: Fehler: 
Guile signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
In procedure *: Wrong type: myvalue
Wurde mit dem Return-Code 1 beendet.
--

I've tried numerous variations of (un-)quoting, but I can't seem to find my 
mistake.
Can anybody tell me what I'm doing wrong?

Thanks in advance,
Klaus



Text markup length and bar spacing

2024-09-17 Thread Lib Lists
Hi everybody,
I'm trying to find the right option to make sure that the bar spacing
follows the length of a text markup.
See this example: if it's one bar long it works, if 2 or more it doesn't.

\version "2.25.19"

\score {
  <<
\new StaffGroup <<
  \new Staff = "upper" {
c'4 -\markup {"A very very long markup text, soo long"} d' e' f'
  c' c' c' c'}
>>
  >>
}

\score {
  <<
\new StaffGroup <<
  \new Staff = "upper" {
c'4 -\markup {"A very very long markup text, soo long"} d' e' f' }
>>
  >>
}

Thanks in advance for any hint,
Lib



Re: Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread William Rehwinkel via LilyPond user discussion

Dear Stu,

I don't think that is the problem here, because in original OP snippet, 
if you comment out the line `\new Voice { \voiceFour e,2 }`, there is no 
barcheck fail, and if you try the following example you can hear how the 
upper notes become out of sync with the lower notes in the midi.


Thanks,
-William

% -
\version "2.25.19"

rightHand = \relative {
  \time 3/4
  <<
{ \voiceOne e'4. d'8 }
\new Voice { \voiceFour e,2 }
  >>
  \oneVoice \appoggiatura { c'16 d e } d8 c | c8
}

\include "articulate.ly"

\score {
  \articulate <<
\new Staff \rightHand
\new Staff { c8 e c e c e | c' }
  >>
  \midi {}
}
% -

On 9/16/24 19:46, Stu McKenzie via LilyPond User List wrote:



On 2024-09-16 14:27, Knute Snortum wrote:


On Mon, Sep 16, 2024 at 2:14 PM Knute Snortum  wrote:


On Mon, Sep 16, 2024 at 12:15 PM David Kastrup  wrote:


In my book, an appoggiatura is executed at least with the written
duration, and here you take 3/16 of time from 1/8. How is that
supposed
to work?  You probably want \acciaccatura or \grace instead.


I think you're right that I need an acciaccatura.  Thank you for
looking into it.


Hmm...  the code still issues a bar check warning with an acciaccatura 
or grace.  It also doesn't help if I tinker with the durations:


%%%
\oneVoice \grace { c'16*1/8 d e } d8 c |
%%%


I think I understand what's happening.
I tried it with 2.24.0.

Your example has only 2 eighth notes, because the \grace and 
\acciaccatura don't use up any time.

So, there are still 3 beats to use up in the bar.

This works for 3/4 time except for the last bar using 2.24.0:

\score {
\relative {
\time 3/4

% 16*1/8 results in 1 sixteenth
\oneVoice \grace { c'16*1/8 d e } d2 c4 |

% The same bar using c'16 (changed to c16)
\oneVoice \grace { c16 d e } d2 c4 |

% \acciaccatura doesn't use up any time, but the 2 following notes do.
\acciaccatura { c16 d e } d2 c4 |

% Your original bar in 3/4 time (bar check with 2.24.0 as well!)
% \grace doesn't use up any time before the 2 eighth notes, so if the 
time is 3/4, you have only 1 beat in the bar (2 eighth notes).

\oneVoice \grace { c'16*1/8 d e } d8 c |

}
}

HTH




--
William Rehwinkel (any pronouns)
Juilliard School '26 - Oberlin Conservatory '24
will...@williamrehwinkel.net - https://williamrehwinkel.net
PGP Public Key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread Stu McKenzie via LilyPond User List



On 2024-09-16 14:27, Knute Snortum wrote:


On Mon, Sep 16, 2024 at 2:14 PM Knute Snortum  wrote:


On Mon, Sep 16, 2024 at 12:15 PM David Kastrup  wrote:


In my book, an appoggiatura is executed at least with the written
duration, and here you take 3/16 of time from 1/8. How is that
supposed
to work?  You probably want \acciaccatura or \grace instead.


I think you're right that I need an acciaccatura.  Thank you for
looking into it.


Hmm...  the code still issues a bar check warning with an acciaccatura 
or grace.  It also doesn't help if I tinker with the durations:


%%%
\oneVoice \grace { c'16*1/8 d e } d8 c |
%%%


I think I understand what's happening.
I tried it with 2.24.0.

Your example has only 2 eighth notes, because the \grace and 
\acciaccatura don't use up any time.

So, there are still 3 beats to use up in the bar.

This works for 3/4 time except for the last bar using 2.24.0:

\score {
\relative {
\time 3/4

% 16*1/8 results in 1 sixteenth
\oneVoice \grace { c'16*1/8 d e } d2 c4 |

% The same bar using c'16 (changed to c16)
\oneVoice \grace { c16 d e } d2 c4 |

% \acciaccatura doesn't use up any time, but the 2 following notes do.
\acciaccatura { c16 d e } d2 c4 |

% Your original bar in 3/4 time (bar check with 2.24.0 as well!)
% \grace doesn't use up any time before the 2 eighth notes, so if the 
time is 3/4, you have only 1 beat in the bar (2 eighth notes).

\oneVoice \grace { c'16*1/8 d e } d8 c |

}
}

HTH



Re: Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread Knute Snortum
On Mon, Sep 16, 2024 at 2:14 PM Knute Snortum  wrote:

>
> On Mon, Sep 16, 2024 at 12:15 PM David Kastrup  wrote:
>
>>
>> In my book, an appoggiatura is executed at least with the written
>> duration, and here you take 3/16 of time from 1/8.  How is that supposed
>> to work?  You probably want \acciaccatura or \grace instead.
>
>
> I think you're right that I need an acciaccatura.  Thank you for looking
> into it.
>

Hmm...  the code still issues a bar check warning with an acciaccatura or
grace.  It also doesn't help if I tinker with the durations:

%%%
\oneVoice \grace { c'16*1/8 d e } d8 c |
%%%


Re: Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread Knute Snortum
On Mon, Sep 16, 2024 at 12:15 PM David Kastrup  wrote:

>
> In my book, an appoggiatura is executed at least with the written
> duration, and here you take 3/16 of time from 1/8.  How is that supposed
> to work?  You probably want \acciaccatura or \grace instead.


I think you're right that I need an acciaccatura.  Thank you for looking
into it.


--
Knute Snortum


Re: Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread David Kastrup
Knute Snortum  writes:

> I have discovered that LilyPond 2.25.19 produces a bad bar check warning
> under certain circumstances.  The three parts are 1) using two voices, 2)
> an appoggiatura, 3) using articulate.ly.  Below is my example code:
>
> %%%
> \version "2.25.19"
>
> rightHand = \relative {
>   \time 3/4
>   <<
> { \voiceOne e'4. d'8 }
> \new Voice { \voiceFour e,2 }
>   >>
>   \oneVoice \appoggiatura { c'16 d e } d8 c |
> }
>
> % This score block is not necessary to produce the warning but
> % it shows how the measure is correct.
> % \score {
> %   \new Staff \rightHand
> %   \layout {}
> % }
>
> \include "articulate.ly"
>
> \score {
>   \articulate <<
> \new Staff \rightHand
>   >>
>   \midi {}
> }
> %%%
>
> This may be related to the problems with creating the MIDI output of an
> appoggiatura with articulate.

In my book, an appoggiatura is executed at least with the written
duration, and here you take 3/16 of time from 1/8.  How is that supposed
to work?  You probably want \acciaccatura or \grace instead.

What does the music glossary say about LilyPond's idea?

1.20 appoggiatura
=

ES: apoyatura, I: appoggiatura, F: appoggiature, (port de voix), D:
Vorschlag, Vorhalt NL: (korte) voorslag, DK: forslag, S: förslag, FI:
appoggiatura, etuhele.

   Ornamental note, usually a second, that is melodically connected with
the main note following it.  In music before the 19th century
appoggiature were usually performed on the beat, after that mostly
before the beat.  While the short appoggiatura is performed as a short
note regardless of the duration of the main note the duration of the
long appoggiatura is proportional to that of the main note.

Ok, it woulkd appear that my idea (and possibly that of articulate.ly's
author) corresponds with what is described here as "long appoggiatura",
namely being written in the timing of normal notes and taking from the
following note.

-- 
David Kastrup



Bad bar check warning with two voices, appoggiatura, and articulate

2024-09-16 Thread Knute Snortum
I have discovered that LilyPond 2.25.19 produces a bad bar check warning
under certain circumstances.  The three parts are 1) using two voices, 2)
an appoggiatura, 3) using articulate.ly.  Below is my example code:

%%%
\version "2.25.19"

rightHand = \relative {
  \time 3/4
  <<
{ \voiceOne e'4. d'8 }
\new Voice { \voiceFour e,2 }
  >>
  \oneVoice \appoggiatura { c'16 d e } d8 c |
}

% This score block is not necessary to produce the warning but
% it shows how the measure is correct.
% \score {
%   \new Staff \rightHand
%   \layout {}
% }

\include "articulate.ly"

\score {
  \articulate <<
\new Staff \rightHand
  >>
  \midi {}
}
%%%

This may be related to the problems with creating the MIDI output of an
appoggiatura with articulate.

--
Knute Snortum


Re: Inconsistent crescendo endings (and kate weirdness)

2024-08-26 Thread Knute Snortum
On Mon, Aug 26, 2024 at 2:47 PM Wol  wrote:

> I've got a little mwe, but my crescendo endings seem a little random. On
> line 1, the crescendo ends on the bar line, but the \! is on the g flat.
> On line 2, the \! is on the g, and the crescendo ends on the g as I
> would expect. Any ideas why?
>

Crescendos will end at the bar line unless you explicitly tell it not to.

%%%
\version "2.24.4"

\relative {
  c''4 c\< c c |
  d\! d-\tweak to-barline ##f \< d d |
  e\! e e e |
}
%%%


--
Knute Snortum


Inconsistent crescendo endings (and kate weirdness)

2024-08-26 Thread Wol
I've got a little mwe, but my crescendo endings seem a little random. On 
line 1, the crescendo ends on the bar line, but the \! is on the g flat. 
On line 2, the \! is on the g, and the crescendo ends on the g as I 
would expect. Any ideas why?


It's almost as if lilypond is randomly deciding that \! is or is not a 
dynamic marking, and therefore that the crescendo should not or should 
end actually on the note to which it is attached.



On that slightly different kate note, it may be obvious that kate is my 
preferred editor on linux, but when I'm typing in my lilypond source, 
kate is "randomly" outdenting my lines. It's obvious what's happening - 
when I type " -> " for a staccato, or end a " {} " pair, it recognises 
as ">" as part of a closing ">>", or "}" as a close, and thinks it 
should outdent. Except why would you outdent for staccato? Why would you 
outdent for decrescendo? Why would you outdent for finishing enclosing a 
bit of text.


I might be able to fix this for myself, if I knew where to look, if some 
kind soul could point me?


And a little caesura problem too - is that a new keyword in 2.25? Do I 
need to upgrade? I'm currently using my laptop, so digging into that one 
is not something I fancy doing on this computer - it's playing up.


TIA

Cheers,
Wol\version "2.24.3"

\include "english.ly"

mbreak = { \break }
%mbreak = { }

voiceTromboneII = \transpose c' c' \relative c' {

r2 af ~ af2. r4 | \repeat "percent" 2 { af4 r r2 } r2 f\<( | gf2.)\! r4 bf r g r | af r r2 | af2->\ff af8 r r4 |

\mbreak

a2-> ~ a8 r r4 | bf2-> ~ bf8 r r4 | c2-> ~ c8 r r4 | df,2\ff^\markup { "Broadly" \italic "(in 3)" } f4 | af2. | bf4\<^\markup \italic "rall." bf af |
af gf g\! | af2.\fermata | df,8->\ff r r4 r % it's ffz !!!
}

voiceTimeSig =  { \transpose c' c' \relative c' {
\time 2/2 \key df \major s1*12
\time 3/4 s2.*6
}}

voiceMarkup =  {
	\set Score.rehearsalMarkFormatter = #format-mark-circle-alphabet
s1*12 \bar "||" \mark \default % N
s2.*6 \bar "||"
}


\score {
	\new Staff {
		\set Score.skipBars = ##t
		 {
 \transpose c' c' {
\clef "tenor"
<<
	\voiceTimeSig
	\voiceTromboneII
	\voiceMarkup
>>
			}
		}
	}
}


mwe.pdf
Description: Adobe PDF document


Re: Song with repeat and partial

2024-08-10 Thread Raphael Mankin




On 10/08/2024 11:01, Valentin Petzel wrote:

I was hoping there was a neat trick that did not involve stubs. But if
that is the "traditional" way of doing things 


I mean, what du you want to see in the end? This sort of notation is very
common in vocal music.


I know it is common, that was why I asked and I was hoping that there 
was a way of doing it without stubs. But as that seems to be the 
accepted wisdom, so be it.




Re: Song with repeat and partial

2024-08-10 Thread Valentin Petzel
> I was hoping there was a neat trick that did not involve stubs. But if
> that is the "traditional" way of doing things 

I mean, what du you want to see in the end? This sort of notation is very 
common in vocal music.

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


Re: Song with repeat and partial

2024-08-09 Thread Raphael Mankin




On 09/08/2024 09:54, Valentin Petzel wrote:

I have a song with an intro, several stanzas, and a refrain. Each stanza
starts on the last beat of the measure.See the attached MWE.

Is there a neat way of avoiding having a repeat bar in the middle of a
measure while preserving the stanza numbers is their proper  places?


I’m a bit confused of what you actually want. Do you want to avoid having the
repeat bars in the middle of the measure? Then you could do it the traditional
way:

%%%
\version "2.24.3"

intro = \relative c' {  g' f e d c b a  g }
melody = \relative c' \new Voice = "verse" {
   a
   \repeat volta 3 {
 b c d \new Voice = "chorus" { e f g a } a,
   }
}
verseA = \lyricmode {
   \set stanza = "1."
   This is verse one
}
verseBstub = \lyricmode {
   \set stanza = "2." This
}
verseB = \lyricmode {
   \skip This
   \set stanza = "(2.)"
   is verse two
}
verseCstub = \lyricmode {
   \set stanza = "3." This
}
verseC = \lyricmode {
   \skip This
   \set stanza = "(3.)"
   is verse three
}
chorusWords = \lyricmode {
   \set stanza = "Refrain."
   This is the chorus
}

\score {
   <<
 \new Staff {
   \partial 4
   \intro
   \melody
 }
 \new Lyrics = "mainlyrics" \lyricsto "verse" { \verseA \verseBstub }
 \context Lyrics = "mainlyrics" \lyricsto "chorus" \chorusWords
 \new Lyrics \lyricsto "verse" { \verseB \verseCstub }
 \new Lyrics \lyricsto "verse" { \verseC }
   >>
   \layout { }
}
%%%

I was hoping there was a neat trick that did not involve stubs. But if 
that is the "traditional" way of doing things 




Re: Song with repeat and partial

2024-08-09 Thread Valentin Petzel
> I have a song with an intro, several stanzas, and a refrain. Each stanza
> starts on the last beat of the measure.See the attached MWE.
> 
> Is there a neat way of avoiding having a repeat bar in the middle of a
> measure while preserving the stanza numbers is their proper  places?

I’m a bit confused of what you actually want. Do you want to avoid having the 
repeat bars in the middle of the measure? Then you could do it the traditional 
way:

%%%
\version "2.24.3"

intro = \relative c' {  g' f e d c b a  g }
melody = \relative c' \new Voice = "verse" {
  a
  \repeat volta 3 {
b c d \new Voice = "chorus" { e f g a } a,
  }
}
verseA = \lyricmode {
  \set stanza = "1."
  This is verse one
}
verseBstub = \lyricmode {
  \set stanza = "2." This
}
verseB = \lyricmode {
  \skip This
  \set stanza = "(2.)"
  is verse two
}
verseCstub = \lyricmode {
  \set stanza = "3." This
}
verseC = \lyricmode {
  \skip This
  \set stanza = "(3.)"
  is verse three
}
chorusWords = \lyricmode {
  \set stanza = "Refrain."
  This is the chorus
}

\score {
  <<
\new Staff {
  \partial 4
  \intro
  \melody
}
\new Lyrics = "mainlyrics" \lyricsto "verse" { \verseA \verseBstub }
\context Lyrics = "mainlyrics" \lyricsto "chorus" \chorusWords
\new Lyrics \lyricsto "verse" { \verseB \verseCstub }
\new Lyrics \lyricsto "verse" { \verseC }
  >>
  \layout { }
}
%%%

Cheers,
Valentin

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


Re: Song with repeat and partial

2024-08-08 Thread Raphael Mankin




On 09/08/2024 04:48, David Wright wrote:

On Wed 07 Aug 2024 at 14:43:32 (+0100), Raphael Mankin wrote:

 Is there a neat way of avoiding having a repeat bar in the middle
   of a measure while preserving the stanza numbers is their proper
   places?


I wasn't aware that the stanza numbers could become detached from
their proper place, which is in front of the first syllable of each
verse. However, I would take the advice of Henning Hraban Ramm, and
place Refrain as markup (I would use italics) over the staff, rather
than inserting it into the lyrics. If that's not possible for other
reasons, then abbreviate it to R.

As for eliminating the repeat barline, it all depends. The MWE
doesn't give a lot of clues.

The first alternative is just to make sure that the opening repeat
barline comes at the start of the line. The length of the real
introduction will affect how easily this can be done.

The next least alteration would be to use a segno mark, with D.S.
at the end, as less noticeable.

Another way is commonly used with hymns, breaking the lines to match
the lyric phrases. Whether you leave the staff open at the break, or
place a double barline, is a matter of taste. Your example doesn't
particularly look like a hymn, where the introduction is often
repeated before each verse, helping untrained singers get started.

Yet another way is to complete the last measure by adding the first
note of each verse (except the first). This moves the repeat barline
to the start of the measure. Typically, it makes the transition
between verses clearer when the music runs straight through.
Of course, you then have to add a last time measure. Sometimes this
is required anyway.

So choose whichever one suits the music itself. It won't always be
the same choice, as there's no one right answer.


Thank you, David.

Maybe I should have put more emphasis on the word "neat". I have various 
work-arounds, including yours, but while visually they do the right 
thing, from  a maintenance point of view I tend to feel that the cure is 
worse than the disease.


For maintenance I think that your suggestion of  inserting a line-break 
before the repeat is probably the simplest. It leaves an incomplete 
measure on the previous line, but KISS principle etc.


Life is easier when the refrain comes after the verse.



Re: Song with repeat and partial

2024-08-08 Thread David Wright
On Wed 07 Aug 2024 at 14:43:32 (+0100), Raphael Mankin wrote:
> Is there a neat way of avoiding having a repeat bar in the middle
>   of a measure while preserving the stanza numbers is their proper 
>   places?

I wasn't aware that the stanza numbers could become detached from
their proper place, which is in front of the first syllable of each
verse. However, I would take the advice of Henning Hraban Ramm, and
place Refrain as markup (I would use italics) over the staff, rather
than inserting it into the lyrics. If that's not possible for other
reasons, then abbreviate it to R.

As for eliminating the repeat barline, it all depends. The MWE
doesn't give a lot of clues.

The first alternative is just to make sure that the opening repeat
barline comes at the start of the line. The length of the real
introduction will affect how easily this can be done.

The next least alteration would be to use a segno mark, with D.S.
at the end, as less noticeable.

Another way is commonly used with hymns, breaking the lines to match
the lyric phrases. Whether you leave the staff open at the break, or
place a double barline, is a matter of taste. Your example doesn't
particularly look like a hymn, where the introduction is often
repeated before each verse, helping untrained singers get started.

Yet another way is to complete the last measure by adding the first
note of each verse (except the first). This moves the repeat barline
to the start of the measure. Typically, it makes the transition
between verses clearer when the music runs straight through.
Of course, you then have to add a last time measure. Sometimes this
is required anyway.

So choose whichever one suits the music itself. It won't always be
the same choice, as there's no one right answer.

Cheers,
David.



Song with repeat and partial

2024-08-07 Thread Raphael Mankin


  
  
This is a follow-up from a question I asked a few weeks back.


I have a song with an intro, several stanzas, and a refrain. Each
  stanza starts on the last beat of the measure.See the attached
  MWE.


Is there a neat way of avoiding having a repeat bar in the middle
  of a measure while preserving the stanza numbers is their proper 
  places?

  
\version "2.24.3"

intro = \relative c' {  g' f e d c b a  g }
melody = \relative c' {
  \repeat volta 3 { a b c d e f g a }
}
verseA = \lyricmode {   \set stanza = "1. "
This is verse one }
verseB = \lyricmode {   \set stanza = "2. "
This is verse two }
verseC = \lyricmode {   \set stanza = "3. "
This is verse three }
chorusWords = \lyricmode {  \set stanza = "Refrain. "
This is the chorus }

\score {
  \new Staff {
  \partial 4
\intro
\melody
\addlyrics {
  \repeat volta 3 {
<<
  \new Lyrics = mainlyrics  \verseA  
  \new Lyrics \verseB
  \new Lyrics \verseC
>>
   \context Lyrics = mainlyrics \chorusWords
  }
}
  }
  \layout { }
}

MWE.pdf
Description: Adobe PDF document


Re: OpenLilyLib include-pattern, instrument header, and \include layout { }

2024-08-07 Thread Kieren MacMillan
Hi Pond-mates!

>> to get the behavior of \header { instrument = "whatever" },
>> as seen with \bookpart,
> 
> What's available for changing the "instrument" header mid-piece,
> without using \bookpart at all?

%%%  SNIPPET BEGINS
\version "2.25.11"

\paper {
  scoreTitleMarkup = \markup \fromproperty #'header:instrument
}

\score {
  << c' >>
  \header {
instrument = "Piano"
  }
}

\score {
  << c'' >>
  \header {
instrument = "Trumpet"
  }
}
%%%  SNIPPET ENDS

I would assume this would be possible whatever mechanism one is using to create 
the scores & headers.

Cheers,
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: OpenLilyLib include-pattern, instrument header, and \include layout { }

2024-08-07 Thread Karlin High
On Tue, Aug 6, 2024 at 10:21 PM Karlin High  wrote:
>  to get the behavior of \header { instrument = "whatever" },
> as seen with \bookpart,

Another idea:

What's available for changing the "instrument" header mid-piece,
without using \bookpart at all?
-- 
Karlin High
Missouri, USA



Re: Multiple fingering and glides

2024-08-07 Thread Valentin Petzel
Am Donnerstag, 1. August 2024, 22:36:40 MESZ schrieb Fennel:
> Hi all,
> 
> I'm working on a project that involves multiple fingerings for each note,
> and shift lines or glides between some notes. Since lilypond will only
> engrave glides between notes with the same fingering, I'm using finger 5 to
> be the placeholder fingering and overriding the Fingering text property to
> the desired value.
> 
> Can anyone say why this is producing the attached output? There are two main
> issues. 1. The glide line is engraving not as expected. I'd like it to run
> from the first "5" to the next (adjacent) "5", and I don't have a clue as
> to why it is behaving the way that it does. 1. The \once text override is
> applying to the entire NoteEvent, not the next Fingering, which is the
> intended behavior. Is there a workaround for this?
> 
> -Fennel

Hello Fennel,

if I’m understanding you correctly you wish to see slides between different 
fingerings. One way to go about this would be to assign an arbitrary number to 
the fingering (let’s call id the ID) and then change what is displayed by 
tweaking the text of the fingering. Example:

{
  4-\tweak text "2" _\finger 12345 \glide
  4-\tweak text "3" _\finger 12345
}

here we use the actual fingering of 12345 as "ID", and then actually have it 
display once 2, once 3. We can wrap this in a function:

cfinger =
#(define-music-function (id finger) (index? index-or-markup?)
   #{
 -\tweak text #(if (index? finger) (number->string finger) finger)
 -\finger #id
   #})

{
  4_\cfinger 12345 2 \glide
  4_\cfinger 12345 3
}

Cheers,
Valentin

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


Re: Multiple fingering and glides

2024-08-07 Thread Thomas Morley
Am Di., 6. Aug. 2024 um 05:14 Uhr schrieb Fennel :
>
> Multiple fingerings are being used because I'm working on a heavily annotated 
> edition of a work that suggests multiple sets of fingerings for a single 
> passage.

To summarize, alternative fingerings, right?

> I'm currently choosing to engrave harmonic symbols (the flageolets) as 
> fingering objects as well because I need them to behave like fingering 
> objects instead of script objects.

Why?

>
> I will open an issue!

https://gitlab.com/lilypond/lilypond/-/issues/6735
Thanks.
Further discussion about the issue at hand there at GitLab.

> Though I fear the solution for me right now will be monkeying around in an 
> SVG editor to make the notation.

Here an (admittedly ugly) workaround for your example:

thumb = \finger\markup\fontsize #5 \musicglyph "plus"
flageolet = \finger\markup\fontsize #4 \musicglyph "scripts.flageolet"

\new Staff
  <<
\relative c'' {
  a16_2^2
  a_3
  %% -\hide -3 is a placeholder for the Fingering from NullVoice
  a-\hide -3 \thumb_\flageolet^\flageolet
  a_3^\thumb^\flageolet a a a a a_2^1 a_3^2
  a_\thumb_\flageolet^3^\flageolet a_3^\thumb a a a a_\thumb_\flageolet^1
  a_1^\thumb a_2 a_3 a_2
}

\new NullVoice
  \with {
\consists Finger_glide_engraver
\consists Fingering_engraver
  }
  {
%% `staff-padding` likely needs to be adjusted frequently
\override Fingering.staff-padding = 1.5
s16 a\glide -3 a-3
  }
  >>

Cheers,
  Harm



OpenLilyLib include-pattern, instrument header, and \include layout { }

2024-08-06 Thread Karlin High
Continuing from
<https://lists.gnu.org/archive/html/lilypond-user/2024-01/msg00239.html>

Intel Core i5-2400, 16 GB RAM, Windows 10 22H2, LilyPond 2.24.3

My project is an index of tunes for a hymnal that has never been
printed with notation, only lyrics, allowing the use of whatever tunes
are suitable.

The finished tune index will be part of a pocket-size book, 3-3/8" x
5" (85mm x 127mm) with ~10 single staves per page, each with notation
for the first line of a tune as sung.

OpenLilyLib (version 0.6.0) \includePattern is working well to include
233 (and counting) .ly files grouped by meter into 16 subdirectories.
Instead of having to write and maintain \include statements for each
file, there is an \includePattern for each directory.

Ideally, there would be a printed header at each meter change,
repeated at the top of following pages.

At first I tried using bookparts for this:

%
\bookpart {
  \header {
instrument = "Short Meter"
  }

\includePattern "../M03 Short Meter" \pattern
}
%

That worked reasonably well, except I would like \bookpart to not
cause page breaks with unfull pages when a meter changes.

Now, I also want a global \include file for layout. Editorial feedback
so far, coming from an \aikenThinHeads music tradition, says the Staff
Size 11 I'm using needs larger noteheads and lighter staff lines. I
have the \override statements worked out to get those results. I am
sure there are more such requests to come.

I want the \override statements (or whatever equivalent) which I'd
normally enter in score-level \layout{ } blocks, to work like the
#(set-global-staff-size 11) statement that affects everything
\includePattern brings in. Enter one place, and it "does it to
everything."

But so far, I haven't figured out how to have \includePattern allow
using a variable defined in a top-level \include statement for \layout
{ } inside a \bookpart. Here is what I am seeing, in the Bash from Git
2.14.2.2 for Windows, in hopes of being more Linux-like with file
paths etc.

owner@LenovoM91p MINGW64 ~
$ cat globalLayout.ily
\version "2.24"
globalLayout = \layout {
  indent = 0
}

owner@LenovoM91p MINGW64 ~
$ cat ./tunes/song.ly
\version "2.24"
\include "english.ly"
\include "../globalLayout.ily"

\score {
  c'
  \globalLayout
}

owner@LenovoM91p MINGW64 ~
$ cat book.ly
\version "2.24"
\include "oll-core/package.ily"
\loadModule oll-core.util.include-pattern

pattern = ".*\\.ly"

% Works perfectly
\includePattern "tunes" \pattern

%{ gives error
\bookpart {
  \includePattern "tunes" \pattern
}
%}

If that last error-causing \bookpart is uncommented, it goes:

owner@LenovoM91p MINGW64 ~
$ /c/Program\ Files/lilypond-2.24.3/bin/lilypond.exe book.ly
Processing `book.ly'
Parsing...

oll-core: library infrastructure successfully loaded.
book.ly:12:1: error: syntax error, unexpected SYMBOL

  \includePattern "tunes" \pattern
tunes/../globalLayout.ily:2:1: error: syntax error, unexpected SYMBOL

globalLayout = \layout {
tunes/../globalLayout.ily:2:16: error: need \paper for paper block
globalLayout =
   \layout {
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Converting to `book.pdf'...
fatal error: failed files: "book.ly"

I expect I am misunderstanding something about \include and \bookpart.

Concluding summary:

What ways are there,
 to get the behavior of \header { instrument = "whatever" },
as seen with \bookpart,
but without the page breaks,
while having a global \include file for \layout { },
that is effective for everything loaded by OLL's \includePattern statements?

(Feels like the "All in the House That Jack Built" poem, only it is
Han-Wen, Jan, and others in this case.)
--
Karlin High
Missouri, USA



Re: Multiple fingering and glides

2024-08-05 Thread Fennel
Multiple fingerings are being used because I'm working on a heavily annotated 
edition of a work that suggests multiple sets of fingerings for a single 
passage. I'm currently choosing to engrave harmonic symbols (the flageolets) as 
fingering objects as well because I need them to behave like fingering objects 
instead of script objects.

I will open an issue! Though I fear the solution for me right now will be 
monkeying around in an SVG editor to make the notation.

-Fennel

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?


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: "oom pah" and chord line

2024-08-02 Thread Gilles Sadowski
Le mer. 31 juil. 2024 à 18:18, Gilles Sadowski  a écrit :
>
> Hello.
>
> A common accompaniment motive is "oom pah":
>   https://en.wikipedia.org/wiki/Oom-pah
>
> An excerpt of a LilyPond-generated score is attached.
> I get this PDF output by encoding separately the "oom" ("bassoon" line)
> and the "pah" (the chord line), for the purpose of getting the MIDI output
> right: Bass note on the downbeat; chord on the upbeat.
> However, this entails that in the PDF the chord name is also displayed
> on the upbeat (as expected) despite it should also appear above the
> downbeat in order to convey the correct semantics of the harmonic
> structure.
>
> The excerpt below shows how the "upbeat" part is encoded (in its own file).
> ---CUT---
> aMajorBar = \chordmode {
>   s8 a s a |
> }
> aMajorGMinorBar = \chordmode {
>   s8 g:m s g:m |
> }
> harmonyChords = \chordmode {
>   \time 2/4
> % Intro
>   \repeat percent 2 {
> \aMajorBar
>   }
> % A
>   \repeat volta 2 {
> \aMajorGMinorBar
> \aMajorBar
> \aMajorGMinorBar
> \aMajorBar
>   }
> % etc.
> }
> harmony = \context ChordNames = "Harmony" {
>   \set chordChanges = ##t
>   \set ChordNames.midiInstrument = "accordion"
> %
>   \harmonyChords
> }
> ---CUT---
>
> Is there a recommended way to encode "oom pah" style accompaniment
> that would produce both outputs (PDF and MIDI) right?

Partially answering my initial question, the correct outputs are achieved
with encoding the upbeat accompaniment (and chord line) as
---CUT---
aMajorBar = \chordmode {
  \tag #'no-layout {
s8 a s a |
  }
  \tag #'no-midi {
a2 |
  }
}
---CUT---

> If not, it looks like what I'm looking for is a function with two arguments
> (a duration and a chord name) that would shift the graphics (to the left)
> while not changing its timing position:
> ---CUT---
> aMajorBar = \chordmode {
>   s8 \shiftChordSymbol { 8 a } s  \shiftChordSymbol { 8 a } |
> }
> ---CUT---

Hence the new question:  How to define an "oompah" function
---CUT---
aMajorBar = \oompah { a2 }
---CUT---
that would expand to
---CUT---
aMajorBar = \chordmode {
  \tag #'no-layout {
a,,8:1 a e,,:1 a |
  }
  \tag #'no-midi {
a2 |
  }
}
---CUT---
i.e. from the chord name (and duration) argument, the function
would create
 * the two "tag" blocks and
 * the "oom pah" motif that consists of the bass notes (I, V) and
   upbeat chords.

Best regards,
Gilles



Re: Multiple fingering and glides

2024-08-02 Thread Thomas Morley
Am Fr., 2. Aug. 2024 um 05:42 Uhr schrieb Werner LEMBERG :
>
>
> > I'm working on a project that involves multiple fingerings for each
> > note, and shift lines or glides between some notes.  [...]
>
> Hopefully Harm has some time to help here since he is the original
> author of the fingering glide code, IIRC.

The finger-glide functionality was designed to work with one fingering
for one note.
Multiple fingerings on one note puzzle the engraver and the outcome is
not predictable.

Currently you have up to four fingerings per note.
Could you explain what each mean? Maybe others ideas from more users
would pop up.

Also, you could open an issue to extend the functionality as a feature
request, though please explain then why this is useful and what it is
supposed to mean, otherwise it likely gets very low priority on
everyones todo-list.

Sorry to be of not more help,
  Harm



Re: Multiple fingering and glides

2024-08-01 Thread Werner LEMBERG


> I'm working on a project that involves multiple fingerings for each
> note, and shift lines or glides between some notes.  [...]

Hopefully Harm has some time to help here since he is the original
author of the fingering glide code, IIRC.

> 1. The \once text override is applying to the entire NoteEvent, not
>the next Fingering, which is the intended behavior.  Is there a
>workaround for this?

Try to replace

```
\once \override Foo.bar = bla
c4 -4 -5 
```

with

```
c4 \tweak Foo.bar bla -4 \tweak Foo.bar blubb -5
```

(and in many cases you can omit the `Foo.` part).


   Werner



Multiple fingering and glides

2024-08-01 Thread Fennel
Hi all,

I'm working on a project that involves multiple fingerings for each note, and 
shift lines or glides between some notes. Since lilypond will only engrave 
glides between notes with the same fingering, I'm using finger 5 to be the 
placeholder fingering and overriding the Fingering text property to the desired 
value.

Can anyone say why this is producing the attached output? There are two main 
issues.
1. The glide line is engraving not as expected. I'd like it to run from the 
first "5" to the next (adjacent) "5", and I don't have a clue as to why it is 
behaving the way that it does.
1. The \once text override is applying to the entire NoteEvent, not the next 
Fingering, which is the intended behavior. Is there a workaround for this?

-Fennel

test_fingering.pdf
Description: Adobe PDF document


test_fingering.ly
Description: Binary data


Re: Spontini and page numbers

2024-07-31 Thread Paolo Prete
This is a LilyPond bug, not a Spontini issue. Which LilyPond version are
you currently using? Did you try other versions as well?
In any case, if changing LilyPond doesn't solve the issue I can show you
alternative ways to print page numbers, but I will be home with my PC
available on Monday, so please be patient.

Il mer 31 lug 2024, 23:56 bobr...@centrum.is  ha
scritto:

> Spontini (v1.25) is behaving oddly in the following example.  In SVG mode
> the following code will compile, but both pages will not be available in
> the browser panel, only the first page.  If Spontini is then set to PDF
> mode, it will behave as expected, but at the cost of the graphic
> functionality that it offers in SVG mode.  Commenting out the
> 'first-page-number' variable avoids this but then the page numbering is off.
>
> --David
>
> 
> \version "2.24.4"
>
> \book {
>   \bookpart {
> \score {
>   c'1
> }
> \pageBreak
> \score {
>   d'1
> }
>   }
>   \paper{
> print-first-page-number = ##t
> first-page-number = 2
>   }
> }
> 
>


Spontini and page numbers

2024-07-31 Thread bobr...@centrum.is
Spontini (v1.25) is behaving oddly in the following example. In SVG mode the 
following code will compile, but both pages will not be available in the 
browser panel, only the first page. If Spontini is then set to PDF mode, it 
will behave as expected, but at the cost of the graphic functionality that it 
offers in SVG mode. Commenting out the 'first-page-number' variable avoids this 
but then the page numbering is off. 

--David 

 
\version "2.24.4" 

\book { 
\bookpart { 
\score { 
c'1 
} 
\pageBreak 
\score { 
d'1 
} 
} 
\paper{ 
print-first-page-number = ##t 
first-page-number = 2 
} 
} 
 


"oom pah" and chord line

2024-07-31 Thread Gilles Sadowski
Hello.

A common accompaniment motive is "oom pah":
  https://en.wikipedia.org/wiki/Oom-pah

An excerpt of a LilyPond-generated score is attached.
I get this PDF output by encoding separately the "oom" ("bassoon" line)
and the "pah" (the chord line), for the purpose of getting the MIDI output
right: Bass note on the downbeat; chord on the upbeat.
However, this entails that in the PDF the chord name is also displayed
on the upbeat (as expected) despite it should also appear above the
downbeat in order to convey the correct semantics of the harmonic
structure.

The excerpt below shows how the "upbeat" part is encoded (in its own file).
---CUT---
aMajorBar = \chordmode {
  s8 a s a |
}
aMajorGMinorBar = \chordmode {
  s8 g:m s g:m |
}
harmonyChords = \chordmode {
  \time 2/4
% Intro
  \repeat percent 2 {
\aMajorBar
  }
% A
  \repeat volta 2 {
\aMajorGMinorBar
\aMajorBar
\aMajorGMinorBar
\aMajorBar
  }
% etc.
}
harmony = \context ChordNames = "Harmony" {
  \set chordChanges = ##t
  \set ChordNames.midiInstrument = "accordion"
%
  \harmonyChords
}
---CUT---

Is there a recommended way to encode "oom pah" style accompaniment
that would produce both outputs (PDF and MIDI) right?
If not, it looks like what I'm looking for is a function with two arguments
(a duration and a chord name) that would shift the graphics (to the left)
while not changing its timing position:
---CUT---
aMajorBar = \chordmode {
  s8 \shiftChordSymbol { 8 a } s  \shiftChordSymbol { 8 a } |
}
---CUT---

Best regards,
Gilles


Re: Engravers, fingerings and acknowledgments

2024-07-29 Thread Luca Fascione
On Tue, Jul 30, 2024 at 5:57 AM David Kastrup  wrote:

> Lukas-Fabian Moser  writes:
>
> > You're using append! wrong.
> > So try
> >
> > (set! fl (append fl ...))
>
> (append! '() ...)
>
> cannot modify an empty list in-place because there is only one empty
> list in the whole system and it is an unchangeable constant.
>
oh. Right, thanks for setting me straight :-)

Your suggestion helped me see the real issue with my code:
my understanding of how acknowledgers run was flawed.

Applying your fix I see that the fingering ack'er runs 3 times for a chord
event,
while the ack'er for the associated stem runs once (arguably there are 3
heads and one stem,
so this part makes sense), but more importantly process-music runs only
once after all the above has happened.

As I was typing the email, I got a suspect that the whole scheme
(implemented in scheme, ha.) would fall flat on its face when dealing with
whole-notes.
But instead it doesn't. I can see that both rests and whole notes have
associated Stem grobs.

What kind of sorcery is that?

Thanks again guys
L


-- 
Luca Fascione


Re: Engravers, fingerings and acknowledgments

2024-07-29 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi Luca,
>
> without having tested your code: You're using append! wrong.
>
> From the Guile documentation: "append! is permitted, but not required, to
> modify the given lists to form its return."
> So the exclamation mark does not imply that your list gets modified
> in-place, but rather that you don't care whether or not append! changes
> your original list. So try
>
> (set! fl (append fl ...))
>
> where you could probably also use append! instead of append (I imagine it
> might be more efficient).

Most pertinent:

(append! '() ...)

cannot modify an empty list in-place because there is only one empty
list in the whole system and it is an unchangeable constant.

Indeed Guile happens to modify the given list in-place with append!
whenever it can, but it is impossible for the empty list.

-- 
David Kastrup



Re: Engravers, fingerings and acknowledgments

2024-07-29 Thread Lukas-Fabian Moser
Hi Luca,

without having tested your code: You're using append! wrong.

>From the Guile documentation: "append! is permitted, but not required, to
modify the given lists to form its return."
So the exclamation mark does not imply that your list gets modified
in-place, but rather that you don't care whether or not append! changes
your original list. So try

(set! fl (append fl ...))

where you could probably also use append! instead of append (I imagine it
might be more efficient).

Lukas

Luca Fascione  schrieb am Di., 30. Juli 2024, 04:03:

> Hi,
> I'm trying to understand a problem I'm seeing.
>
> I have this engraver that acknowledges stems and fingerings,
> this is meant to work with a before-line-breaking callback that
> repositions the fingerings.
> So I thought that I could just sit there, listen for the fingerings as
> they got to me,
> and put them into a list attached to the stem.
> Except that I only ever get only the fingering for the last note in a
> chord,
> and no evidence of the others.
> The display statements below print this:
>
> fl () - fingering (#)4
> fl () - fingering (#)2
>
> I don't understand why the fl list stays empty and what happens to all the
> other fingerings.
>
> Any help/pointers appreciated,
> Luca
>
> #(define (Guitar_fingering_engraver context)
>(let ((stem #f)
>  (fingering #f)
>  (fl '())
>  (old-fingering '()))
>  (make-engraver
>   (acknowledgers
>((finger-interface engraver grob source-engraver)
> (begin
>   (set! fingering grob)
>   (append! fl (list grob))
>   )
> )
>((stem-interface engraver grob source-engraver)
> (set! stem grob)))
>   ((process-music engraver)
>
>(if (and fingering stem)
>(begin
>(set! old-fingering (assoc-get 'fingering (ly:grob-property
> stem 'details) '()))
>(ly:grob-set-property! stem 'details
>   `((fingering . ,(append old-fingering
> (list fingering)))
>  . ,(ly:grob-property stem 'details
>)
>
>(if stem
>(begin
>(display "fl ") (display fl) (display " - fingering ")
>(display (assoc-get 'fingering (ly:grob-property stem
> 'details)))
>(if fingering
>(display (ly:grob-property fingering 'text))
>)
>(display "\n")))
>
>(set! stem #f)
>(set! fingering #f)
>(set! fl '())
>
> \layout {
>   \context {
> \Voice
> % this makes use of the New_fingering_engraver, which attaches
> fingering in the way we want
> \remove Fingering_engraver
> \consists #Guitar_fingering_engraver
>   }
> }
>
> guitar = {
> \key c \major
> \time 2/4
> \clef "violin_8"
>
> 4
> 4
> }
>
> \score {
>   \new Staff = "guitar" {
> \key c \major
> \time 2/4
> \clef "violin_8"
>
> 4
> 4
>   }
>   \layout {  }
> }
>
> --
> Luca Fascione
>
>


Engravers, fingerings and acknowledgments

2024-07-29 Thread Luca Fascione
Hi,
I'm trying to understand a problem I'm seeing.

I have this engraver that acknowledges stems and fingerings,
this is meant to work with a before-line-breaking callback that repositions
the fingerings.
So I thought that I could just sit there, listen for the fingerings as they
got to me,
and put them into a list attached to the stem.
Except that I only ever get only the fingering for the last note in a chord,
and no evidence of the others.
The display statements below print this:

fl () - fingering (#)4
fl () - fingering (#)2

I don't understand why the fl list stays empty and what happens to all the
other fingerings.

Any help/pointers appreciated,
Luca

#(define (Guitar_fingering_engraver context)
   (let ((stem #f)
 (fingering #f)
 (fl '())
 (old-fingering '()))
 (make-engraver
  (acknowledgers
   ((finger-interface engraver grob source-engraver)
(begin
  (set! fingering grob)
  (append! fl (list grob))
  )
)
   ((stem-interface engraver grob source-engraver)
(set! stem grob)))
  ((process-music engraver)

   (if (and fingering stem)
   (begin
   (set! old-fingering (assoc-get 'fingering (ly:grob-property
stem 'details) '()))
   (ly:grob-set-property! stem 'details
  `((fingering . ,(append old-fingering
(list fingering)))
 . ,(ly:grob-property stem 'details
   )

   (if stem
   (begin
   (display "fl ") (display fl) (display " - fingering ")
   (display (assoc-get 'fingering (ly:grob-property stem
'details)))
   (if fingering
   (display (ly:grob-property fingering 'text))
   )
   (display "\n")))

   (set! stem #f)
   (set! fingering #f)
   (set! fl '())

\layout {
  \context {
\Voice
% this makes use of the New_fingering_engraver, which attaches
fingering in the way we want
\remove Fingering_engraver
\consists #Guitar_fingering_engraver
  }
}

guitar = {
\key c \major
\time 2/4
\clef "violin_8"

4
4
}

\score {
  \new Staff = "guitar" {
\key c \major
\time 2/4
\clef "violin_8"

4
4
  }
  \layout {  }
}

-- 
Luca Fascione


Re: Tempo changes and spanners

2024-07-24 Thread Tom Brennan
I really appreciate your work on that! It's also a very instructive example
to emulate, I imagine.

One quick question -- is this "lattice" idea I'm doing (maintaining a
separate voice with nothing but tempo and spaces that gets munged into the
parts) a bad idea for any reason? Would I ever run into issues with
spacing/direction, possibly run out of available voices, etc.? From the
documentation about `\voices` the count appears to be open-ended and the
configuration is pretty straightforward.

Does anyone else do this? Or do most people just repeat tempo/text markings
in all of the parts?

Thanks again!
Tom

On Tue, Jul 23, 2024 at 6:32 PM Thomas Morley 
wrote:

> Am Di., 23. Juli 2024 um 23:52 Uhr schrieb Tom Brennan  >:
> >
> > Hi all
> >
> > I'm notating a sonata for a cello and piano, and I would like to produce
> three "artifacts" (products?) from this:
> >
> > 1. A solo cello part (a typical single staff representation)
> > 2. A "study score" where all staves are equivalent sizes
> > 3. An accompaniment part for the piano, where the cello is above in a
> smaller staff
> >
> > Now, the problem I'm facing is that there are plenty of "accel." and
> "rit." marks with lines/spanners that I would like to be treated like tempo
> markings, so that they are presented in the following ways:
> >
> > 1. Normally for the solo cello part
> > 2. Only above the entire system in the "study score" product
> > 3. Above both the piano and the solo part in the "accompaniment" product
> >
> > The way I have designed the music input is like:
> >
> > ```
> > lattice = { s1 \tempo "Andante" 4 = 72 | s1 }
> > cello = << \lattice \relative c { a4 b c2 | d1 } >>
> > left = << \lattice { ...some music... } >>
> > right = << \latttice { ... } >>
> > ```
> >
> > i.e., so that the tempo lives in its own spaced-out voice, which
> provides the tempo to the rest of the staves but doesn't have its own staff
> to print. This seems to work, but I'm missing some key knowledge about how
> to handle the above scenarios. In particular, I don't know how to
> >
> > 1. treat a tempo marking and/or textmark as a spanner, so that it can
> have a dotted connecting line between tempo changes
> > 2. toggle these tempo changes based on the requirements above --
> sometimes only above the whole system, sometimes above the grand staff and
> the cello part (but not the left hand)
> >
> > I haven't been able to find the right documentation for this -- it seems
> like the only way to use a spanner is within a particular staff. Perhaps my
> approach is completely wrong, and I would love to know the best approach. I
> imagine this has to be a common (and hence solved) problem.
> >
> > Thanks
> > Tom
>
> Tempo-spanners are not yet implemented.
>
> Though we have an issue for it:
> https://gitlab.com/lilypond/lilypond/-/issues/3176
> You'll find a workaround there:
> https://gitlab.com/lilypond/lilypond/-/issues/3176#note_1277019697
>
> Furthermore I tried a proper implementation, see:
> https://gitlab.com/lilypond/lilypond/-/merge_requests/2256
> Though, a problem arises as soon as the relevant engravers are moved
> around. This is unsolved...
>
> Anyway, you may use the workaround from the issue or grap the code
> from the MR, in most cases it will work.
> Though, no garantee...
>
> Cheers,
>   Harm
>


Re: Tempo changes and spanners

2024-07-23 Thread Thomas Morley
Am Di., 23. Juli 2024 um 23:52 Uhr schrieb Tom Brennan :
>
> Hi all
>
> I'm notating a sonata for a cello and piano, and I would like to produce 
> three "artifacts" (products?) from this:
>
> 1. A solo cello part (a typical single staff representation)
> 2. A "study score" where all staves are equivalent sizes
> 3. An accompaniment part for the piano, where the cello is above in a smaller 
> staff
>
> Now, the problem I'm facing is that there are plenty of "accel." and "rit." 
> marks with lines/spanners that I would like to be treated like tempo 
> markings, so that they are presented in the following ways:
>
> 1. Normally for the solo cello part
> 2. Only above the entire system in the "study score" product
> 3. Above both the piano and the solo part in the "accompaniment" product
>
> The way I have designed the music input is like:
>
> ```
> lattice = { s1 \tempo "Andante" 4 = 72 | s1 }
> cello = << \lattice \relative c { a4 b c2 | d1 } >>
> left = << \lattice { ...some music... } >>
> right = << \latttice { ... } >>
> ```
>
> i.e., so that the tempo lives in its own spaced-out voice, which provides the 
> tempo to the rest of the staves but doesn't have its own staff to print. This 
> seems to work, but I'm missing some key knowledge about how to handle the 
> above scenarios. In particular, I don't know how to
>
> 1. treat a tempo marking and/or textmark as a spanner, so that it can have a 
> dotted connecting line between tempo changes
> 2. toggle these tempo changes based on the requirements above -- sometimes 
> only above the whole system, sometimes above the grand staff and the cello 
> part (but not the left hand)
>
> I haven't been able to find the right documentation for this -- it seems like 
> the only way to use a spanner is within a particular staff. Perhaps my 
> approach is completely wrong, and I would love to know the best approach. I 
> imagine this has to be a common (and hence solved) problem.
>
> Thanks
> Tom

Tempo-spanners are not yet implemented.

Though we have an issue for it:
https://gitlab.com/lilypond/lilypond/-/issues/3176
You'll find a workaround there:
https://gitlab.com/lilypond/lilypond/-/issues/3176#note_1277019697

Furthermore I tried a proper implementation, see:
https://gitlab.com/lilypond/lilypond/-/merge_requests/2256
Though, a problem arises as soon as the relevant engravers are moved
around. This is unsolved...

Anyway, you may use the workaround from the issue or grap the code
from the MR, in most cases it will work.
Though, no garantee...

Cheers,
  Harm



Tempo changes and spanners

2024-07-23 Thread Tom Brennan
Hi all

I'm notating a sonata for a cello and piano, and I would like to produce
three "artifacts" (products?) from this:

1. A solo cello part (a typical single staff representation)
2. A "study score" where all staves are equivalent sizes
3. An accompaniment part for the piano, where the cello is above in a
smaller staff

Now, the problem I'm facing is that there are plenty of "accel." and "rit."
marks with lines/spanners that I would like to be treated like tempo
markings, so that they are presented in the following ways:

1. Normally for the solo cello part
2. Only above the entire system in the "study score" product
3. Above both the piano and the solo part in the "accompaniment" product

The way I have designed the music input is like:

```
lattice = { s1 \tempo "Andante" 4 = 72 | s1 }
cello = << \lattice \relative c { a4 b c2 | d1 } >>
left = << \lattice { ...some music... } >>
right = << \latttice { ... } >>
```

i.e., so that the tempo lives in its own spaced-out voice, which provides
the tempo to the rest of the staves but doesn't have its own staff to
print. This seems to work, but I'm missing some key knowledge about how to
handle the above scenarios. In particular, I don't know how to

1. treat a tempo marking and/or textmark as a spanner, so that it can have
a dotted connecting line between tempo changes
2. toggle these tempo changes based on the requirements above -- sometimes
only above the whole system, sometimes above the grand staff and the cello
part (but not the left hand)

I haven't been able to find the right documentation for this -- it seems
like the only way to use a spanner is within a particular staff. Perhaps my
approach is completely wrong, and I would love to know the best approach. I
imagine this has to be a common (and hence solved) problem.

Thanks
Tom


Re: Matching Lilypond and Word font sizes

2024-07-15 Thread Xavier Scheuer
On Mon, 15 Jul 2024 at 09:18, Werner LEMBERG  wrote:
>
> If you use `\abs-fontsize`, you get a font size (in markups) in points
> regardless of the selected staff size.

Hello,

And the default text font size is 11pt for a default staff size (20pt), as
documented by Werner in NR 1.8.2
https://lilypond.org/doc/v2.25/Documentation/notation/selecting-font-and-font-size

Kind regards,
Xavier


Re: Matching Lilypond and Word font sizes

2024-07-15 Thread Werner LEMBERG


>  Tell me where you can find out or see how the font sizes in
>  lilypond and Word correspond.  For example, \SetFontSize = #1,

What is `\SetFontSize`?

>  \abs-font size #1, how do they match the font size in Word?

If you use `\abs-fontsize`, you get a font size (in markups) in points
regardless of the selected staff size.  For more information you might
read

  
https://lilypond.org/doc/v2.24/Documentation/notation/distances-and-measurements


Werner



Matching Lilypond and Word font sizes

2024-07-14 Thread Виноградов Юрий
Hello. Tell me where you can find out or see how the font sizes in lilypond and Word correspond.For example, \SetFontSize = #1, \abs-font size #1, how do they match the font size in Word? Please help me.С уважением,Виноградов Юрий.



Thoughts on Emacs LilyPond-mode, templates and Lyqi

2024-07-13 Thread Laurie Savage
Hi,

I've been playing with Emacs for editing Lilypond files, and while it isn't
Frescobaldi I'm starting to enjoy using it. After all, George R R Martin
wrote Game of Thrones on Wordstar because he was comfortable with the
keystrokes.

*Templates*: I have found a very good resource at
https://github.com/sshelagh/lilypond-templates, when loaded they provide a
comprehensive menu of templates and tags (sreenshot attached).

*Lyqi*: I can't get the quick-insert feature (C-c q) to work, because I
can't install lyqi. The package is about 20 years old and its Make file
doesn't seem to play nicely with my system although eieio is installed and
running on Emacs. I have tried piping make lyqi.elc's output but only get
line one. The errors start with line 28 of lyqi.el and continue for almost
every line. They range from warnings about deprecated functions to
undefined functions, obsolete functions and docstrings too wide. I didn't
think Warnings were necessarily fatal in Emacs libraries but I can't get
this one to work despite studying the README carefully and checking all the
load paths etc.

Emacs: GNU Emacs 29.4 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.42, cairo version 1.18.0) of 2024-06-24
OS: Fedora Linux 40 (Workstation Edition)

[image: Screenshot from 2024-07-14 10-27-39.png]

Laurie Savage
The Queens @ Port Fairy 2024: https://www.facebook.com/QueensOfTheWest
https://www.queensofthewest.com/


Re: Song: multiple verses and refrain

2024-07-10 Thread David Wright
On Wed 10 Jul 2024 at 08:46:56 (+0200), Hans Aikema wrote:
> > On 10 Jul 2024, at 06:14, David Wright wrote:
> > On Mon 08 Jul 2024 at 22:48:00 (+0100), Raphael Mankin wrote:
> >> That is great, thanks. I have not yet got my head around context
> >> naming. Clearly I shall have to do  some more reading.
> > 
> > But you need to revisit how you've structured the lyrics in your
> > example. You've written it as though the three verses should be
> > sung simultaneously (within << >>) each time the music is repeated.
> > 
> How is that at its root different for your Deck?

Look at the position of the << >> for a start. In Deck, taking a
single verse of lyrics, the simultaneity is between the lyrics
and the upper voices (Staff << >>), and hence with the lower
voices (ChoirStaff << >>). Music + words makes a "song".

> There it is just a bit less visible as the parallelism is coded at the level 
> of the staff

That says the same thing.

> which is a bit further away from the lyrics definitions.

You mean the text of the source? Well, there's more "stuff"
in my example than in the OP's MWE.

> Your texti, textii and textiii are according to the syntax also to be sung 
> simultaneously.

The syntax may look slightly similar, but the semantics is very
different. The convention for writing the score of a strophic song
is to place the verses under the music, and typically, no repeat
indication is given in the music, as it's not required.

The OP has written the three verses as simultaneous only with
themselves, and then indicated that the group should be sung three
times with \repeat volta 3.

If it's still not clear to you, take a look at what happens when
you unfold all that stucture (attached). All I did was to replace
the \score { by \score { \unfoldRepeats (and fiddle the paper to
avoid a linebreak).

If you apply \unfoldRepeats to /my/ example, nothing happens, as the
score has no repeat structure. You could add a 3× repeat to the music,
unfold it, and it would still make sense, but you can't do that to the
lyrics because, of course, they /don't/ repeat. You have to serialise
them by hand, again as Christopher already pointed out.

Even when the lyrics and music /do/ repeat together, as a unit,
expressing that in LP source code is tedious in the extreme if you
want to be able to use the same code for folded and unfolded
representations: it requires explicit lyric and \skip durations,
and \set associatedVoice. LP really isn't designed for it.

BTW I included my example not so much for the overall structure,
which is what I habitually use, but to illustrate the verse/chorus
interface treatment, choosing the appropriate verse for alignment.

Cheers,
David.


mwe-unfolded.pdf
Description: Adobe PDF document


Re: Song: multiple verses and refrain

2024-07-09 Thread Raphael Mankin




On 10/07/2024 07:46, Hans Aikema wrote:




On 10 Jul 2024, at 06:14, David Wright  wrote:

On Mon 08 Jul 2024 at 22:48:00 (+0100), Raphael Mankin wrote:

That is great, thanks. I have not yet got my head around context
naming. Clearly I shall have to do  some more reading.


But you need to revisit how you've structured the lyrics in your
example. You've written it as though the three verses should be
sung simultaneously (within << >>) each time the music is repeated.


How is that at its root different for your Deck? There it is just a bit less 
visible as the parallelism is coded at the level of the staff which is a bit 
further away from the lyrics definitions.
Your texti, textii and textiii are according to the syntax also to be sung 
simultaneously.



I agree that different structuring would probably make the problem go 
away. I am still learning my way around Lilypond; my programming skill 
are only partially transferable.


Usually I am only typing up a lead sheet, so everything fits on  one 
page. My accompanist generally has the full score, but the print is a 
bit small for me and it has page turns. When accompanying myself I 
frequently use the lead sheet and play simplified chords.


I also transcribe songs where no printed version exists, at least that I 
can find.




Re: Song: multiple verses and refrain

2024-07-09 Thread Hans Aikema



> On 10 Jul 2024, at 06:14, David Wright  wrote:
> 
> On Mon 08 Jul 2024 at 22:48:00 (+0100), Raphael Mankin wrote:
>> That is great, thanks. I have not yet got my head around context
>> naming. Clearly I shall have to do  some more reading.
> 
> But you need to revisit how you've structured the lyrics in your
> example. You've written it as though the three verses should be
> sung simultaneously (within << >>) each time the music is repeated.
> 
How is that at its root different for your Deck? There it is just a bit less 
visible as the parallelism is coded at the level of the staff which is a bit 
further away from the lyrics definitions.
Your texti, textii and textiii are according to the syntax also to be sung 
simultaneously.






Re: Song: multiple verses and refrain

2024-07-09 Thread David Wright
On Mon 08 Jul 2024 at 22:48:00 (+0100), Raphael Mankin wrote:
> That is great, thanks. I have not yet got my head around context
> naming. Clearly I shall have to do  some more reading.

I didn't find the context method any clearer than Christopher's
method, which should actually work. (Personally, placing lyrics
in the MIDI file is not something I ever do.)

But you need to revisit how you've structured the lyrics in your
example. You've written it as though the three verses should be
sung simultaneously (within << >>) each time the music is repeated.

With real music, as opposed to MWEs, your "extra line" problem
usually goes away by arranging that the verse/chorus interface
occurs across a linebreak. For example, if you were setting the
Satie on four pages rather than the published six, pages 1 & 2
would have one line of lyrics, and pages 3/5 & 4/6 would have
two lines of lyrics — no problem.

But taking a counterexample, like Deck the Hall, where the refrains
are in the same system as the verse, and the music is SATB rather
than solo, I would by default set the refrain lyrics on the middle
verse's line (or the one above the middle when an even number). As
you can see in the cut-down attachment, I also use the flexibility
of writing the lyrics where I want them to appear to suit the
music that they're set to.

Cheers,
David.
\version "2.24.0"
\language english
\header { tagline = ##f }
#(set-global-staff-size 18)
\paper {
  #(set-paper-size "a5")
}

global = {
  \key f \major
  \time 4/4
  s1 * 3 \break
  s1 * 3 \break
  s1 * 3 \break
  s1 * 3
  \bar "|."
}

align = \relative {
  c1
  g8 a bf g a4. g8
  f4 e f2
  c'1
  g8 a bf g a4. g8
  f4 e f2
  g1
  a8 b c4 d8 e f4
  e4 d c2
  c1
  d'8 d d d \set melismaBusyProperties = #'() c~c~c bf8
  a4 g f2
}

soprano = \relative {
  c''1
  g8 a bf g a4. g8
  f4 e f2
  c'1
  g8 a bf g a4. g8
  f4 e f2
  g1
  a8 b c4 d8 e f4
  e4 d c2
  c1
  d8 d d d c4. bf8
  a4 g f2
}

alto = \relative {
  a'1
  e8 f g e f4. d8
  c4 c c2
  a'1
  e8 f g e f4. d8
  c4 c c2
  e1
  f4 g a a
  g4 f e2
  a1
  f8 f f f a4. g8
  f4 e f2
}

tenor = \relative {
  c'1
  c8 c c c c4. bf8
  a4 g a2
  c1
  c8 c c c c4. bf8
  a4 g a2
  c1
  c4 c c c
  c4 b c2
  c1
  bf8 bf bf bf a bf c d
  c4 bf a2
}

bass = \relative {
  f1
  c8 c c c f4. bf,8
  c4 c f2
  f1
  c8 c c c f4. bf,8
  c4 c f2
  c1
  f4 e f d
  g4 g c,2
  f1
  bf,8 c d e f g a bf
  c4 c, f2
}

texti = \lyricmode {
  \set stanza = "1. "
  Deck… "" \repeat unfold 8 _
  ’Tis… "" \repeat unfold 8 _
  Don… Fa la la la la la la la la.
  Troll… Fa la la la la "" "" la la la la.
}

textii = \lyricmode {
  \set stanza = "2. "
  See… Fa la la la la la la la la.
  Strike… Fa la la la la la la la la.
  Fol- "" \repeat unfold 8 _
  While… ""
}

textiii = \lyricmode {
  \set stanza = "3. "
  Fast… "" \repeat unfold 8 _
  Hail… "" \repeat unfold 8 _
  Sing… Fa "" la la "" la la la la.
  Heed- Fa la la la la la la la la la la.
}

\score {
  \new ChoirStaff <<
\new Staff <<
  \clef treble \global
  \new NullVoice = valign { \voiceOne \align }
  \new Lyrics \lyricsto valign { \texti }
  \new Lyrics \lyricsto valign { \textii }
  \new Lyrics \lyricsto valign { \textiii }
  \new Voice { \voiceOne \soprano }
  \new Voice { \voiceTwo \alto }
>>
\new Staff <<
  \clef bass \global
  \new Voice { \voiceOne \tenor }
  \new Voice { \voiceTwo \bass }
>>
  >>
  \layout {
indent = 0
\context {
  \Score
  \omit BarNumber
  \autoBeamOff
}
\context {
  \Staff
  \omit TimeSignature
}
  }
}


Re: French lyrics and accented characters

2024-07-09 Thread David Wright
On Thu 04 Jul 2024 at 21:11:29 (+0100), Raphael Mankin wrote:
> On 04/07/2024 16:48, Jean Abou Samra wrote:
> > Le jeudi 04 juillet 2024 à 15:21 +0100, Raphael Mankin a écrit :
> > Anyhow, I persist in my opinion that facilitating the input of accented
> > characters is best done at a level different than LilyPond.
> > 
> I don't disagree with you. Using a compose  key is all very well for a
> small set, but the memory load of remembering al the compose sequences
> is another matter, particularly for relatively infrequent use.

Don't try to memorise them. Rather, look at the system's default
Compose sequences, which on Debian are stored at:
  /usr/share/X11/locale/en_US.UTF-8/Compose
Search or scroll down to "agrave", where the French diacriticals
start, and notice that they're mnemonic:

  Compose ` a   makes à, as does  Compose a `

So for French, you only have to remember Compose and '`",^
and not forgetting:

  Compose a e   makes æ, and  Compose o e   makes œ.

While you get used to Compose, just guess: it usually works.
When it doesn't, you can just make up your own sequence.
And I can't imagine proofreading text full of html strings.

> The question is what is the most ergonomic way of solving the problem:
> special keyboards? Years ago I saw a typewriter with two keyboards,
> one ordinary one, and one for mathematical symbols. Nowadays we can
> have programmable keycap symbols that can change as we press
> shift/alt/compose. That may be a way to go - relatively cheap and can
> be handled at the OS level.

I can't quite see the point of having to learn another keyboard layout
just to type French. (And yet another for a song in German, really?)
Character composition is so powerful and extensible, and beyond just
languages.

Cheers,
David.



Re: French lyrics and accented characters

2024-07-09 Thread Werner LEMBERG

>> As you mention 'snippet': The right place for this is the LSR, I
>> believe.
> 
> Definitely, yes. But I don’t dislike the idea of having some more or
> less standard LSR snippets for people who want something like this.

Having a 'standard LSR snippet' is certainly a good thing since we
then can easily reference it.


Werner


Re: Song: multiple verses and refrain

2024-07-08 Thread Raphael Mankin




On 08/07/2024 22:12, Mats Bengtsson wrote:


On 2024-07-08 21:40, Raphael Mankin wrote:
An alternative to the already proposed solutions is to name the 
Lyrics context that you want to keep, and then reuse it for the refrain:


\version "2.24.3"

melody = { \relative c'
   \repeat volta 3 { a b c d e f g a }
}
verseA = \lyricmode {  This is verse one }
verseB = \lyricmode {  This is verse two }
verseC = \lyricmode {  This is verse three }
chorusWords = \lyricmode {  This is the chorus }

\score {
   \new Staff {
 \melody
 \addlyrics {
   \repeat volta 3 {
 <<
   \new Lyrics = mainlyrics \verseA
   \new Lyrics \verseB
   \new Lyrics \verseC
 >>
 \context Lyrics = mainlyrics \chorusWords
   }
 }
   }
   \layout { }
}

    /Mats



Now that is much neater, but can  it be modified for the case where 
the refrain precedes the verse, e.g. Satie's "Je Te Veux"?


Maybe these tricks should go into the docs. 


The general principle of naming and resuming contexts is described in 
https://lilypond.org/doc/v2.24/Documentation/notation/creating-and-referencing-contexts and some additional bells and whistles are brought up in https://lilypond.org/doc/v2.24/Documentation/notation/keeping-contexts-alive


Here's a modified version of the above example with the refrain coming 
before the verses.


\version "2.24.3"

melody = { \relative c'
   \repeat volta 3 { a b c d e f g a }
}
verseA = \lyricmode {  This is verse one }
verseB = \lyricmode {  This is verse two }
verseC = \lyricmode {  This is verse three }
chorusWords = \lyricmode {  This is the chorus }

\score {
   \new Staff {
     \melody
     \addlyrics {
   \new Lyrics = mainlyrics \chorusWords
   \repeat volta 3 {
     <<
   \context Lyrics = mainlyrics \verseA
   \new Lyrics \verseB
   \new Lyrics \verseC
     >>
   }
     }
   }
   \layout { }
}

    /Mats



That is great, thanks. I have not yet got my head around context naming. 
Clearly I shall have to do  some more reading.




Re: Song: multiple verses and refrain

2024-07-08 Thread Mats Bengtsson


  
  


On 2024-07-08 21:40, Raphael Mankin
  wrote:


  An alternative to
the already proposed solutions is to name the Lyrics context
that you want to keep, and then reuse it for the refrain:


\version "2.24.3"


melody = { \relative c'

   \repeat volta 3 { a b c d e f g a }

}

verseA = \lyricmode {  This is verse one }

verseB = \lyricmode {  This is verse two }

verseC = \lyricmode {  This is verse three }

chorusWords = \lyricmode {  This is the chorus }


\score {

   \new Staff {

 \melody

 \addlyrics {

   \repeat volta 3 {

 <<

   \new Lyrics = mainlyrics \verseA

   \new Lyrics \verseB

   \new Lyrics \verseC

 >>

 \context Lyrics = mainlyrics \chorusWords

   }

 }

   }

   \layout { }

}


    /Mats


  
  
  Now that is much neater, but can  it be modified for the case
  where the refrain precedes the verse, e.g. Satie's "Je Te Veux"?
  
  
  Maybe these tricks should go into the docs.
    
The general principle of naming and resuming contexts is
  described in
https://lilypond.org/doc/v2.24/Documentation/notation/creating-and-referencing-contexts
  and some additional bells and whistles are brought up in
https://lilypond.org/doc/v2.24/Documentation/notation/keeping-contexts-alive

Here's a modified version of the above example with the refrain
  coming before the verses.
\version "2.24.3"
  
  melody = { \relative c'
    \repeat volta 3 { a b c d e f g a }
  }
  verseA = \lyricmode {  This is verse one }
  verseB = \lyricmode {  This is verse two }
  verseC = \lyricmode {  This is verse three }
  chorusWords = \lyricmode {  This is the chorus }
  
  \score {
    \new Staff {
      \melody
      \addlyrics {
    \new Lyrics = mainlyrics \chorusWords
    \repeat volta 3 {
      <<
    \context Lyrics = mainlyrics \verseA
    \new Lyrics \verseB
    \new Lyrics \verseC
      >>
    }
      }
    }
    \layout { }
  } 

   /Mats

  




Re: Song: multiple verses and refrain

2024-07-08 Thread Raphael Mankin




On 08/07/2024 19:53, Mats Bengtsson wrote:


On 2024-07-08 15:37, Raphael Mankin wrote:
I am having difficulty layout  satisfactorily a song that has 3 verses 
and a refrain. The refrain comes on a separate line from the verses. 
It looks unsightly, and wastes space on the page. Neither NR nor LM 
seem to address this case.


I attach my MWE. But here is the .ly:

<<<<<<<<<<<<<<<<<<<<
\version "2.24.3"

melody = { \relative c'
  \repeat volta 3 { a b c d e f g a }
}
verseA = \lyricmode {  This is verse one }
verseB = \lyricmode {  This is verse two }
verseC = \lyricmode {  This is verse three }
chorusWords = \lyricmode {  This is the chorus }

\score {
  \new Staff {
    \melody
    \addlyrics {
  \repeat volta 3 {
    <<
  \new Lyrics \verseA
  \new Lyrics \verseB
  \new Lyrics \verseC
    >>
    \new Lyrics \chorusWords
  }
    }
  }
  \layout { }
}
>>>>>>>>>>>>>>>>>>>


An alternative to the already proposed solutions is to name the Lyrics 
context that you want to keep, and then reuse it for the refrain:


\version "2.24.3"

melody = { \relative c'
   \repeat volta 3 { a b c d e f g a }
}
verseA = \lyricmode {  This is verse one }
verseB = \lyricmode {  This is verse two }
verseC = \lyricmode {  This is verse three }
chorusWords = \lyricmode {  This is the chorus }

\score {
   \new Staff {
     \melody
     \addlyrics {
   \repeat volta 3 {
     <<
   \new Lyrics = mainlyrics \verseA
   \new Lyrics \verseB
   \new Lyrics \verseC
     >>
     \context Lyrics = mainlyrics \chorusWords
   }
     }
   }
   \layout { }
}

    /Mats



Now that is much neater, but can  it be modified for the case where the 
refrain precedes the verse, e.g. Satie's "Je Te Veux"?


Maybe these tricks should go into the docs.



Re: Song: multiple verses and refrain

2024-07-08 Thread Mats Bengtsson


  
  


On 2024-07-08 15:37, Raphael Mankin
  wrote:

I am
  having difficulty layout  satisfactorily a song that has 3 verses
  and a refrain. The refrain comes on a separate line from the
  verses. It looks unsightly, and wastes space on the page. Neither
  NR nor LM seem to address this case.
  
  
  I attach my MWE. But here is the .ly:
  
  
<<<<<<<<<<<<<<<<<<<<
  
  \version "2.24.3"
  
  
  melody = { \relative c'
  
    \repeat volta 3 { a b c d e f g a }
  
  }
  
  verseA = \lyricmode {  This is verse one }
  
  verseB = \lyricmode {  This is verse two }
  
  verseC = \lyricmode {  This is verse three }
  
  chorusWords = \lyricmode {  This is the chorus }
  
  
  \score {
  
    \new Staff {
  
      \melody
  
      \addlyrics {
  
    \repeat volta 3 {
  
      <<
  
    \new Lyrics \verseA
  
    \new Lyrics \verseB
  
    \new Lyrics \verseC
  
      >>
  
      \new Lyrics \chorusWords
  
    }
  
      }
  
    }
  
    \layout { }
  
  }
  
>>>>>>>>>>>>>>>>>>>

An alternative to the already proposed solutions is to name the
  Lyrics context that you want to keep, and then reuse it for the
  refrain:
\version "2.24.3"
  
  melody = { \relative c'
    \repeat volta 3 { a b c d e f g a }
  }
  verseA = \lyricmode {  This is verse one }
  verseB = \lyricmode {  This is verse two }
  verseC = \lyricmode {  This is verse three }
  chorusWords = \lyricmode {  This is the chorus }
  
  \score {
    \new Staff {
      \melody
      \addlyrics {
    \repeat volta 3 {
      <<
    \new Lyrics = mainlyrics \verseA
    \new Lyrics \verseB
    \new Lyrics \verseC
      >>
      \context Lyrics = mainlyrics \chorusWords
    }
      }
    }
    \layout { }
  } 

   /Mats

  




Re: Song: multiple verses and refrain

2024-07-08 Thread Henning Hraban Ramm

Am 08.07.24 um 15:51 schrieb Raphael Mankin:
Yes, that works, thank you. Not as elegant a solution as I would like, 
in that it mixes verse with refrain, but it works.


You can use
\set stanza = "1. "
at the beginning of the lyrics, and for the chorus either the same or 
something like ^\markup{Chorus} within the notes.



Hraban




Re: Song: multiple verses and refrain

2024-07-08 Thread Raphael Mankin
Yes, that works, thank you. Not as elegant a solution as I would like, 
in that it mixes verse with refrain, but it works.


On 08/07/2024 14:46, Christopher R. Maden wrote:

On 7/8/24 09:37, Raphael Mankin wrote:
I am having difficulty layout  satisfactorily a song that has 3 verses 
and a refrain. The refrain comes on a separate line from the verses. 
It looks unsightly, and wastes space on the page. Neither NR nor LM 
seem to address this case.


I don’t remember where in the docs (or elsewhere) I got this, but I 
always do:


     \new Lyrics \lyricsto "melody" {
   \verseOne
   \chorus
     }
     \new Lyrics \lyricsto "melody" {
   \verseTwo
     }
     \new Lyrics \lyricsto "melody" {
   \verseThree
     }

That way the chorus follows on the same line as verse 1.

You can’t just unfold this... but I typically have enough other 
variations between print and MIDI that I put the lyrics together by hand 
for that:


     \new Lyrics \lyricsto "melody" {
   \verseOne
   \chorus
   \verseTwo
   \chorus
   \verseThree
   \chorus
     }

~crism


--
https://saturday-october-seven.com/



  1   2   3   4   5   6   7   8   9   10   >