Re: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Richard Shann
On Fri, 2024-05-03 at 18:01 +0200, Hans Aikema wrote:
> 
> 
> > On 3 May 2024, at 15:34, Richard Shann 
> > wrote:
> > 
> > On Fri, 2024-05-03 at 09:25 -0400, Kieren MacMillan wrote:
> > > Hi Richard,
> > > 
> > > > > is there a reason you don't use \repeat percent in the first
> > > > > place ?
> > > > It's easier for users of Denemo to have a single piece of
> > > > LilyPond
> > > > syntax at the place they want to see the "%"
> > > 
> > > How is this
> > > 
> > >   \repeat percent 2 { c c c c }
> > > 
> > > not “a single piece of Lilypond syntax at the place they want to
> > > tsee
> > > the "%"?
> > 
> > The user sees "\repeat percent 2" then the notes c c c c and then a
> > "}"
> > - something before the notes and something after, "after" being
> > where
> > they get the "%" appearing in the typeset.
> > You can insert such syntax with Denemo, but most users would get
> > tripped up, they want to put in the notes then the "%" and then
> > carry
> > on with more stuff. 
> > 
> > Richard
> 
> If I were to see such a source,

you wouldn't do it if you were going to look at the "source", you would
use the nice LilyPond syntax that is for the purpose. There is nothing
to stop you doing that in Denemo. But you would have to be aware of the
"source" which most users are not.

>  with rests where notes are supposed to be I think I’d start
> screaming and shouting what kind of an idiot put a rest where there
> is music.
> 
> Apparently humans differ in there preferences

No, I think all humans would share that preference to look at clean
LilyPond if looking at LilyPond code is what they wanted to do. The
reason I got involved with Denemo is that I wanted to generate the
syntax for figured bass by playing the relevant notes, rather than
entering a string of <6 4> <5 3> codes that had to match up with the
durations of the notes written elsewhere in the file - i.e. I wanted a
quick and musical way of getting a lovely typeset. It worked - I have
about a thousand sonatas typeset to prove it.

best wishes,

Richard





Re: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Hans Aikema



> On 3 May 2024, at 15:34, Richard Shann  wrote:
> 
> On Fri, 2024-05-03 at 09:25 -0400, Kieren MacMillan wrote:
>> Hi Richard,
>> 
>>>> is there a reason you don't use \repeat percent in the first
>>>> place ?
>>> It's easier for users of Denemo to have a single piece of LilyPond
>>> syntax at the place they want to see the "%"
>> 
>> How is this
>> 
>>   \repeat percent 2 { c c c c }
>> 
>> not “a single piece of Lilypond syntax at the place they want to tsee
>> the "%"?
> 
> The user sees "\repeat percent 2" then the notes c c c c and then a "}"
> - something before the notes and something after, "after" being where
> they get the "%" appearing in the typeset.
> You can insert such syntax with Denemo, but most users would get
> tripped up, they want to put in the notes then the "%" and then carry
> on with more stuff. 
> 
> Richard

If I were to see such a source, with rests where notes are supposed to be I 
think I’d start screaming and shouting what kind of an idiot put a rest where 
there is music.

Apparently humans differ in there preferences





Re: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Richard Shann
On Fri, 2024-05-03 at 09:25 -0400, Kieren MacMillan wrote:
> Hi Richard,
> 
> > > is there a reason you don't use \repeat percent in the first
> > > place ?
> > It's easier for users of Denemo to have a single piece of LilyPond
> > syntax at the place they want to see the "%"
> 
> How is this
> 
>   \repeat percent 2 { c c c c }
> 
> not “a single piece of Lilypond syntax at the place they want to tsee
> the "%"?

The user sees "\repeat percent 2" then the notes c c c c and then a "}"
- something before the notes and something after, "after" being where
they get the "%" appearing in the typeset.
You can insert such syntax with Denemo, but most users would get
tripped up, they want to put in the notes then the "%" and then carry
on with more stuff. 

Richard


> 
> Just curious!
> 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: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Kieren MacMillan
Hi Richard,

>> is there a reason you don't use \repeat percent in the first place ?
> It's easier for users of Denemo to have a single piece of LilyPond
> syntax at the place they want to see the "%"

How is this

  \repeat percent 2 { c c c c }

not “a single piece of Lilypond syntax at the place they want to tsee the "%"?

Just curious!
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: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Richard Shann
On Fri, 2024-05-03 at 13:04 +0200, Xavier Scheuer wrote:
> On Fri, 3 May 2024 at 12:43, Richard Shann 
> wrote:
> > 
> > In earlier versions of LilyPond I avoided the use of \repeat
> > percent 2
> > {} syntax by overwriting the stencil for a whole bar rest:
> > 
> > \version "2.20.0"
> > { c c c c
> > \once \override MultiMeasureRest.stencil  = #ly:multi-measure-
> > rest::percent
> > \once \override MultiMeasureRest #'thickness = #0.48
> > R1*4/4
> > }
> > 
> > The stencil ly:multi-measure-rest::percent has gone in versin 2.24
> > and
> > I see that the symbol ly:percent-repeat-interface::percent at the
> > same
> > place in the source code. However this results in the "%" glyph not
> > being centered as was the old one:
> > 
> > \version "2.24.0"
> > { c c c c
> > \once \override MultiMeasureRest.stencil  = #ly:percent-repeat-
> > interface::percent
> > \once \override MultiMeasureRest #'thickness = #0.48
> > R1*4/4
> > }
> > 
> > Is there an easy fix - the extra-offset needed varies according to
> > the
> > width of the bar...
> 
> Hello,
> 
> Not replying to your question but is there a reason you don't use
> \repeat percent in the first place ?
It's easier for users of Denemo to have a single piece of LilyPond
syntax at the place they want to see the "%"
> And what about using "makePercent" as described in NR 1.4.2?
> 
> makePercent =
> #(define-music-function (note) (ly:music?)
>    "Make a percent repeat the same length as NOTE."
>    (make-music 'PercentEvent
>                'length (ly:music-length note)))
> 
> \relative c'' {
>   \makePercent s1
> }

That's perfect - a great improvement over the original :)
Thank you very much.
Richard

> 
> Kind regards,
> Xavier




Re: The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Xavier Scheuer
On Fri, 3 May 2024 at 12:43, Richard Shann  wrote:
>
> In earlier versions of LilyPond I avoided the use of \repeat percent 2
> {} syntax by overwriting the stencil for a whole bar rest:
>
> \version "2.20.0"
> { c c c c
> \once \override MultiMeasureRest.stencil  =
#ly:multi-measure-rest::percent
> \once \override MultiMeasureRest #'thickness = #0.48
> R1*4/4
> }
>
> The stencil ly:multi-measure-rest::percent has gone in versin 2.24 and
> I see that the symbol ly:percent-repeat-interface::percent at the same
> place in the source code. However this results in the "%" glyph not
> being centered as was the old one:
>
> \version "2.24.0"
> { c c c c
> \once \override MultiMeasureRest.stencil  =
#ly:percent-repeat-interface::percent
> \once \override MultiMeasureRest #'thickness = #0.48
> R1*4/4
> }
>
> Is there an easy fix - the extra-offset needed varies according to the
> width of the bar...

Hello,

Not replying to your question but is there a reason you don't use \repeat
percent in the first place ?
And what about using "makePercent" as described in NR 1.4.2?

makePercent =
#(define-music-function (note) (ly:music?)
   "Make a percent repeat the same length as NOTE."
   (make-music 'PercentEvent
   'length (ly:music-length note)))

\relative c'' {
  \makePercent s1
}

Kind regards,
Xavier


The demise of ly:multi-measure-rest::percent

2024-05-03 Thread Richard Shann
In earlier versions of LilyPond I avoided the use of \repeat percent 2
{} syntax by overwriting the stencil for a whole bar rest:

\version "2.20.0"
{ c c c c
\once \override MultiMeasureRest.stencil  = #ly:multi-measure-rest::percent 
\once \override MultiMeasureRest #'thickness = #0.48
R1*4/4
}

The stencil ly:multi-measure-rest::percent has gone in versin 2.24 and
I see that the symbol ly:percent-repeat-interface::percent at the same
place in the source code. However this results in the "%" glyph not
being centered as was the old one:

\version "2.24.0"
{ c c c c
\once \override MultiMeasureRest.stencil  = 
#ly:percent-repeat-interface::percent
\once \override MultiMeasureRest #'thickness = #0.48
R1*4/4
}

Is there an easy fix - the extra-offset needed varies according to the
width of the bar...

Richard Shann






Re: Fw: Compress Long Rest in Jianpu.

2024-03-24 Thread Windy Deng
Thanks a lot, it works.
And I tried to add a little bit more to the original file, now it only
compresses 3 or more measures of rests.

--- a/jianpu10a.ly
+++ b/jianpu10a.ly
@@ -87,6 +87,9 @@ jianpuMusic =
  ((or (music-is-of-type? m 'rest-event)
   (music-is-of-type? m 'multi-measure-rest))
   (let ((dur (ly:moment-main (ly:music-duration-length m
+  (if (or (music-is-of-type? m 'rest-event)
+  (and (music-is-of-type? m 'multi-measure-rest)
+   (<= dur 2)))
 (if (>= dur 1/2)
 ;; split whole and half rests into quarter notes
 (let ((q (make-music 'NoteEvent
@@ -110,7 +113,7 @@ jianpuMusic =
 (delete 'rest-event (ly:music-property m 'types))
 '(note-event melodic-event)))
  (ly:music-set-property! m 'jianpu-rest #t)
- 
+ )


Windy

Werner LEMBERG  于2024年3月24日周日 14:28写道:

>
> [Forwarding private message to have the whole conversation in the
> archive.]
>
>
>
> -- Forwarded message --
> From: Windy Deng 
> To: Werner LEMBERG 
> Cc:
> Bcc:
> Date: Sun, 24 Mar 2024 13:00:10 +0800
> Subject: Re: Compress Long Rest in Jianpu.
> Sure, it looks like this
> [image: image.png]
> and this
> [image: image.png]
>
> seems like it just copies the staff style and removes staff lines.
>
>
> Windy
>
> Werner LEMBERG  于2024年3月24日周日 01:23写道:
>
>>
>> > I want to display both staff and jianpu, but if I enable
>> > \compressMMRests function, the long rests are not compressed when
>> > engraving with jianpu.
>> >
>> > Jianpu support for Lilypond is from file jiapu10a.ly on
>> > https://github.com/nybbs2003/lilypond-Jianpu . Is there any way to
>> > patch the file or something to make it support \compressMMRests?
>> >
>> > MWE is in the attachment.
>>
>> Do you have a real-world example how compressed rests look like in
>> Jianpu notation?  I guess the author hasn't thought of that...
>>
>>
>> Werner
>>
>


Re: Compress Long Rest in Jianpu.

2024-03-24 Thread Werner LEMBERG


[Please always reply to the list!]

> Sure, it looks like this
> [image: image.png]
> and this
> [image: image.png]
> 
> seems like it just copies the staff style and removes staff lines.

OK, thanks.  The un-compression of MM rests is an intentional feature
of `jianpu10a.ly`.  You should contact the author to add a command
that switches compression of MM rests on and off.

Below is a trivial patch to enable MM compression.  Note, however,
that this also disables conversion of `R1` to '0 0 0 0', which is
probably not wanted.  In other words, I suspect that more tinkering is
necessary to get a solution that really fits current jianpu usage.


Werner


==


--- jianpu10a-old.ly2024-03-23 18:20:24.923336345 +0100
+++ jianpu10a.ly2024-03-24 07:18:42.382334806 +0100
@@ -84,8 +84,7 @@
))
 
  ;; REST AND MULTI-MEASURE REST
- ((or (music-is-of-type? m 'rest-event)
-  (music-is-of-type? m 'multi-measure-rest))
+ ((music-is-of-type? m 'rest-event)
   (let ((dur (ly:moment-main (ly:music-duration-length m
 (if (>= dur 1/2)
 ;; split whole and half rests into quarter notes



Fw: Compress Long Rest in Jianpu.

2024-03-24 Thread Werner LEMBERG

[Forwarding private message to have the whole conversation in the
archive.]
--- Begin Message ---
Sure, it looks like this
[image: image.png]
and this
[image: image.png]

seems like it just copies the staff style and removes staff lines.


Windy

Werner LEMBERG  于2024年3月24日周日 01:23写道:

>
> > I want to display both staff and jianpu, but if I enable
> > \compressMMRests function, the long rests are not compressed when
> > engraving with jianpu.
> >
> > Jianpu support for Lilypond is from file jiapu10a.ly on
> > https://github.com/nybbs2003/lilypond-Jianpu . Is there any way to
> > patch the file or something to make it support \compressMMRests?
> >
> > MWE is in the attachment.
>
> Do you have a real-world example how compressed rests look like in
> Jianpu notation?  I guess the author hasn't thought of that...
>
>
> Werner
>
--- End Message ---


Re: Compress Long Rest in Jianpu.

2024-03-23 Thread Werner LEMBERG


> I want to display both staff and jianpu, but if I enable
> \compressMMRests function, the long rests are not compressed when
> engraving with jianpu.
> 
> Jianpu support for Lilypond is from file jiapu10a.ly on
> https://github.com/nybbs2003/lilypond-Jianpu . Is there any way to
> patch the file or something to make it support \compressMMRests?
> 
> MWE is in the attachment.

Do you have a real-world example how compressed rests look like in
Jianpu notation?  I guess the author hasn't thought of that...


Werner



Compress Long Rest in Jianpu.

2024-03-23 Thread Windy Deng
Greetings Lilypond users:

I want to display both staff and jianpu, but if I enable
\compressMMRests function,
the long rests are not compressed when engraving with jianpu.

Jianpu support for Lilypond is from file jiapu10a.ly on
https://github.com/nybbs2003/lilypond-Jianpu . Is there any way to patch
the file or something to make it support \compressMMRests?

MWE is in the attachment.

Sincerely,
Windy


test.ly
Description: Binary data


Re: Rest space in between fugue's voices

2024-02-10 Thread David Kastrup
Kieren MacMillan  writes:

> Hi George,
>
> [n.b. I’ve cc'ed the list, as per standard practice in the Lilypond 
> community.]
>
>> Thank you very much! It worked perfectly just by inserting "\tweak
>> X-offset #1" before the 16th rest in my original code
>
> Oh, great! I didn’t think to try only that tweak.
>
>> I didn't quite understand the reasons for changing \voiceFour and \voiceOne 
>> in the tenor part
>
> Lilypond’s \voiceX commands automatically set a lot of parameters
> (default stem/tie/slur direction, etc.) according to where the voice
> “sits” on the staff; the odd-numbered voices (\voiceOne, \voiceThree,
> etc.) act as if they are “on top” (so stems/ties/slurs go up), while
> even-numbered voices (\voiceTwo, \voiceFour, etc.) act as if they are
> “underneath” (stems/ties/slurs down, etc.).
>
> When the tenor voice is in the lower staff, it is on top, so \voiceOne
> makes the most sense (because there are only two voices); when it
> moves to the upper staff, it is (at least in your example) on the
> bottom, so \voiceFour makes the most sense (because \voiceTwo is
> already taken by the alto).

\voiceTwo is for the outermost low voice, so the alto may be better off
\voiceFour ?

-- 
David Kastrup



Re: Rest space in between fugue's voices

2024-02-10 Thread Kieren MacMillan
Hi George,

[n.b. I’ve cc'ed the list, as per standard practice in the Lilypond community.]

> Thank you very much! It worked perfectly just by inserting "\tweak X-offset 
> #1" before the 16th rest in my original code

Oh, great! I didn’t think to try only that tweak.

> I didn't quite understand the reasons for changing \voiceFour and \voiceOne 
> in the tenor part

Lilypond’s \voiceX commands automatically set a lot of parameters (default 
stem/tie/slur direction, etc.) according to where the voice “sits” on the 
staff; the odd-numbered voices (\voiceOne, \voiceThree, etc.) act as if they 
are “on top” (so stems/ties/slurs go up), while even-numbered voices 
(\voiceTwo, \voiceFour, etc.) act as if they are “underneath” (stems/ties/slurs 
down, etc.).

When the tenor voice is in the lower staff, it is on top, so \voiceOne makes 
the most sense (because there are only two voices); when it moves to the upper 
staff, it is (at least in your example) on the bottom, so \voiceFour makes the 
most sense (because \voiceTwo is already taken by the alto).

> why was the use of  " \tweak staff-position -4" necessary.

I tried that first to force the rest into the right vertical position; then I 
tweaked the X-offset to move it horizontally. I didn’t realize that if I had 
just done the X-offset *first*, Lilypond would Do The Right Thing™ (well, of 
*course* it does!), and so the staff-position tweak was ultimately unnecessary.

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: Rest space in between fugue's voices

2024-02-10 Thread Kieren MacMillan
Hi George,

> Currently, I am transcribing Bach's Fantasia and Fugue in a minor (BWV 904), 
> but I am dealing with a rest collision between the fugue voices on measure 
> 69. Specifically, on the 4th beat I have not found a way to give distance 
> between the a' from the alto and the 16th rest from the tenor.

How about:

tenor = \relative d' {
  \override NoteHead.color = #red \override Stem.color = #red \override 
Beam.color = #red \override Rest.color = #red
  \change Staff = "up"
  \voiceFour
  d8 e f d a'4 r8 d, |
  bes'4 r8 d, a'4 \tweak staff-position -4 \tweak X-offset #1 r16 g f e   |
  d e f d 
}

In general, I tend to trust Lilypond’s \voiceX commands and tweak anything that 
doesn’t work as hoped/expected, rather than manually overriding stem and tie 
directions and so on. (Obviously, when the tenor returns to the lower staff, 
you’d want to issue a \voiceOne command!)

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.




Rest space in between fugue's voices

2024-02-10 Thread George
Hi everyone,

Currently, I am transcribing Bach's *Fantasia and Fugue in a minor* (BWV
904), but I am dealing with a rest collision between the fugue voices on
measure 69. Specifically, on the 4th beat I have not found a way to give
distance between the *a'* from the alto and the 16th rest from the tenor. I
have tried to override it using *NoteColumn.force-hshift* but it doesn't
move the *a**'* in the alto to the left at all or the rest in the tenor to
the right (or its subsequent 16th notes). The best I have done is using*
Rest.extra-offset = #'(0.5 . -1)* on the tenor, but it really does not give
a satisfactory space between the voices, and the subsequent 16th notes in
the tenor remain still.  Here it is a picture from the original source and
how it should look:
[image: bar 69.png]
and this is how it looks on lilypond without any modification:

[image: bfar 69 lily.png]

And here I include an excerpt from my code (I colored the voices for an
easier view):
_
\version "2.24.3"


global = { \time 4/4 \key a \minor }


soprano = \relative f'' {
  \voiceOne

\override NoteColumn.force-hshift = #-1 \shape #'((0 . 2) (0 . 2.5) (0 .
2.5) (0 . 2)) Tie  \override Beam.color = #darkgreen \override
NoteHead.color = #darkgreen \override Stem.color = #darkgreen
f4~ 16 a g f  e4 f |
\shape #'((0 . 2) (0 . 2.5) (0 . 2.5) (0.8 . 2)) Tie g~
\once \override Dots.extra-offset = #'(-1.3 . 0)
g8. f16 \revert NoteColumn.force-hshift  e4 r4 |
s4
}

alto = \relative e'' {
  \voiceTwo

\stemUp \tieDown \override NoteHead.color = #blue \override Stem.color =
#blue \override Beam.color = #blue
e16 e d cis d4~ 16 b cis! e~ 16 cis d f~ |
16 d e cis a cis d8 \stemDown \once \override Beam.positions = #'(-3 .
-3.5) e16 d cis b! \tieUp  a4~  |
a4
}


tenor = \relative d' {
  \voiceOne

\change Staff = "up" \stemDown \tieDown \override NoteHead.color = #red
\override Stem.color = #red \override Beam.color = #red \override
Rest.color = #red
d8 e f d a'4 b,8\rest d |
bes'4 b,8\rest d  \once \override NoteColumn.force-hshift = #0.4 a'4
e16\rest g f e   |
\stemUp \tieUp d e f d
}

bass = \relative d {
  \voiceTwo

d8 r r4 r2 |
r4 d cis c! |
b
}

\score {
  \new PianoStaff <<

\new Staff = "up" <<
  \global
  \clef "treble"
  \new Voice = "soprano" { \soprano }
  \new Voice = "alto" { \alto }
>>

\new Staff = "down" <<
  \global
  \clef "bass"
  \new Voice = "tenor" { \tenor }
  \new Voice = "bass" { \bass }
>>

  >>

  \layout {
\context {
  \Score
  \override SpacingSpanner.common-shortest-duration = #(ly:make-moment
1/8 )
}
  }
}

Any suggestions please? Thanks in advance


Re: Grandstaff multi-bar rest count shared between staves

2024-01-16 Thread Vaughan McAlley
On Wed, 17 Jan 2024 at 15:42, Martin Brown  wrote:

> To answer my own question, I've fudged this with:
> \omit MultiMeasureRestNumber at the start of the bass line
> \override MultiMeasureRestNumber.Y-offset = -5 at the start of the
> treble line
> but that seems a bit fragile. Eg. if the staves need to be separated more.
> Any other solutions?
>
> Cheers,
> Martin
>
> On Tue, 16 Jan 2024 at 14:05, Martin Brown 
> wrote:
>
>> Where two-stave scores (eg. piano) have multiple bars rest in common
>> between the treble and bass parts, the number of bars rest should be placed
>> once, in between the two staves, not separately on each stave. How can I
>> achieve this in Lilypond? By default, it seems to treat each stave's rest
>> count separately, placing the number above the multi-bar rest symbol on
>> each stave.
>>
>> Thanks,
>> Martin
>>
>
I’ve managed to move the multimeasure rest numbers into the PianoStaff
context with this code. Next (too hard for me) would be:
- place the transparent MMrest in the center of the whole PianoStaff
- place the MMrest number on top of this MMrest

\version "2.24.2"

\score {
  \new PianoStaff <<
\new Staff \compressMMRests {
  c''1
  R1*5
  g1
  f1
}
\new Staff \compressMMRests {
  \clef bass
  c1
  R1*5
  c'1
  d'1
}
  >>
  \layout {
\context {
  \Voice
  \override MultiMeasureRestNumber.transparent = ##t
  \override MultiMeasureRest.transparent = ##f
  \override MultiMeasureRest.direction = #CENTER
}
\context {
  \PianoStaff
  \consists Multi_measure_rest_engraver
  \override MultiMeasureRest.transparent = ##t % comment this out to
place MM rests
  \override MultiMeasureRestNumber.parent-alignment-Y = #CENTER % this
is not the solution
}
  }
}

%% Vaughan


Re: Grandstaff multi-bar rest count shared between staves

2024-01-16 Thread mskala
On Wed, 17 Jan 2024, Martin Brown wrote:

> To answer my own question, I've fudged this with:
>     \omit MultiMeasureRestNumber at the start of the bass line
>     \override MultiMeasureRestNumber.Y-offset = -5 at the start of the
> treble line
> but that seems a bit fragile. Eg. if the staves need to be separated more.
> Any other solutions?

Although still not a perfect solution, you may be able to make it less
fragile by putting a Dynamics context between the two staves, adding the
multi-measure rest engraver to that, and then hiding the actual rests
there, to only show the numbers.  I still have to add an offset adjustment
to make this look decent, but I think the offset adjustment shouldn't
change with the height of the things in the staves.  The height of other
things in the Dynamics context, if any, will be less variable.

There are probably more elegant ways to do the overriding, such as
defining a new context just for this purpose instead of modifying
"Dynamics."  But this is what I got from a quick experiment.

\new PianoStaff <<
  \new Staff {
\omit MultiMeasureRestNumber
\clef treble
\compressMMRests { 1 | R1*10 | 1 | }
  }
  \new Dynamics {
\hide MultiMeasureRest
\override MultiMeasureRestNumber.Y-offset = -1
\compressMMRests { s1 | R1*10 | s1 | }
  }
  \new Staff {
\omit MultiMeasureRestNumber
\clef bass
\compressMMRests { g1 | R1*10 | g1 | }
  }
>>

\layout {
  \context { \Dynamics \consists Multi_measure_rest_engraver }
}


-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/

Re: Grandstaff multi-bar rest count shared between staves

2024-01-16 Thread Martin Brown
To answer my own question, I've fudged this with:
\omit MultiMeasureRestNumber at the start of the bass line
\override MultiMeasureRestNumber.Y-offset = -5 at the start of the
treble line
but that seems a bit fragile. Eg. if the staves need to be separated more.
Any other solutions?

Cheers,
Martin

On Tue, 16 Jan 2024 at 14:05, Martin Brown  wrote:

> Where two-stave scores (eg. piano) have multiple bars rest in common
> between the treble and bass parts, the number of bars rest should be placed
> once, in between the two staves, not separately on each stave. How can I
> achieve this in Lilypond? By default, it seems to treat each stave's rest
> count separately, placing the number above the multi-bar rest symbol on
> each stave.
>
> Thanks,
> Martin
>


Grandstaff multi-bar rest count shared between staves

2024-01-15 Thread Martin Brown
Where two-stave scores (eg. piano) have multiple bars rest in common
between the treble and bass parts, the number of bars rest should be placed
once, in between the two staves, not separately on each stave. How can I
achieve this in Lilypond? By default, it seems to treat each stave's rest
count separately, placing the number above the multi-bar rest symbol on
each stave.

Thanks,
Martin


Re: Auto-bar number after multi-measure rest

2023-11-20 Thread Adam M. Griggs
That's quite a snippet. Thank you. I'll try it out.

On Tue, 21 Nov 2023, 01:19 Pierre-Luc Gauthier, 
wrote:

> I've been using this snippet for quite a few years now :
>
> I'm not even sure to whom I stole that.
>
> HTH
>
> \version "2.25.8"
>
> %% define the custom context-property `printMmrRange'
> #(define (define-translator-property symbol type? description)
>(if (not (and (symbol? symbol)
>  (procedure? type?)
>  (string? description)))
>(ly:error "error in call of define-translator-property"))
>(if (not (equal? (object-property symbol 'translation-doc) #f))
>(ly:error (G_ "symbol ~S redefined") symbol))
>
>(set-object-property! symbol 'translation-type? type?)
>(set-object-property! symbol 'translation-doc description)
>symbol)
>
> #(for-each
>   (lambda (x)
> (apply define-translator-property x))
>   `((printMmrRange
>  ,boolean?
>  "Print range of a MultiMeasureRest")))
>
> %% define how to format `start' and `stop'
> %% for `MultiMeasureRestNumber' in the engraver
> %% TODO find a method to set the values for `translate-scaled'
> formatMMRNumber =
> #(define-scheme-function (start stop)(integer? integer?)
>#{
>  \markup
>  \center-column {
>#(number->string (- stop start))
>%% value found by try and error
>\translate-scaled #'(0 . -6.5)
>\with-dimensions #empty-interval #empty-interval
>\halign #CENTER
>\normal-text
>\fontsize #-2
>\line {
>  \concat {
>"("
>#(number->string start)
>".."
>#(number->string (1- stop))
>")"
>  }
>}
>  }
>#})
>
> #(define (mmr-range-engraver context)
>"Print the range of a @code{MultiMeasureRest}, if the context-property
> @code{printMmrRange} is set @code{#t}."
>(let ((print-mmr-nmbr-list '())
>  (mmr-bar-numbr-list '()))
>
>  `((acknowledgers
> (multi-measure-interface
>  .
>  ,(lambda (engraver grob source-engraver)
> (if (eq? (grob::name grob) 'MultiMeasureRestNumber)
> (set! print-mmr-nmbr-list
>   (cons
>(cons
> grob
> (ly:context-property context 'printMmrRange #f))
>print-mmr-nmbr-list)))
> (if (eq? (grob::name grob) 'MultiMeasureRest)
> (begin
>  (set! mmr-bar-numbr-list
>(cons
> (cons
>  grob
>  (ly:context-property context 'currentBarNumber))
> mmr-bar-numbr-list)))
>(finalize
> .
> ,(lambda (trans)
>(for-each
> (lambda (mmr mmr-nmbr)
>   (let ((measure-count (ly:grob-property (car mmr)
> 'measure-count)))
> (if (and (cdr mmr-nmbr) (> measure-count 1))
> (ly:grob-set-property! (car mmr-nmbr) 'text
>   (formatMMRNumber
>(cdr mmr)
>(+ measure-count (cdr mmr)))
> mmr-bar-numbr-list
> print-mmr-nmbr-list)
>(set! print-mmr-nmbr-list '())
>(set! mmr-bar-numbr-list '()))
>
> %%
> %% EXAMPLES
> %%
>
> \layout {
>   \context {
> \Voice
> \consists #mmr-range-engraver
> printMmrRange = ##t
>   }
> }
>
> music = \relative c' {
>   c4 d e f
> }
>
> flute = \new Staff \with {
>   instrumentName = "flute"
> }{
>   \music
>   \compressEmptyMeasures
>   R1*4
>   \music
>   R1*13
>   \music
> }
> oboe = \new Staff \with {
>   instrumentName = "oboe"
> }{
>   \music
>   \compressEmptyMeasures
>   \repeat unfold 4 {
> \music
>   }
>   \music
>   R1*13
>   \music
> }
>
> \score {
>   <<
> \flute
> \oboe
>   >>
>   \layout {}
> }
>
> \score {
>   \flute
>   \layout {}
> }
> \score {
>   \oboe
>   \layout {}
> }
>
> Le dim. 19 nov. 2023, à 23 h 15, Adam M. Griggs
>  a écrit :
> >
> > Hello again list,
> >
> > Is it possible to configure the bar number engraver so that in addition
> to its regular behaviour, whatever that may be defined as*, it will also
> print a bar number after a multi-measure rest?
> >
> > Thank you.
> >
> >
> > * I usually go with
> > \set Score.barNumberVisibility = #(modulo-bar-number-visible 4 1)
> > because I detest counting bars up from the start of the system.
> >
>
>
> --
> Pierre-Luc Gauthier
>


Re: Auto-bar number after multi-measure rest

2023-11-20 Thread Pierre-Luc Gauthier
I've been using this snippet for quite a few years now :

I'm not even sure to whom I stole that.

HTH

\version "2.25.8"

%% define the custom context-property `printMmrRange'
#(define (define-translator-property symbol type? description)
   (if (not (and (symbol? symbol)
 (procedure? type?)
 (string? description)))
   (ly:error "error in call of define-translator-property"))
   (if (not (equal? (object-property symbol 'translation-doc) #f))
   (ly:error (G_ "symbol ~S redefined") symbol))

   (set-object-property! symbol 'translation-type? type?)
   (set-object-property! symbol 'translation-doc description)
   symbol)

#(for-each
  (lambda (x)
(apply define-translator-property x))
  `((printMmrRange
 ,boolean?
 "Print range of a MultiMeasureRest")))

%% define how to format `start' and `stop'
%% for `MultiMeasureRestNumber' in the engraver
%% TODO find a method to set the values for `translate-scaled'
formatMMRNumber =
#(define-scheme-function (start stop)(integer? integer?)
   #{
 \markup
 \center-column {
   #(number->string (- stop start))
   %% value found by try and error
   \translate-scaled #'(0 . -6.5)
   \with-dimensions #empty-interval #empty-interval
   \halign #CENTER
   \normal-text
   \fontsize #-2
   \line {
 \concat {
   "("
   #(number->string start)
   ".."
   #(number->string (1- stop))
   ")"
 }
   }
 }
   #})

#(define (mmr-range-engraver context)
   "Print the range of a @code{MultiMeasureRest}, if the context-property
@code{printMmrRange} is set @code{#t}."
   (let ((print-mmr-nmbr-list '())
 (mmr-bar-numbr-list '()))

 `((acknowledgers
(multi-measure-interface
 .
 ,(lambda (engraver grob source-engraver)
(if (eq? (grob::name grob) 'MultiMeasureRestNumber)
(set! print-mmr-nmbr-list
  (cons
   (cons
grob
(ly:context-property context 'printMmrRange #f))
   print-mmr-nmbr-list)))
(if (eq? (grob::name grob) 'MultiMeasureRest)
(begin
 (set! mmr-bar-numbr-list
   (cons
(cons
 grob
 (ly:context-property context 'currentBarNumber))
mmr-bar-numbr-list)))
   (finalize
.
,(lambda (trans)
   (for-each
(lambda (mmr mmr-nmbr)
  (let ((measure-count (ly:grob-property (car mmr) 'measure-count)))
(if (and (cdr mmr-nmbr) (> measure-count 1))
(ly:grob-set-property! (car mmr-nmbr) 'text
  (formatMMRNumber
   (cdr mmr)
   (+ measure-count (cdr mmr)))
mmr-bar-numbr-list
print-mmr-nmbr-list)
   (set! print-mmr-nmbr-list '())
   (set! mmr-bar-numbr-list '()))

%%
%% EXAMPLES
%%

\layout {
  \context {
\Voice
\consists #mmr-range-engraver
printMmrRange = ##t
  }
}

music = \relative c' {
  c4 d e f
}

flute = \new Staff \with {
  instrumentName = "flute"
}{
  \music
  \compressEmptyMeasures
  R1*4
  \music
  R1*13
  \music
}
oboe = \new Staff \with {
  instrumentName = "oboe"
}{
  \music
  \compressEmptyMeasures
  \repeat unfold 4 {
\music
  }
  \music
  R1*13
  \music
}

\score {
  <<
\flute
\oboe
  >>
  \layout {}
}

\score {
  \flute
  \layout {}
}
\score {
  \oboe
  \layout {}
}

Le dim. 19 nov. 2023, à 23 h 15, Adam M. Griggs
 a écrit :
>
> Hello again list,
>
> Is it possible to configure the bar number engraver so that in addition to 
> its regular behaviour, whatever that may be defined as*, it will also print a 
> bar number after a multi-measure rest?
>
> Thank you.
>
>
> * I usually go with
> \set Score.barNumberVisibility = #(modulo-bar-number-visible 4 1)
> because I detest counting bars up from the start of the system.
>


-- 
Pierre-Luc Gauthier


Auto-bar number after multi-measure rest

2023-11-19 Thread Adam M. Griggs
Hello again list,

Is it possible to configure the bar number engraver so that *in addition to*
its regular behaviour, whatever that may be defined as*, it will also print
a bar number after a multi-measure rest?

Thank you.


* I usually go with
\set Score.barNumberVisibility = #(modulo-bar-number-visible 4 1)
because I detest counting bars up from the start of the system.


Re: Single bar rest with number

2023-11-18 Thread Peter Mayes

On 18/11/2023 11:04, Hans Aikema wrote:


See
https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#compressing-empty-measures 



Snippets >> Numbering single measure rests
\setrestNumberThreshold=0
should get you what you desire


Perfect! Thank you


--
Best wishes -- Peter
--
Peter Mayes


Re: Single bar rest with number

2023-11-18 Thread Hans Aikema


> On 18 Nov 2023, at 12:05, Hans Aikema  wrote:
> 
> 
> 
> 
>>> On 18 Nov 2023, at 11:25, Peter Mayes  wrote:
>>> 
>> If I use \compressMMRests{} for a multi-bar rest, the number of bars of 
>> rest gets placed about the rest, which is fine.
>> 
>> If the rest is only one bar long, then I don't get the number "1" placed 
>> above the rest, even if I use \compressMMRests.
>> 
>> I would like the number 1 to appear, even with a single bar. I guess some 
>> sort of "\markup" could be used, but is there a way to get this to happen 
>> automatically?
>> 
>> Also, if I have a three bar rest, I get two rest marks - one for two bars, 
>> and one for one bar. Is there a way to force Lilypond to use the extended 
>> rest marker (not sure what it is called - elongated horizontal line with 
>> short end vertical lines) for all multi-bar rests of length two bars or more?
> Peter,
> 
> See
> https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#compressing-empty-measures
> 
> Snippets >> Numbering single measure rests
> \set restNumberThreshold = 0
> should get you what you desire

And for the extension of the smaller MM-rest to a rest-bar with number the 
solution is documented in the section next to it: 
\override MultiMeasureRest.expand-limit = #1
Will make all multimeasure-rest be treated equally instead of using a series of 
longa/breve rests to build the 2-10 measures

>> 
>> Thanks in advance.
>> 
>> --
>> Best wishes -- Peter
>> --
>> Peter Mayes
>> 07460 890503
>> 
>> 


Re: Single bar rest with number

2023-11-18 Thread Hans Aikema


> On 18 Nov 2023, at 11:25, Peter Mayes  wrote:
> 
> If I use \compressMMRests{} for a multi-bar rest, the number of bars of rest 
> gets placed about the rest, which is fine.
> 
> If the rest is only one bar long, then I don't get the number "1" placed 
> above the rest, even if I use \compressMMRests.
> 
> I would like the number 1 to appear, even with a single bar. I guess some 
> sort of "\markup" could be used, but is there a way to get this to happen 
> automatically?
> 
> Also, if I have a three bar rest, I get two rest marks - one for two bars, 
> and one for one bar. Is there a way to force Lilypond to use the extended 
> rest marker (not sure what it is called - elongated horizontal line with 
> short end vertical lines) for all multi-bar rests of length two bars or more?
Peter,

See
https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#compressing-empty-measures

Snippets >> Numbering single measure rests
\set restNumberThreshold = 0
should get you what you desire
> 
> Thanks in advance.
> 
> --
> Best wishes -- Peter
> --
> Peter Mayes
> 07460 890503
> 
> 


Single bar rest with number

2023-11-18 Thread Peter Mayes
If I use \compressMMRests{} for a multi-bar rest, the number of bars of 
rest gets placed about the rest, which is fine.


If the rest is only one bar long, then I don't get the number "1" placed 
above the rest, even if I use \compressMMRests.


I would like the number 1 to appear, even with a single bar. I guess 
some sort of "\markup" could be used, but is there a way to get this to 
happen automatically?


Also, if I have a three bar rest, I get two rest marks - one for two 
bars, and one for one bar. Is there a way to force Lilypond to use the 
extended rest marker (not sure what it is called - elongated horizontal 
line with short end vertical lines) for all multi-bar rests of length 
two bars or more?


Thanks in advance.

--
Best wishes -- Peter
--
Peter Mayes
07460 890503




Re: rest note disappear on last 3 measure.

2023-09-15 Thread Xavier Scheuer
On Fri, 15 Sept 2023 at 05:56, cc0_knight--- via LilyPond user discussion <
lilypond-user@gnu.org> wrote:
>
> Hi Everyone.
> When I re-digitalize czerny's op.755 no.1,
> the 8th rest note on the last 3 measure are disappeared.
> code are too large, i've been put it on privatebin. [on code column
301-303]
> Is this an lilypond bug or syntax error?
>
> PS: have been tested on ver 2.25.7, same as 2.24.0.
>
>
https://bin.bloatcat.tk/?3edcc8f61aef5e21#8f8xMNU8icQgqRHbtbupkMUTP9UFDLpN772FVR1HDRYS

Hello,

Put the Merge_rests_engraver on the Staff level instead of PianoStaff.
Here it seems to "merge" the rests from your left and right staff.

Kind regards,
Xavier

-- 
Xavier Scheuer 


rest note disappear on last 3 measure.

2023-09-14 Thread cc0_knight--- via LilyPond user discussion
Hi Everyone.When I re-digitalize czerny's op.755 no.1,
the 8th rest note on the last 3 measure are disappeared.
code are too large, i've been put it on privatebin. [on code column 301-303]
Is this an lilypond bug or syntax error?

PS: have been tested on ver 2.25.7, same as 2.24.0.

https://bin.bloatcat.tk/?3edcc8f61aef5e21#8f8xMNU8icQgqRHbtbupkMUTP9UFDLpN772FVR1HDRYS

Re: Cues and Rest Collision Warning

2023-03-14 Thread Archer Endrich
Thank you, Jean, for these very detailed explanations about how the 
voices are to be used -- and the alternate way to achieve the same 
result.  I hugely appreciate your input.


Archer

On 14/03/2023 19:09, Jean Abou Samra wrote:


Le mardi 14 mars 2023 à 14:36 +, Archer Endrich a écrit :

Thank you Xavier and Jean.  The warnings have disappeared and the 
MMrest with #-6 is perfectly placed on the E line of the staff.

The revised version looks like this:
\score {

|  \new Staff {     \time 4/4     \clef treble     g'1^\markup{Fl 1} 
|   <<   { \voiceTwo   \once \override 
MultiMeasureRest.staff-position = #-6   R1 }     
\oneVoice \new CueVoice {     r4^"Oboe cue" \stemUp g'8([ 
a'] ~ a'2) |   }   >>     r2^\markup{Fl 1} 
bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ |   } } |


This isn't how |\voiceTwo| and |\oneVoice| are supposed to be placed. 
Your indentation with |\oneVoice| on the same line suggest you think 
|\oneVoice| is a function being applied to |\new CueVoice { ... }|, 
but it's not, it's a standalone element. You're putting |\oneVoice| in 
parallel with the |{ \voiceTwo ... }| and the |\new CueVoice { ... }|. 
It occurs at the same time as the |\voiceTwo| and in the same voice, 
effectively cancelling it.


Rather, you want to do

|\version "2.24.1" \score { \new Staff { \time 4/4 \clef treble 
g'1^\markup{Fl 1} | << { \voiceTwo % this passage is "voice two" R1 } 
\new CueVoice { \voiceOne % this new CueVoice is independent and has 
"voice one" settings r4^"Oboe cue" \stemUp g'8([ a'] ~ a'2) | } >> 
\oneVoice % this continues the passage with \voiceTwo, use \oneVoice 
to cancel it r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ | } } |


or use the shorter syntax with |\\| :

|\version "2.24.1" \score { \new Staff { \time 4/4 \clef treble 
g'1^\markup{Fl 1} | << \new CueVoice { r4^"Oboe cue" \stemUp g'8([ a'] 
~ a'2) | } \\ { R1 } >> r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ 
a'4\!\p) ~ | } } |


As you can see, you don't need the |\override| anymore, |\voiceTwo| 
puts the multi-measure rest at the right position.


Re: Cues and Rest Collision Warning

2023-03-14 Thread Jean Abou Samra
Le mardi 14 mars 2023 à 14:36 +, Archer Endrich a écrit :
> Thank you Xavier and Jean.  The warnings have disappeared and the   
> MMrest with #-6 is perfectly placed on the E line of the staff.  
> The revised version looks like this:  
> \score {  
>   
>     \new Staff {  
>       \time 4/4  
>       \clef treble  
>         
>       g'1^\markup{Fl 1} |  
>     <<  
>     { \voiceTwo  
>     \once \override MultiMeasureRest.staff-position = #-6  
>     R1 }  
>       \oneVoice \new CueVoice {  
>       r4^"Oboe cue" \stemUp g'8([ a'] ~ a'2) |  
>     }  
>     >>  
>       r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ |  
>     }  
>   
>   }  

This isn't how `\voiceTwo` and `\oneVoice` are supposed to be placed. Your 
indentation with `\oneVoice` on the same line suggest you think `\oneVoice` is 
a function being applied to `\new CueVoice { ... }`, but it's not, it's a 
standalone element. You're putting `\oneVoice` in parallel with the `{ 
\voiceTwo ... }` and the `\new CueVoice { ... }`. It occurs at the same time as 
the `\voiceTwo` and in the same voice, effectively cancelling it.

Rather, you want to do

```
\version "2.24.1"

\score {
  \new Staff {
\time 4/4
\clef treble
g'1^\markup{Fl 1} |
<<
  {
\voiceTwo % this passage is "voice two"
R1
  }
  \new CueVoice {
\voiceOne % this new CueVoice is independent and has "voice one" 
settings
r4^"Oboe cue" \stemUp g'8([ a'] ~ a'2) |
  }
>>
\oneVoice % this continues the passage with \voiceTwo, use \oneVoice to 
cancel it
r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ | 
  }
}
```

or use the shorter syntax with `\\` :

```
\version "2.24.1"

\score {
  \new Staff {
\time 4/4
\clef treble
g'1^\markup{Fl 1} |
<<
  \new CueVoice {
r4^"Oboe cue" \stemUp g'8([ a'] ~ a'2) |
  }
  \\
  {
R1
  }
>>
r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ | 
  }
}
```

As you can see, you don't need the `\override` anymore, `\voiceTwo` puts the 
multi-measure rest at the right position.


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


Re: Cues and Rest Collision Warning

2023-03-14 Thread Archer Endrich
Thank you Xavier and Jean.  The warnings have disappeared and the MMrest 
with #-6 is perfectly placed on the E line of the staff.


The revised version looks like this:

\score {

  \new Staff {
    \time 4/4
    \clef treble

    g'1^\markup{Fl 1} |
  <<
  { \voiceTwo
  \once \override MultiMeasureRest.staff-position = #-6
  R1 }
    \oneVoice \new CueVoice {
    r4^"Oboe cue" \stemUp g'8([ a'] ~ a'2) |
  }
  >>
    r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p) ~ |
  }

}

Thanks again,

Archer


On 14/03/2023 12:13, Xavier Scheuer wrote:

On Tue, 14 Mar 2023 at 12:55, Archer Endrich  wrote:
>
> The reason I used c'1\rest was so that the rest would be placed on the
> bottom line of the Staff.  I would really like a centered rest (R1) but
> this automatically places it on the 2nd line from the top, which does
> conflict with the music of the cue.

Hello,

Replace your c'1\rest with

  \voiceTwo
  R1
  \oneVoice

In case the positioning of the multi-measure rest is not satisfactory 
you can use

\once \override MultiMeasureRest.staff-position = #-6
as documented in NR 1.2.2 Writing rests > Full measure rests

Cheers,
Xavier

--
Xavier Scheuer 


Re: Cues and Rest Collision Warning

2023-03-14 Thread Jean Abou Samra
Le mardi 14 mars 2023 à 13:13 +0100, Xavier Scheuer a écrit :
> On Tue, 14 Mar 2023 at 12:55, Archer Endrich 
> <[archer...@gmail.com](mailto:archer...@gmail.com)> wrote:  
> >  
> > The reason I used c'1\rest was so that the rest would be placed on the  
> > bottom line of the Staff.  I would really like a centered rest (R1) but  
> > this automatically places it on the 2nd line from the top, which does  
> > conflict with the music of the cue.
> 
> Hello,
> 
> Replace your c'1\rest with
> 
>   \voiceTwo  
>   R1  
>   \oneVoice
> 
> In case the positioning of the multi-measure rest is not satisfactory you can 
> use  
> \once \override MultiMeasureRest.staff-position = #-6  
> as documented in NR 1.2.2 Writing rests > Full measure rests


Yes, agreed. The documentation doesn't use `\voiceOne`/`\voiceTwo`/`\oneVoice`, 
but I think this is a documentation bug, see 
[#6545](https://gitlab.com/lilypond/lilypond/-/issues/6545).



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


Re: Cues and Rest Collision Warning

2023-03-14 Thread Xavier Scheuer
On Tue, 14 Mar 2023 at 12:55, Archer Endrich  wrote:
>
> The reason I used c'1\rest was so that the rest would be placed on the
> bottom line of the Staff.  I would really like a centered rest (R1) but
> this automatically places it on the 2nd line from the top, which does
> conflict with the music of the cue.

Hello,

Replace your c'1\rest with

  \voiceTwo
  R1
  \oneVoice

In case the positioning of the multi-measure rest is not satisfactory you
can use
\once \override MultiMeasureRest.staff-position = #-6
as documented in NR 1.2.2 Writing rests > Full measure rests

Cheers,
Xavier

-- 
Xavier Scheuer 


Cues and Rest Collision Warning

2023-03-14 Thread Archer Endrich

Dear Lilypond User Group,

First of all, thanks for the great discussion about variables and 
Bookpart.  I had very recently come across that problem, though in 
simpler form:  just putting a variable definition directly into a file 
that used \book (for assembling several short scores). Placing the 
definition outside \book made it all work perfectly.


I have another problem with a very simple use of cues, using code as in 
the Notation Manual.  This is my example:


%CuesandRestCollisions.ly
\version "2.22.1"

\header {
  title = "Cues and Rest Collision Warning"
}

\markup \vspace  #1

\score {

  \new Staff {
    \time 4/4
    \clef treble

    g'1^\markup{Fl 1} |
  <<
  { c'1\rest }
    \new CueVoice {
    r4^"Oboe cue" \stemUp g'8->([ a'] ~ a'2) |
  }
  >>
    r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p\<) ~ |
  }

}

\layout { }

This compiles OK but gives the warning :  cannot resolve rest 
collision:  rest direction not set


The reason I used c'1\rest was so that the rest would be placed on the 
bottom line of the Staff.  I would really like a centered rest (R1) but 
this automatically places it on the 2nd line from the top, which does 
conflict with the music of the cue.


Why does it worry about a 'rest direction' (whatever that is), 
especially when it is a breve rest.  Is there a way to avoid the warning.


Cues are minimal in this piece, so I didn't want to use a separate staff.

Finally, is it common practice to include the rest (for the instrument 
playing that part) along with the cue, which is distinguished by its 
smaller notes?


Thank you,

Archer



%CuesandRestCollisions.ly
\version "2.22.1"

\header {
  title = "Cues and Rest Collision Warning"
}

\markup \vspace  #1

\score {

  \new Staff {
\time 4/4
    \clef treble

g'1^\markup{Fl 1} |
  <<
  { c'1\rest }
\new CueVoice {
r4^"Oboe cue" \stemUp g'8->([ a'] ~ a'2) |
  }
  >>
r2^\markup{Fl 1} bes'8->\sfz\>([ a'] ~ a'4\!\p\<) ~ | 
  }

}

\layout { }


Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Archer Endrich

Hello,

I often have varied groupings under one beam and have used the solution 
given by Michael Werner.  However, I have also created the following to 
simplify entering the commands and the look of the score file:


bcLnone = \set stemLeftBeamCount = #0
bcRone = \set stemRightBeamCount = #1
bcLone = \set stemLeftBeamCount = #1
bcRtwo = \set stemRightBeamCount = #2
bcLtwo = \set stemLeftBeamCount = #2

Such as in:

\times 2/3 {f'16([ b, \bcRone f' ~} \bcLone f16 b,] ~ b16[ \bcRone f' ~ 
\bcLone f32-- b,16.] f'32[ b, ~ b8 f'16] ~ \times 4/6 {f16 b, \bcRone f' 
~ \bcLone f b, f'] ~} | \times 2/3 {f16[ b, \bcRone f' ~} \bcLone f32 b, 
f' b,] f'32[ b,32 ~ b8]) r16 fis'32([ b, ~ b8 fis'16] ~ \times 4/6 { 
fis16[ b, \bcRone fis' ~ \bcLone fis b, fis'])} |


beam count example
Archer


On 14/12/2022 16:24, Michael Werner wrote:

Resending to include the list ... oops.

Something like this, perhaps?

\version "2.23.82"

\relative  {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'16[( aes \set stemRightBeamCount = #1 g) } \set 
stemLeftBeamCount = #1 fis g] a8 b |

}


On Wed, Dec 14, 2022 at 10:42 AM Volodymyr Prokopyuk 
 wrote:


Hello,

*Problem*

How can I separate a \tuplet from two sixteenths using a common
eightingth beam?

*Example code*

\version "2.23.81"

\relative {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
}

image.png


*Desired result*
image.png

I've tried to adjust the baseMoment, beatStructure, subdivideBeats
and strictBeatBeaming but without success.

Thank you very much,
Vlad
\version "2.22.1"
% beamcountexample.ly


%Shorthand for setting the beam count:
bcLnone = \set stemLeftBeamCount = #0
bcRone = \set stemRightBeamCount = #1
bcLone = \set stemLeftBeamCount = #1
bcRtwo = \set stemRightBeamCount = #2
bcLtwo = \set stemLeftBeamCount = #2

\score {

 \new Staff {
 \relative c {
 \clef "treble_8"
 \time 4/4
 \override TupletBracket.bracket-visibility = ##t

 \times 2/3 {f'16([ b, \bcRone f' ~} \bcLone f16 b,] ~ b16[ \bcRone f' ~ \bcLone f32-- b,16.] f'32[ b, ~ b8 f'16] ~ \times 4/6 {f16 b, \bcRone f' ~ \bcLone f b, f'] ~} | \times 2/3 {f16[ b, \bcRone f' ~} \bcLone f32 b, f' b,] f'32[ b,32 ~ b8]) r16 fis'32([ b, ~ b8 fis'16] ~ \times 4/6 { fis16[ b, \bcRone fis' ~ \bcLone fis b, fis'])} | 
 }
 }

}


Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Volodymyr Prokopyuk
Thank you Michael and Mats!

I'll go with Mat's response!

Vlad

On Wed, Dec 14, 2022 at 5:35 PM Mats Bengtsson 
wrote:

> Just copying and pasting from the example of subdividing beams at
> https://lilypond.org/doc/v2.23/Documentation/notation/beams, I tried the
> following, which seems to give the desired result.
>
> \version "2.23.81"
>
>
> \relative {
>\clef treble
>\key c \minor
>\time 2/4
>\set subdivideBeams = ##t
>\set baseMoment = #(ly:make-moment 1/8)
>\tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
> }
>
> /Mats
>
> On 2022-12-14 16:41, Volodymyr Prokopyuk wrote:
> > Hello,
> >
> > *Problem*
> >
> > How can I separate a \tuplet from two sixteenths using a common
> > eightingth beam?
> >
> > *Example code*
> >
> > \version "2.23.81"
> >
> > \relative {
> >   \clef treble
> >   \key c \minor
> >   \time 2/4
> >   \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
> > }
> >
> > image.png
> >
> >
> > *Desired result*
> > image.png
> >
> > I've tried to adjust the baseMoment, beatStructure, subdivideBeats and
> > strictBeatBeaming but without success.
> >
> > Thank you very much,
> > Vlad
> >
>


Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Paul Scott

Most likely before your time at Lilypond.  I used it a lot then.

Paul


On 12/14/22 10:04, David Kastrup wrote:

Paul Scott  writes:


Good to know.  Many many versions ago we could just nest square
brackets.

Not to my knowledge.  We had some handwaving discussions at some point
of time, but there were solid reasons against such an idea.





Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread David Kastrup
Paul Scott  writes:

> Good to know.  Many many versions ago we could just nest square
> brackets.

Not to my knowledge.  We had some handwaving discussions at some point
of time, but there were solid reasons against such an idea.

-- 
David Kastrup



Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Mats Bengtsson
Just copying and pasting from the example of subdividing beams at 
https://lilypond.org/doc/v2.23/Documentation/notation/beams, I tried the 
following, which seems to give the desired result.


\version "2.23.81"


\relative {
  \clef treble
  \key c \minor
  \time 2/4
  \set subdivideBeams = ##t
  \set baseMoment = #(ly:make-moment 1/8)
  \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
}

   /Mats

On 2022-12-14 16:41, Volodymyr Prokopyuk wrote:

Hello,

*Problem*

How can I separate a \tuplet from two sixteenths using a common 
eightingth beam?


*Example code*

\version "2.23.81"

\relative {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
}

image.png


*Desired result*
image.png

I've tried to adjust the baseMoment, beatStructure, subdivideBeats and 
strictBeatBeaming but without success.


Thank you very much,
Vlad





Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Paul Scott

Good to know.  Many many versions ago we could just nest square brackets.

Paul


On 12/14/22 09:24, Michael Werner wrote:

Resending to include the list ... oops.

Something like this, perhaps?

\version "2.23.82"

\relative  {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'16[( aes \set stemRightBeamCount = #1 g) } \set 
stemLeftBeamCount = #1 fis g] a8 b |

}


On Wed, Dec 14, 2022 at 10:42 AM Volodymyr Prokopyuk 
 wrote:


Hello,

*Problem*

How can I separate a \tuplet from two sixteenths using a common
eightingth beam?

*Example code*

\version "2.23.81"

\relative {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
}

image.png


*Desired result*
image.png

I've tried to adjust the baseMoment, beatStructure, subdivideBeats
and strictBeatBeaming but without success.

Thank you very much,
Vlad


Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Michael Werner
Resending to include the list ... oops.

Something like this, perhaps?

\version "2.23.82"

\relative  {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'16[( aes \set stemRightBeamCount = #1 g) } \set
stemLeftBeamCount = #1 fis g] a8 b |
}


On Wed, Dec 14, 2022 at 10:42 AM Volodymyr Prokopyuk <
volodymyrprokop...@gmail.com> wrote:

> Hello,
>
> *Problem*
>
> How can I separate a \tuplet from two sixteenths using a common
> eightingth beam?
>
> *Example code*
>
> \version "2.23.81"
>
> \relative {
>   \clef treble
>   \key c \minor
>   \time 2/4
>   \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
> }
>
> [image: image.png]
>
>
> *Desired result*
> [image: image.png]
>
> I've tried to adjust the baseMoment, beatStructure, subdivideBeats and
> strictBeatBeaming but without success.
>
> Thank you very much,
> Vlad
>
>


Separate a tuplet from the rest under a common beam

2022-12-14 Thread Volodymyr Prokopyuk
Hello,

*Problem*

How can I separate a \tuplet from two sixteenths using a common eightingth
beam?

*Example code*

\version "2.23.81"

\relative {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
}

[image: image.png]


*Desired result*
[image: image.png]

I've tried to adjust the baseMoment, beatStructure, subdivideBeats and
strictBeatBeaming but without success.

Thank you very much,
Vlad


Re: docs about Rest vertical position

2022-09-03 Thread Kieren MacMillan
Hi Mats,

> What I miss in the discussion here is the user interface aspect and the ease 
> of use. At least for a less experienced LilyPond user, the c''8\rest has a 
> very intuitive meaning of "a rest placed where you would place the c''", 
> whereas \tweak as a general concept requires much more higher level of 
> LilyPond competence and even if you do pattern matching, you have to figure 
> out what the argument 1 means, what the unit is and if positive or negative 
> values are up or down.

That's exactly what I was referring to in my email response to Martín.  =)

> I'm not entirely positive to the proposal.

That's exactly why I didn't suggest replacing the existing documentation, but 
rather augmenting it.  =)

Cheers,
Kieren.


Re: docs about Rest vertical position

2022-09-03 Thread Eef Weenink
Just a simple example. Could be the start of a minimal music thing.

violin = \relative c'' {
  c16 d e f] g [a b c]
  c,16 [d\rest e f] g [a b c]
  c,16 [d e\rest f] g [a b c]
  c,16 [d e f\rest ] g [a b c]
  c,16 [d e f] g\rest [a b c]
  c,16 [d e f] g [a\rest b c]
  c,16 [d e f] g [a b\rest c]
  c,16 [d e f] g [a b c]
  \bar "|."
}

Vriendelijke groet, Eef

Op 3 sep. 2022, om 11:13 heeft Martín Rincón Botero 
mailto:martinrinconbot...@gmail.com>> het 
volgende geschreven:

Hi Eef,

When composing; arranging it happens often that a note is skipped (read: turned 
into a ‘rest’). Think about note patterns what repeat, with small variations. 
Then the note/rest does the job perfectly. The pattern is kept. The rest is 
exactly on the place the note would have been.

Would you mind putting a short example of what you mean? Also in which musical 
context? Jazz perhaps?

—Martín.


On Sep 2, 2022 at 9:44 PM, mailto:h.e.ween...@de-erve.nl>> wrote:

My two cents:

Tweaking the position is fine to avoid a collision or to keep a rest about the 
same “viewing” line then the notes of a phrase

But, or better And:
When composing; arranging it happens often that a note is skipped (read: turned 
into a ‘rest’). Think about note patterns what repeat, with small variations. 
Then the note/rest does the job perfectly. The pattern is kept. The rest is 
exactly on the place the note would have been.
In fact a very well musical solution.


Met vriendelijke groet, Eef

H.E. Weenink MBA

Op 2 sep. 2022 om 21:33 heeft Martín Rincón Botero 
mailto:martinrinconbot...@gmail.com>> het 
volgende geschreven:


Hi Kieren,

how do you think that this feature is more useful than \tweaking the y-offset? 
If the documentation explains how to move a rest, the officially recommended 
way should be using \tweak in my opinion. It's unclear to me what's the use 
case of the option of adding a note to a \rest (which in itself sounds like a 
contradiction). If we follow the WSIWYM paradigm, you can't possibly mean to 
put a "note-rest" somewhere. Perhaps not pointing that out or removing the 
feature altogether is better in the long run?

Martín.


On Sep 2, 2022 at 4:27 PM, mailto:kie...@kierenmacmillan.info>> wrote:


Hi all,

I was answering a user's question on the FB group, and noted that in the docs, 
we suggest

“To explicitly specify a rest’s vertical position, write a note followed by 
\rest.”

While this is a useful thing to know about, I don't personally believe it's a 
best practice: it mixes content with presentation, it doesn't play well with 
\transpose, etc.

I'm not necessarily suggesting that we avoid pointing out this feature. I'm 
just wondering if anyone else agrees that we should point out the downsides, 
and give alternative ways of accomplishing the same task? If so, I can put 
together some draft verbiage for a discussion starting point.

Cheers,
Kieren.




Re: docs about Rest vertical position

2022-09-03 Thread Mats Bengtsson

  
  


On 2022-09-02 16:43, Kieren MacMillan
  wrote:


  A little more context:


  
   “To explicitly specify a rest’s vertical position, write a note followed by \rest.”
While this is a useful thing to know about, I don't personally believe it's a best practice: it mixes content with presentation, it doesn't play well with \transpose, etc.

  
  
Consider, for example, the following two snippets:

\transpose c f \voices 1,2 <<
  { \tweak Y-offset 1 r8 b e' d' }
  \\
  { g16^1 f^2 g a }

  

  


  
  
\transpose c f \voices 1,2 <<
  { c''8\rest b e' d' }
  \\
  { g16^1 f^2 g a }

  

  


  

What I miss in the discussion here is the user interface aspect
  and the ease of use. At least for a less experienced LilyPond
  user, the c''8\rest has a very intuitive meaning of "a rest placed
  where you would place the c''", whereas \tweak as a general
  concept requires much more higher level of LilyPond competence and
  even if you do pattern matching, you have to figure out what the
  argument 1 means, what the unit is and if positive or negative
  values are up or down. 

If I'm not completely mistaken, the original reason to introduce
  the \rest syntax was to avoid having to use 
  \override Rest.staff-position = #3 r8 
  which was the standard solution recommended at that time (this was
  long before \tweak and \once was invented), and which required
  figuring out what numeric value of staff position corresponded to
  the desired vertical position (which conceptually is more
  demanding than specifying a pitch). 

As has already been discussed, there are both pros and cons of
  letting the rest vertical position follow a possible transposition
  and there may be situations where tweaking staff-position may  be
  better suited than Y-offset (which is relative to the position
  that LilyPond thinks is the best, depending on Voice settings and
  possible collision avoidance). 

So, I'm not entirely positive to the proposal.
    /Mats

  




Re: docs about Rest vertical position

2022-09-03 Thread Martín Rincón Botero
  
  

 Hi Eef,
  

  
>   
>  When composing; arranging it happens often that a note is skipped (read: 
> turned into a ‘rest’). Think about note patterns what repeat, with small 
> variations. Then the note/rest does the job perfectly. The pattern is kept. 
> The rest is exactly on the place the note would have been.
>   
>   
> Would you mind putting a short example of what you mean? Also in which 
> musical context? Jazz perhaps?
  
  
  
  
 —Martín.
  
  
  

  
  
>   
> On Sep 2, 2022 at 9:44 PM,  mailto:h.e.ween...@de-erve.nl)>  
> wrote:
>   
>   
>   My two cents:  
>
>   
> Tweaking the position is fine to avoid a collision or to keep a rest about 
> the same “viewing” line then the notes of a phrase   
>   
>
>   
> But, or better And:
>   
> When composing; arranging it happens often that a note is skipped (read: 
> turned into a ‘rest’). Think about note patterns what repeat, with small 
> variations. Then the note/rest does the job perfectly. The pattern is kept. 
> The rest is exactly on the place the note would have been.   
>   
> In fact a very well musical solution.   
>   
>   
>
>   
> Met vriendelijke groet, Eef
>   
>
>   
> H.E. Weenink MBA
>   
>   
>
>   
> > Op 2 sep. 2022 om 21:33 heeft Martín Rincón Botero  
> >   het volgende geschreven:
> >   
> 
> >   
> >   
> >   
> >
> >  Hi Kieren,
> >   
> >
> >   
> > how do you think that this feature is more useful than \tweaking the 
> > y-offset? If the documentation explains how to move a rest, the officially 
> > recommended way should be using \tweak in my opinion. It's unclear to me 
> > what's the use case of the option of adding a note to a \rest (which in 
> > itself sounds like a contradiction). If we follow the WSIWYM paradigm, you 
> > can't possibly mean to put a "note-rest" somewhere. Perhaps not pointing 
> > that out or removing the feature altogether is better in the long run?
> >   
> >
> >   
> > Martín.
> >   
> >   
> >
> >   
> >   
> > >   
> > > On Sep 2, 2022 at 4:27 PM,   > > (mailto:kie...@kierenmacmillan.info)>  wrote:
> > >   
> > >   
> > >   
> > >  Hi all, I was answering a user's question on the FB group, and noted 
> > > that in the docs, we suggest “To explicitly specify a rest’s vertical 
> > > position, write a note followed by \rest.” While this is a useful thing 
> > > to know about, I don't personally believe it's a best practice: it mixes 
> > > content with presentation, it doesn't play well with \transpose, etc. I'm 
> > > not necessarily suggesting that we avoid pointing out this feature. I'm 
> > > just wondering if anyone else agrees that we should point out the 
> > > downsides, and give alternative ways of accomplishing the same task? If 
> > > so, I can put together some draft verbiage for a discussion starting 
> > > point. Cheers, Kieren.  
> > >
> > >   
> >   
> >   
> >   
> >   
>   
>   
>   
  
  
   

Re: docs about Rest vertical position

2022-09-02 Thread Kieren MacMillan
Hi Martín,

> how do you think that this feature is more useful than \tweaking the y-offset?

I don't, personally.  =)

> If the documentation explains how to move a rest, the officially recommended 
> way should be using \tweak in my opinion.

I agree. I was simply offering a less… um… nuclear doc-revision option.

> It's unclear to me what's the use case of the option of adding a note to a 
> \rest (which in itself sounds like a contradiction).

Much like a few other “seems like a great idea when you're a newbie” (which I 
will refrain from explicitly mentioning here), I believe the main use case is 
to make it really easy for new users to fix collisions or “hard-code” the rest 
position, without introducing them to \override-ing and \tweak-ing. 

> If we follow the WSIWYM paradigm, you can't possibly mean to put a 
> "note-rest" somewhere. Perhaps not pointing that out or removing the feature 
> altogether is better in the long run?

I agree.

Cheers,
Kieren


Re: docs about Rest vertical position

2022-09-02 Thread Thomas Morley
Am Fr., 2. Sept. 2022 um 21:44 Uhr schrieb Jean Abou Samra :


> [...] moving \rest to a footnote or undocumenting it altogether.
> Whether its outright removal is desirable is another question.
>
> This is veering into lilypond-devel territory, maybe we should continue the
> discussion there? Alternatively, I'll be happy to continue on a patch
> on GitLab :-)
>
> Cheers,
> Jean

I never understood why we don't allow
\glissando \rest
!?

Cheers,
  Harm



Re: docs about Rest vertical position

2022-09-02 Thread Martín Rincón Botero
  
  

 Well, we're mostly agreeing ;-). I wouldn't support pointing out the downsides 
of note+rest as suggested by Kieren nor I'm sure that I agree it's useful to 
know about note+rest: if \tweak is the proper way to do it, let's document that 
instead.
  
  

  
  
>   
> On Sep 2, 2022 at 9:44 PM,  mailto:j...@abou-samra.fr)>  
> wrote:
>   
>   
>   
>  Le 02/09/2022 à 21:31, Martín Rincón Botero a écrit :  >  Hi Kieren,  >   >  
> how do you think that this feature is more useful than \tweaking the  >  
> y-offset? If the documentation explains how to move a rest, the  >  
> officially recommended way should be using \tweak in my opinion. It's  >  
> unclear to me what's the use case of the option of adding a note to a  >  
> \rest (which in itself sounds like a contradiction). If we follow the  >  
> WSIWYM paradigm, you can't possibly mean to put a "note-rest"  >  somewhere. 
> Perhaps not pointing that out or removing the feature  >  altogether is 
> better in the long run? Reread Kieren's original message; I think you are 
> exactly agreeing with him :-) The transposition problem can be worked around 
> using \version "2.23.12" untransposable = \withMusicProperty untransposable 
> ##t \etc \transpose c f \voices 1,2  <<  { \untransposable c''8\rest b e' d' 
> } \\ { g16^1 f^2 g a }  >>  but of course, for this sort of use case, \tweak 
> Y-offset is better in the first place. I can't think of use cases where \rest 
> is really what you want, as opposed to \tweak Y-offset. Unless someone comes 
> up with an argument for it, I'd support a patch showing \tweak Y-offset in 
> the documentation and moving \rest to a footnote or undocumenting it 
> altogether. Whether its outright removal is desirable is another question. 
> This is veering into lilypond-devel territory, maybe we should continue the 
> discussion there? Alternatively, I'll be happy to continue on a patch on 
> GitLab :-) Cheers, Jean  
>
>   
  
  
   

Re: docs about Rest vertical position

2022-09-02 Thread Eef Weenink
My two cents:

Tweaking the position is fine to avoid a collision or to keep a rest about the 
same “viewing” line then the notes of a phrase

But, or better And:
When composing; arranging it happens often that a note is skipped (read: turned 
into a ‘rest’). Think about note patterns what repeat, with small variations. 
Then the note/rest does the job perfectly. The pattern is kept. The rest is 
exactly on the place the note would have been.
In fact a very well musical solution.


Met vriendelijke groet, Eef

H.E. Weenink MBA

Op 2 sep. 2022 om 21:33 heeft Martín Rincón Botero 
 het volgende geschreven:


Hi Kieren,

how do you think that this feature is more useful than \tweaking the y-offset? 
If the documentation explains how to move a rest, the officially recommended 
way should be using \tweak in my opinion. It's unclear to me what's the use 
case of the option of adding a note to a \rest (which in itself sounds like a 
contradiction). If we follow the WSIWYM paradigm, you can't possibly mean to 
put a "note-rest" somewhere. Perhaps not pointing that out or removing the 
feature altogether is better in the long run?

Martín.


On Sep 2, 2022 at 4:27 PM, mailto:kie...@kierenmacmillan.info>> wrote:


Hi all,

I was answering a user's question on the FB group, and noted that in the docs, 
we suggest

“To explicitly specify a rest’s vertical position, write a note followed by 
\rest.”

While this is a useful thing to know about, I don't personally believe it's a 
best practice: it mixes content with presentation, it doesn't play well with 
\transpose, etc.

I'm not necessarily suggesting that we avoid pointing out this feature. I'm 
just wondering if anyone else agrees that we should point out the downsides, 
and give alternative ways of accomplishing the same task? If so, I can put 
together some draft verbiage for a discussion starting point.

Cheers,
Kieren.



Re: docs about Rest vertical position

2022-09-02 Thread Jean Abou Samra

Le 02/09/2022 à 21:31, Martín Rincón Botero a écrit :

Hi Kieren,

how do you think that this feature is more useful than \tweaking the 
y-offset? If the documentation explains how to move a rest, the 
officially recommended way should be using \tweak in my opinion. It's 
unclear to me what's the use case of the option of adding a note to a 
\rest (which in itself sounds like a contradiction). If we follow the 
WSIWYM paradigm, you can't possibly mean to put a "note-rest" 
somewhere. Perhaps not pointing that out or removing the feature 
altogether is better in the long run?





Reread Kieren's original message; I think you are exactly agreeing
with him :-)

The transposition problem can be worked around using


\version "2.23.12"

untransposable = \withMusicProperty untransposable ##t \etc

\transpose c f \voices 1,2 <<
  { \untransposable c''8\rest b e' d' }
  \\
  { g16^1 f^2 g a }
>>


but of course, for this sort of use case, \tweak Y-offset is better in
the first place. I can't think of use cases where \rest is really what
you want, as opposed to \tweak Y-offset. Unless someone comes up with
an argument for it, I'd support a patch showing \tweak Y-offset in the
documentation and moving \rest to a footnote or undocumenting it altogether.
Whether its outright removal is desirable is another question.

This is veering into lilypond-devel territory, maybe we should continue the
discussion there? Alternatively, I'll be happy to continue on a patch
on GitLab :-)

Cheers,
Jean




Re: docs about Rest vertical position

2022-09-02 Thread Martín Rincón Botero
  
  

 Hi Kieren,
  

  
how do you think that this feature is more useful than \tweaking the y-offset? 
If the documentation explains how to move a rest, the officially recommended 
way should be using \tweak in my opinion. It's unclear to me what's the use 
case of the option of adding a note to a \rest (which in itself sounds like a 
contradiction). If we follow the WSIWYM paradigm, you can't possibly mean to 
put a "note-rest" somewhere. Perhaps not pointing that out or removing the 
feature altogether is better in the long run?
  

  
Martín.
  
  

  
  
>   
> On Sep 2, 2022 at 4:27 PM,   (mailto:kie...@kierenmacmillan.info)>  wrote:
>   
>   
>   
>  Hi all, I was answering a user's question on the FB group, and noted that in 
> the docs, we suggest “To explicitly specify a rest’s vertical position, write 
> a note followed by \rest.” While this is a useful thing to know about, I 
> don't personally believe it's a best practice: it mixes content with 
> presentation, it doesn't play well with \transpose, etc. I'm not necessarily 
> suggesting that we avoid pointing out this feature. I'm just wondering if 
> anyone else agrees that we should point out the downsides, and give 
> alternative ways of accomplishing the same task? If so, I can put together 
> some draft verbiage for a discussion starting point. Cheers, Kieren.  
>
>   
  
  
   

Re: docs about Rest vertical position

2022-09-02 Thread Kieren MacMillan
A little more context:

>“To explicitly specify a rest’s vertical position, write a note followed 
> by \rest.”
> While this is a useful thing to know about, I don't personally believe it's a 
> best practice: it mixes content with presentation, it doesn't play well with 
> \transpose, etc.

Consider, for example, the following two snippets:

\transpose c f \voices 1,2 <<
  { \tweak Y-offset 1 r8 b e' d' }
  \\
  { g16^1 f^2 g a }
>>

\transpose c f \voices 1,2 <<
  { c''8\rest b e' d' }
  \\
  { g16^1 f^2 g a }
>>

Cheers,
Kieren.


docs about Rest vertical position

2022-09-02 Thread Kieren MacMillan
Hi all,

I was answering a user's question on the FB group, and noted that in the docs, 
we suggest

“To explicitly specify a rest’s vertical position, write a note followed by 
\rest.”

While this is a useful thing to know about, I don't personally believe it's a 
best practice: it mixes content with presentation, it doesn't play well with 
\transpose, etc.

I'm not necessarily suggesting that we avoid pointing out this feature. I'm 
just wondering if anyone else agrees that we should point out the downsides, 
and give alternative ways of accomplishing the same task? If so, I can put 
together some draft verbiage for a discussion starting point.

Cheers,
Kieren.


Re: Expanding rest printing so tempo changes don't clash

2022-08-02 Thread Paul Hodges
Look into \markLengthOn and markLengthOff.


You can find examples on this page: 
https://lilypond.org/doc/v2.23/Documentation/notation/displaying-rhythms


Paul



 From:   Galen Hazelwood  
 To:
 Sent:   02/08/2022 22:55 
 Subject:   Expanding rest printing so tempo changes don't clash 


Hello, everyone. I'm a relatively inexperienced lilypond user trying to use it 
for a big project (score and parts for Leo Ornstein's Piano Concerto) and I've 
been running into some issues. I'd like to start with what I hope is an easy 
one.


There's a point early on where I have three \tempo markings in fairly close 
proximity. For the instruments that aren't playing, it looks like this:


{ \tempo "più agitato" R1 \tempo "Appasionata, ma molto sostenuto" R1*2 \time 
2/4 R2 \time 3/4 \tempo "Allegro" R2. }



Lilypond prints this so tightly packed that the "Appasionata" actually sits 
over the "piu agitato", and it in turn is such a long string that it overlaps 
the "Allego". So I'd like to make those rest bars artificially longer, to match 
the length of the tempo strings plus some margin.


The trouble is, I'm not sure what to override. I tried Rest.extra-spacing-width 
(by analogy with NoteHead.extra-spacing-width, which I used elsewhere) and it 
didn't seem to do anything, so it's not the right object. Can anyone point me 
in the right direction here?


One last wrinkle; it has to work with \compressMMRests.


Thanks!
--Galen





 

Expanding rest printing so tempo changes don't clash

2022-08-02 Thread Galen Hazelwood
Hello, everyone. I'm a relatively inexperienced lilypond user trying to use
it for a big project (score and parts for Leo Ornstein's Piano Concerto)
and I've been running into some issues. I'd like to start with what I hope
is an easy one.

There's a point early on where I have three \tempo markings in fairly close
proximity. For the instruments that aren't playing, it looks like this:

{ \tempo "più agitato" R1 \tempo "Appasionata, ma molto sostenuto" R1*2
\time 2/4 R2 \time 3/4 \tempo "Allegro" R2. }

Lilypond prints this so tightly packed that the "Appasionata" actually sits
over the "piu agitato", and it in turn is such a long string that it
overlaps the "Allego". So I'd like to make those rest bars
artificially longer, to match the length of the tempo strings plus some
margin.

The trouble is, I'm not sure what to override. I tried
Rest.extra-spacing-width (by analogy with NoteHead.extra-spacing-width,
which I used elsewhere) and it didn't seem to do anything, so it's not the
right object. Can anyone point me in the right direction here?

One last wrinkle; it has to work with \compressMMRests.

Thanks!
--Galen


Re: Change to \rest markup in 2.23

2022-07-23 Thread David F.



> On Jul 20, 2022, at 5:25 AM, Jean Abou Samra  wrote:
> 
> Le 20/07/2022 à 05:57, David F. a écrit :
>> In 2.23, the rest markup command changed from taking a string to taking a 
>> duration.
>> 
>> \version "2.22"
>> \markup \rest #"4.."
>> 
>> \version "2.23"
>> \markup \rest { 4.. }
>> 
>> It would be nice if this change were backward compatible, at least for a 
>> version or two.
> 
> 
> LilyPond's general policy is that backwards-incompatible syntax
> changes are OK as long as a convert-ly rule is provided to update
> input files automatically.
> 
> Well, in this case there is no convert-ly rule ... I'll fix that soon.
> 
> 
>> My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
>> environment I use for final “production” of scores.  But I’ve been trying to 
>> do as much development as possible in v2.23 on macOS 10.15.
>> 
>> Unfortunately, the change to the rest markup command makes going back and 
>> forth quite cumbersome.  Would be be possible to make this command take 
>> either a string or duration?
> 
> 
> My answer will be a bit different from Harm's: this sounds like
> an XY problem to me. Why do you want to switch back and forth
> between two LilyPond versions for the same score? Just install
> the same version on both machines. There is no problem with having
> several different versions of LilyPond installed in parallel on
> the same machine, and in Frescobaldi, you can even choose to
> select the LilyPond version from the \version statement (the
> setting is in Edit > Preferences > LilyPond Preferences),
> making this very convenient.
> 


Installing multiple versions of Lilypond isn’t a big deal, per se.  I have 2.22 
and 2.23.10 installed on the macOS 10.14 machine.  I don’t think there is a 
standalone install of v2.22 available for macOS 10.15 and greater, so I think 
I’d have to install MacPorts on the macOS 10.15 machine in order to get 
Lilypond 2.22.  But we can call that a simple annoyance.

The issue, for me, is that I’m trying to be conservative in upgrading to newer 
Lilypond versions.  I have around 100 hymns that get turned into just over 4000 
individual slides.  I can’t realistically inspect each slide after a version 
upgrade, so I’ve been sticking to the Lilypond stable releases for “production” 
generation of my slides.

But, as I said above, I try to do as much development as possible on the latest 
“unstable” version so as to catch problems as soon as possible.  When I first 
moved to version 2.23, I found, for example, that there was an issue with 
handling file paths that contained Unicode characters.  Once I brought the 
issue to the list, Jonas Hahnfeld was able to provide a fix with 2.23.10.

If Lilypond’s policy is as you say, then I might have to reconsider my approach 
to upgrades.  But, likely as not, I’ll just carry on trying to stick with 
stable releases.  I started out on version 2.18 and haven’t really had too much 
trouble switching back and forth between stable and unstable releases.

David F.




Re: Change to \rest markup in 2.23

2022-07-23 Thread David F.



> On Jul 20, 2022, at 5:13 AM, Thomas Morley  wrote:
> 
> Am Mi., 20. Juli 2022 um 05:58 Uhr schrieb David F. :
>> 
>> In 2.23, the rest markup command changed from taking a string to taking a 
>> duration.
>> 
>> \version "2.22"
>> \markup \rest #"4.."
>> 
>> \version "2.23"
>> \markup \rest { 4.. }
>> 
>> It would be nice if this change were backward compatible, at least for a 
>> version or two.
>> 
>> My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
>> environment I use for final “production” of scores.  But I’ve been trying to 
>> do as much development as possible in v2.23 on macOS 10.15.
>> 
>> Unfortunately, the change to the rest markup command makes going back and 
>> forth quite cumbersome.  Would be be possible to make this command take 
>> either a string or duration?
>> 
>> David F.
>> 
>> 
> 
> Well, going back and forth between 2.22.2 and new devel-version only
> works if you don't use devel-features and don't hit internal changes.
> 
> That said, below a coding which makes \rest always take a duration,
> transforming it to a string for 2.22.
> Once you settled with 2.23. simply delete it.
> Disclaimer: it's all a bit clumsy, cheeky and not tested in the wild.
> 
> \version "2.20.0"
> 
> #(begin
>  (define default-make-rest-markup make-rest-markup)
>  (define-markup-command (rest layout props duration) (ly:duration?)
>(let ((version-arg
>(if (stringduration
>(ly:duration->string duration
>(interpret-markup layout props
>  (default-make-rest-markup version-arg)
> 
> \markup \rest { 4.. }
> 
> Cheers,
>  Harm

Thanks Harm.  That seems to do the trick!

David F.




Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Jean Abou Samra  writes:

> Le 20/07/2022 à 14:57, David Kastrup a écrit :
>> The rule was used for converting all the old stuff in the repo, so it
>> wasn't broken at one point of time.  This would suggest either a Python
>> update effect or some editing.  Or for some reason this particular input
>> escapes the pattern match.
>>
>> I'll try fixing that, too.
>
> It seems to work for
>
> \markup { \note ... }
>
> but not for
>
> \markup \note ...

Yup.  matchfullmarkup does not cover the undelimited case it would seem.
And it's tricky for the likes of

\markup \with-color #red \note #"4."

to figure out the scope of the markup.  There were some patterns/rules
that did so, I think maybe in relation to the \footnote markup.  Not
sure that can of worms is a good idea to open up, but possibly covering
the trivial case at least helps.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Thomas Morley  writes:

> Am Mi., 20. Juli 2022 um 14:29 Uhr schrieb David Kastrup :
>>
>> David Kastrup  writes:
>>
>> > Jean Abou Samra  writes:
>> >
>> >> Le 20/07/2022 à 05:57, David F. a écrit :
>> >>> In 2.23, the rest markup command changed from taking a string to taking 
>> >>> a duration.
>> >>>
>> >>> \version "2.22"
>> >>> \markup \rest #"4.."
>> >>>
>> >>> \version "2.23"
>> >>> \markup \rest { 4.. }
>> >>>
>> >>> It would be nice if this change were backward compatible, at least
>> >>> for a version or two.
>> >>
>> >>
>> >> LilyPond's general policy is that backwards-incompatible syntax
>> >> changes are OK as long as a convert-ly rule is provided to update
>> >> input files automatically.
>> >>
>> >> Well, in this case there is no convert-ly rule ... I'll fix that soon.
>> >
>> > I was "what?!?!?" about this but then the convert-ly rule I did was for
>> > \note in a quite earlier version.  It's probably reasonably easy to just
>> > copy and adapt that rule.
>>
>> I'll do that.
>
> Hi David,
>
> there was some off-list discussion already.
> Looks I forgot to do some convertrule with
> https://gitlab.com/lilypond/lilypond/-/merge_requests/627
>
> Though, c/p and adjust the rule for note-markup will probably not work.
> At least for me this rule looks broken:
>
> $ cat atest-116.ly
> \version "2.18.0" \markup \note #"4."
>
> $ ../../../lilypond-git/build/out/bin/convert-ly -e atest-116.ly
> convert-ly (GNU LilyPond) 2.23.11
>
> convert-ly: Processing `atest-116.ly'...
> Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
> 2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.39, 2.19.40, 2.19.46,
> 2.19.49, 2.20.0, 2.21.0, 2.21.2, 2.23.1, 2.23.2, 2.23.3, 2.23.4,
> 2.23.5, 2.23.6, 2.23.7, 2.23.8, 2.23.9, 2.23.10, 2.23.11
>
> $ cat atest-116.ly
> \version "2.23.11" \markup \note #"4."
>
> Cheers,
>   Harm
>

The rule was used for converting all the old stuff in the repo, so it
wasn't broken at one point of time.  This would suggest either a Python
update effect or some editing.  Or for some reason this particular input
escapes the pattern match.

I'll try fixing that, too.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread Jean Abou Samra




Le 20/07/2022 à 14:57, David Kastrup a écrit :

The rule was used for converting all the old stuff in the repo, so it
wasn't broken at one point of time.  This would suggest either a Python
update effect or some editing.  Or for some reason this particular input
escapes the pattern match.

I'll try fixing that, too.


It seems to work for

\markup { \note ... }

but not for

\markup \note ...





Re: Change to \rest markup in 2.23

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 14:29 Uhr schrieb David Kastrup :
>
> David Kastrup  writes:
>
> > Jean Abou Samra  writes:
> >
> >> Le 20/07/2022 à 05:57, David F. a écrit :
> >>> In 2.23, the rest markup command changed from taking a string to taking a 
> >>> duration.
> >>>
> >>> \version "2.22"
> >>> \markup \rest #"4.."
> >>>
> >>> \version "2.23"
> >>> \markup \rest { 4.. }
> >>>
> >>> It would be nice if this change were backward compatible, at least
> >>> for a version or two.
> >>
> >>
> >> LilyPond's general policy is that backwards-incompatible syntax
> >> changes are OK as long as a convert-ly rule is provided to update
> >> input files automatically.
> >>
> >> Well, in this case there is no convert-ly rule ... I'll fix that soon.
> >
> > I was "what?!?!?" about this but then the convert-ly rule I did was for
> > \note in a quite earlier version.  It's probably reasonably easy to just
> > copy and adapt that rule.
>
> I'll do that.
>
> --
> David Kastrup

Hi David,

there was some off-list discussion already.
Looks I forgot to do some convertrule with
https://gitlab.com/lilypond/lilypond/-/merge_requests/627

Though, c/p and adjust the rule for note-markup will probably not work.
At least for me this rule looks broken:

$ cat atest-116.ly
\version "2.18.0" \markup \note #"4."

$ ../../../lilypond-git/build/out/bin/convert-ly -e atest-116.ly
convert-ly (GNU LilyPond) 2.23.11

convert-ly: Processing `atest-116.ly'...
Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.39, 2.19.40, 2.19.46,
2.19.49, 2.20.0, 2.21.0, 2.21.2, 2.23.1, 2.23.2, 2.23.3, 2.23.4,
2.23.5, 2.23.6, 2.23.7, 2.23.8, 2.23.9, 2.23.10, 2.23.11

$ cat atest-116.ly
\version "2.23.11" \markup \note #"4."

Cheers,
  Harm



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
David Kastrup  writes:

> Jean Abou Samra  writes:
>
>> Le 20/07/2022 à 05:57, David F. a écrit :
>>> In 2.23, the rest markup command changed from taking a string to taking a 
>>> duration.
>>>
>>> \version "2.22"
>>> \markup \rest #"4.."
>>>
>>> \version "2.23"
>>> \markup \rest { 4.. }
>>>
>>> It would be nice if this change were backward compatible, at least
>>> for a version or two.
>>
>>
>> LilyPond's general policy is that backwards-incompatible syntax
>> changes are OK as long as a convert-ly rule is provided to update
>> input files automatically.
>>
>> Well, in this case there is no convert-ly rule ... I'll fix that soon.
>
> I was "what?!?!?" about this but then the convert-ly rule I did was for
> \note in a quite earlier version.  It's probably reasonably easy to just
> copy and adapt that rule.

I'll do that.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Jean Abou Samra  writes:

> Le 20/07/2022 à 05:57, David F. a écrit :
>> In 2.23, the rest markup command changed from taking a string to taking a 
>> duration.
>>
>> \version "2.22"
>> \markup \rest #"4.."
>>
>> \version "2.23"
>> \markup \rest { 4.. }
>>
>> It would be nice if this change were backward compatible, at least
>> for a version or two.
>
>
> LilyPond's general policy is that backwards-incompatible syntax
> changes are OK as long as a convert-ly rule is provided to update
> input files automatically.
>
> Well, in this case there is no convert-ly rule ... I'll fix that soon.

I was "what?!?!?" about this but then the convert-ly rule I did was for
\note in a quite earlier version.  It's probably reasonably easy to just
copy and adapt that rule.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread Jean Abou Samra

Le 20/07/2022 à 05:57, David F. a écrit :

In 2.23, the rest markup command changed from taking a string to taking a 
duration.

\version "2.22"
\markup \rest #"4.."

\version "2.23"
\markup \rest { 4.. }

It would be nice if this change were backward compatible, at least for a 
version or two.



LilyPond's general policy is that backwards-incompatible syntax
changes are OK as long as a convert-ly rule is provided to update
input files automatically.

Well, in this case there is no convert-ly rule ... I'll fix that soon.



My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
environment I use for final “production” of scores.  But I’ve been trying to do 
as much development as possible in v2.23 on macOS 10.15.

Unfortunately, the change to the rest markup command makes going back and forth 
quite cumbersome.  Would be be possible to make this command take either a 
string or duration?



My answer will be a bit different from Harm's: this sounds like
an XY problem to me. Why do you want to switch back and forth
between two LilyPond versions for the same score? Just install
the same version on both machines. There is no problem with having
several different versions of LilyPond installed in parallel on
the same machine, and in Frescobaldi, you can even choose to
select the LilyPond version from the \version statement (the
setting is in Edit > Preferences > LilyPond Preferences),
making this very convenient.




Re: Change to \rest markup in 2.23

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 05:58 Uhr schrieb David F. :
>
> In 2.23, the rest markup command changed from taking a string to taking a 
> duration.
>
> \version "2.22"
> \markup \rest #"4.."
>
> \version "2.23"
> \markup \rest { 4.. }
>
> It would be nice if this change were backward compatible, at least for a 
> version or two.
>
> My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
> environment I use for final “production” of scores.  But I’ve been trying to 
> do as much development as possible in v2.23 on macOS 10.15.
>
> Unfortunately, the change to the rest markup command makes going back and 
> forth quite cumbersome.  Would be be possible to make this command take 
> either a string or duration?
>
> David F.
>
>

Well, going back and forth between 2.22.2 and new devel-version only
works if you don't use devel-features and don't hit internal changes.

That said, below a coding which makes \rest always take a duration,
transforming it to a string for 2.22.
Once you settled with 2.23. simply delete it.
Disclaimer: it's all a bit clumsy, cheeky and not tested in the wild.

\version "2.20.0"

#(begin
  (define default-make-rest-markup make-rest-markup)
  (define-markup-command (rest layout props duration) (ly:duration?)
(let ((version-arg
(if (stringstring duration
(interpret-markup layout props
  (default-make-rest-markup version-arg)

\markup \rest { 4.. }

Cheers,
  Harm



Change to \rest markup in 2.23

2022-07-19 Thread David F.
In 2.23, the rest markup command changed from taking a string to taking a 
duration.

\version "2.22"
\markup \rest #"4.."

\version "2.23"
\markup \rest { 4.. }

It would be nice if this change were backward compatible, at least for a 
version or two.

My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
environment I use for final “production” of scores.  But I’ve been trying to do 
as much development as possible in v2.23 on macOS 10.15.

Unfortunately, the change to the rest markup command makes going back and forth 
quite cumbersome.  Would be be possible to make this command take either a 
string or duration?

David F.




Re: Multimeasure rest shape and polymeter

2022-07-05 Thread Adam M. Griggs
Thanks Jean. Got them working the way I want.

Cheers!

On Mon, 4 Jul 2022, 22:43 Jean Abou Samra,  wrote:

>
>
> Le 04/07/2022 à 06:20, Adam M. Griggs a écrit :
> > Hello list,
> >
> > \enablePolymeter seems to be messing with multimeasure rests. In
> > particular, MM rests with the shape of a breve rest are being rendered
> > as semibreve MM rests. Please see the following code:
> >
> > \version "2.23.10"
> >
> > music =
> > {
> > \time 2/2
> > R1*3
> > \time 3/1
> > R\breve.*2
> > \time 2/2
> > R1*2
> > }
> >
> > \score
> > {
> > \new Staff
> > <<
> > { \skip 1*3 <> ^ "as expected" }
> > \music
> > \layout {}
> > }
> >
> > \score
> > {
> > \new Staff
> > <<
> > <> ^ "\enablePolymeter"
> > { \skip 1*3 <> ^ "semibreve rests" }
> > \music
> > \layout { \enablePolymeter }
> > }
> >
> > Is there a workaround for this?
> >
> > Thank you.
>
>
> I agree that it's a bug. I've filed
>
> https://gitlab.com/lilypond/lilypond/-/issues/6378
>
> See there for a possible workaround.
>
> Best,
> Jean
>
>


Re: Multimeasure rest shape and polymeter

2022-07-04 Thread Jean Abou Samra




Le 04/07/2022 à 06:20, Adam M. Griggs a écrit :

Hello list,

\enablePolymeter seems to be messing with multimeasure rests. In
particular, MM rests with the shape of a breve rest are being rendered
as semibreve MM rests. Please see the following code:

\version "2.23.10"

music =
{
\time 2/2
R1*3
\time 3/1
R\breve.*2
\time 2/2
R1*2
}

\score
{
\new Staff
<<
{ \skip 1*3 <> ^ "as expected" }
\music
\layout {}
}

\score
{
\new Staff
<<
<> ^ "\enablePolymeter"
{ \skip 1*3 <> ^ "semibreve rests" }
\music
\layout { \enablePolymeter }
}

Is there a workaround for this?

Thank you.



I agree that it's a bug. I've filed

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

See there for a possible workaround.

Best,
Jean




Multimeasure rest shape and polymeter

2022-07-03 Thread Adam M. Griggs
Hello list,

\enablePolymeter seems to be messing with multimeasure rests. In
particular, MM rests with the shape of a breve rest are being rendered
as semibreve MM rests. Please see the following code:

\version "2.23.10"

music =
{
\time 2/2
R1*3
\time 3/1
R\breve.*2
\time 2/2
R1*2
}

\score
{
\new Staff
<<
{ \skip 1*3 <> ^ "as expected" }
\music
>>
\layout {}
}

\score
{
\new Staff
<<
<> ^ "\enablePolymeter"
{ \skip 1*3 <> ^ "semibreve rests" }
\music
>>
\layout { \enablePolymeter }
}

Is there a workaround for this?

Thank you.



Re: How to change appearance of multimeasure rest?

2022-03-07 Thread Francesco Napoleoni
In data lunedì 7 marzo 2022 17:25:47 CET, David Kastrup ha scritto:
> \override MultiMeasureRest.usable-duration-logs = #'(0)

Yeah, a much better one, thank you!

cheers
Francesco Napoleoni






Re: How to change appearance of multimeasure rest?

2022-03-07 Thread David Kastrup
Francesco Napoleoni  writes:

> Hello everyone
>
> Given this fragment:
>
> {
>   \time 4/2
>
>   R\breve |
> }
>
> I would like the multimeasure rest printed like a semibreve rest.
>
> The following code brings me near to my goal, but...
>
> {
>   \time 4/2
>   \override MultiMeasureRest.stencil = #ly:text-interface::print
>   \override MultiMeasureRest.text = \markup \musicglyph #"rests.0"
>   \override MultiMeasureRest.staff-position = #2
>   R\breve |
> }
>
> ... the rest is slammed to the left of the measure. What am I missing?
>
> Or is there a better way to obtain what I want?

  \override MultiMeasureRest.usable-duration-logs = #'(0)

-- 
David Kastrup



How to change appearance of multimeasure rest?

2022-03-07 Thread Francesco Napoleoni
Hello everyone

Given this fragment:

{
  \time 4/2

  R\breve |
}

I would like the multimeasure rest printed like a semibreve rest.

The following code brings me near to my goal, but...

{
  \time 4/2
  \override MultiMeasureRest.stencil = #ly:text-interface::print
  \override MultiMeasureRest.text = \markup \musicglyph #"rests.0"
  \override MultiMeasureRest.staff-position = #2
  R\breve |
}

... the rest is slammed to the left of the measure. What am I missing?

Or is there a better way to obtain what I want?

Thanks in advance

ciao
Francesco Napoleoni






Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-21 Thread Kenneth Wolcott
Hi Xavier;

  I have implemented as you have suggested and it seems to work just fine.

Thanks,
Ken

On Mon, Sep 20, 2021 at 11:49 PM Xavier Scheuer  wrote:
>
> On Tue, 21 Sept 2021 at 05:01, Kenneth Wolcott  
> wrote:
> >
> > Thanks, Carl.
> >
> > Here's the erroi stream with the reduced Lilypond code.
>
> Hello Kenneth,
>
> You do not use Full Measure Rests (these appear centered horizontally in the 
> middle of the measure).
> But I would use them with \voiceTwo or  \override 
> MultiMeasureRest.staff-position = #-6
>
> tuba = {
>   \global
>   \compressMMRests { R1*14 }
>   % \compressMMRests { R1*6 }
>   <<
> {
>   \voiceTwo
>   \override MultiMeasureRest.staff-position = #-6
>   R1*6
> }
> \new CueVoice \with {
>   instrumentCueName = "Tromboni"  % suggestion
> } {
>   \voiceOne  % instead of \stemUp
>   r4 b, cs ds |
>   e4 fs gs r |
>   r4 a b cs' |
>   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
>   c''4 c''8 c'' c''4 c''8 c'' |
>   c''4 c'' c'' c'' |
>   \cueClefUnset
> }
>   >>
>   \bar "|."
> }
>
> Cheers,
> Xavier
>
> --
> Xavier Scheuer 
>



Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-21 Thread Xavier Scheuer
On Tue, 21 Sept 2021 at 05:01, Kenneth Wolcott 
wrote:
>
> Thanks, Carl.
>
> Here's the erroi stream with the reduced Lilypond code.

Hello Kenneth,

You do not use Full Measure Rests (these appear centered horizontally in
the middle of the measure).
But I would use them with \voiceTwo or  \override
MultiMeasureRest.staff-position = #-6

tuba = {
  \global
  \compressMMRests { R1*14 }
  % \compressMMRests { R1*6 }
  <<
{
  \voiceTwo
  \override MultiMeasureRest.staff-position = #-6
  R1*6
}
\new CueVoice \with {
  instrumentCueName = "Tromboni"  % suggestion
} {
  \voiceOne  % instead of \stemUp
  r4 b, cs ds |
  e4 fs gs r |
  r4 a b cs' |
  d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
  c''4 c''8 c'' c''4 c''8 c'' |
  c''4 c'' c'' c'' |
  \cueClefUnset
}
  >>
  \bar "|."
}

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-20 Thread Kenneth Wolcott
Here's the resultant pdf...attached.

On Mon, Sep 20, 2021 at 7:54 PM Kenneth Wolcott
 wrote:
>
> Thanks, Carl.
>
> Here's the erroi stream with the reduced Lilypond code.
>
> Thanke,
> Ken
>
> GNU LilyPond 2.22.1
> Processing `Hungarian_March_from_La_Damnation_de_Faust_MWE.ly'
> Parsing...
> Interpreting music...[8][8]
> Preprocessing graphical objects...
> Interpreting music...
> MIDI output to `Hungarian_March_from_La_Damnation_de_Faust_MWE.midi'...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:17: warning:
> cannot resolve rest collision: rest direction not set
>     { \stemDown
>     d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:17: warning:
> cannot resolve rest collision: rest direction not set
>     { \stemDown
> d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:35: warning:
> cannot resolve rest collision: rest direction not set
> { \stemDown d,1\rest d,1\rest
>   d,1\rest d,1\rest b1\rest b1\rest }
> Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:35: warning:
> cannot resolve rest collision: rest direction not set
> { \stemDown d,1\rest d,1\rest
>   d,1\rest d,1\rest b1\rest b1\rest }
> Converting to `Hungarian_March_from_La_Damnation_de_Faust_MWE.pdf'...
> Success: compilation successfully completed
>
> %
> \version "2.22.0"
>
> global = {
>   \language "english"
>   \time 2/2
>   \key c \major
>   \clef bass
>   \tempo "Allegro marcato" 2=88
> }
>
> \header {
>   title = "Hungarian March"
>   subtitle = "(from \"La damnation de Faust\")"
>   composer = "Berlioz"
> }
>
> tuba = {
>   \global
>   \compressMMRests { R1*14 }
> %  \compressMMRests { R1*6 }
> <<
> { \stemDown d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> \new CueVoice {
>   \stemUp r4 b, cs ds^"Tromboni" |
>   e4 fs gs r |
>   r4 a b cs' |
>   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
>   c''4 c''8 c'' c''4 c''8 c'' |
>   c''4 c'' c'' c'' |
>   \cueClefUnset
> }
>   >>
>   \bar "|."
> }
>
> \score {
>   \new Staff \with { instrumentName = "Tuba" } {
> \set Staff.midiInstrument = "tuba"
> \tuba
>   }
>   \layout {}
>   \midi {}
> }
> %
>
> On Mon, Sep 20, 2021 at 6:59 PM Carl Sorensen  wrote:
> >
> >
> >
> > On 9/20/21, 7:10 PM, "lilypond-user on behalf of Kenneth Wolcott" 
> >  > kennethwolc...@gmail.com> wrote:
> >
> >     see attachment of what looks fine (to me) even though I received the 
> > warnings...
> >
> > On Mon, Sep 20, 2021 at 6:06 PM Kenneth Wolcott
> >  wrote:
> > >
> > > why must a full measure rest (2/2) have a direction that will cause a 
> > collision?
> > >
> > >   I tried using \stemDown, but that had no effect.
> > >
> > > warning:
> > > 
> > > blah.ly:34:7: warning: cannot resolve rest collision: rest direction 
> > not set
> > > {
> > >   d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> > > ===
> > >
> > > My cue notes are well above the bass clef d, and well above the 
> > treble clef b.
> > >
> > > ++
> > > <<
> > > { d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> > > \new CueVoice {
> > >   \stemUp r4 b, cs ds'^"Tromboni" |
> > >   e4 fs gs r |
> > >   r4 a b cs' |
> > >   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
> > >   c''4 c''8 c'' c''4 c''8 c'' |
> > >   c''4 c'' c'' c'' |
> > >   \cueClefUnset
> > > }
> > >   >>
> > > +++
> >
> > Your code did not produce a warning when I compiled it in 2.22.1
> >
> > But it also didn't show the same as your screenshot.
> >
> > And it didn't have the "\language english" statement that would allow it to 
> > compile.
> >
> > Please  give us a compilable snippet that shows your problem, so I can see 
> > if it's reproducible on my machine.
> >
> > Thanks,
> >
> > Carl
> >
> >


Hungarian_March_from_La_Damnation_de_Faust_MWE.pdf
Description: Adobe PDF document


Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-20 Thread Kenneth Wolcott
Thanks, Carl.

Here's the erroi stream with the reduced Lilypond code.

Thanke,
Ken

GNU LilyPond 2.22.1
Processing `Hungarian_March_from_La_Damnation_de_Faust_MWE.ly'
Parsing...
Interpreting music...[8][8]
Preprocessing graphical objects...
Interpreting music...
MIDI output to `Hungarian_March_from_La_Damnation_de_Faust_MWE.midi'...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:17: warning:
cannot resolve rest collision: rest direction not set
{ \stemDown
d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:17: warning:
cannot resolve rest collision: rest direction not set
{ \stemDown
d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:35: warning:
cannot resolve rest collision: rest direction not set
{ \stemDown d,1\rest d,1\rest
  d,1\rest d,1\rest b1\rest b1\rest }
Hungarian_March_from_La_Damnation_de_Faust_MWE.ly:22:35: warning:
cannot resolve rest collision: rest direction not set
{ \stemDown d,1\rest d,1\rest
  d,1\rest d,1\rest b1\rest b1\rest }
Converting to `Hungarian_March_from_La_Damnation_de_Faust_MWE.pdf'...
Success: compilation successfully completed

%
\version "2.22.0"

global = {
  \language "english"
  \time 2/2
  \key c \major
  \clef bass
  \tempo "Allegro marcato" 2=88
}

\header {
  title = "Hungarian March"
  subtitle = "(from \"La damnation de Faust\")"
  composer = "Berlioz"
}

tuba = {
  \global
  \compressMMRests { R1*14 }
%  \compressMMRests { R1*6 }
<<
{ \stemDown d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
\new CueVoice {
  \stemUp r4 b, cs ds^"Tromboni" |
  e4 fs gs r |
  r4 a b cs' |
  d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
  c''4 c''8 c'' c''4 c''8 c'' |
  c''4 c'' c'' c'' |
  \cueClefUnset
}
  >>
  \bar "|."
}

\score {
  \new Staff \with { instrumentName = "Tuba" } {
\set Staff.midiInstrument = "tuba"
\tuba
  }
  \layout {}
  \midi {}
}
%

On Mon, Sep 20, 2021 at 6:59 PM Carl Sorensen  wrote:
>
>
>
> On 9/20/21, 7:10 PM, "lilypond-user on behalf of Kenneth Wolcott" 
>  kennethwolc...@gmail.com> wrote:
>
> see attachment of what looks fine (to me) even though I received the 
> warnings...
>
> On Mon, Sep 20, 2021 at 6:06 PM Kenneth Wolcott
>  wrote:
> >
> > why must a full measure rest (2/2) have a direction that will cause a 
> collision?
> >
> >   I tried using \stemDown, but that had no effect.
> >
> > warning:
> > 
> > blah.ly:34:7: warning: cannot resolve rest collision: rest direction 
> not set
> > {
> >   d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> > ===
> >
> > My cue notes are well above the bass clef d, and well above the treble 
> clef b.
> >
> > ++
> > <<
> > { d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> > \new CueVoice {
> >   \stemUp r4 b, cs ds'^"Tromboni" |
> >   e4 fs gs r |
> >   r4 a b cs' |
> >   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
> >   c''4 c''8 c'' c''4 c''8 c'' |
> >   c''4 c'' c'' c'' |
> >   \cueClefUnset
> > }
> >   >>
> > +++
>
> Your code did not produce a warning when I compiled it in 2.22.1
>
> But it also didn't show the same as your screenshot.
>
> And it didn't have the "\language english" statement that would allow it to 
> compile.
>
> Please  give us a compilable snippet that shows your problem, so I can see if 
> it's reproducible on my machine.
>
> Thanks,
>
> Carl
>
>



Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-20 Thread Carl Sorensen


On 9/20/21, 7:10 PM, "lilypond-user on behalf of Kenneth Wolcott" 
 wrote:

see attachment of what looks fine (to me) even though I received the 
warnings...

On Mon, Sep 20, 2021 at 6:06 PM Kenneth Wolcott
 wrote:
>
> why must a full measure rest (2/2) have a direction that will cause a 
collision?
>
>   I tried using \stemDown, but that had no effect.
>
> warning:
> 
> blah.ly:34:7: warning: cannot resolve rest collision: rest direction not 
set
    > {
    >   d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> ===
>
> My cue notes are well above the bass clef d, and well above the treble 
clef b.
    >
    > ++++++
    > <<
> { d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> \new CueVoice {
>   \stemUp r4 b, cs ds'^"Tromboni" |
>   e4 fs gs r |
>   r4 a b cs' |
>   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
>   c''4 c''8 c'' c''4 c''8 c'' |
>   c''4 c'' c'' c'' |
>   \cueClefUnset
> }
>   >>
> +++

Your code did not produce a warning when I compiled it in 2.22.1

But it also didn't show the same as your screenshot.

And it didn't have the "\language english" statement that would allow it to 
compile.

Please  give us a compilable snippet that shows your problem, so I can see if 
it's reproducible on my machine.

Thanks,

Carl
 



Re: why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-20 Thread Kenneth Wolcott
see attachment of what looks fine (to me) even though I received the warnings...

On Mon, Sep 20, 2021 at 6:06 PM Kenneth Wolcott
 wrote:
>
> why must a full measure rest (2/2) have a direction that will cause a 
> collision?
>
>   I tried using \stemDown, but that had no effect.
>
> warning:
> 
> blah.ly:34:7: warning: cannot resolve rest collision: rest direction not set
>     {
>   d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> ===
>
> My cue notes are well above the bass clef d, and well above the treble clef b.
>
> ++++++
> <<
> { d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
> \new CueVoice {
>   \stemUp r4 b, cs ds'^"Tromboni" |
>   e4 fs gs r |
>   r4 a b cs' |
>   d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
>   c''4 c''8 c'' c''4 c''8 c'' |
>   c''4 c'' c'' c'' |
>   \cueClefUnset
> }
>   >>
> +++
>
> Thanks,
> Ken Wolcott


why must a full measure rest (2/2) have a direction that will cause a collision?

2021-09-20 Thread Kenneth Wolcott
why must a full measure rest (2/2) have a direction that will cause a collision?

  I tried using \stemDown, but that had no effect.

warning:

blah.ly:34:7: warning: cannot resolve rest collision: rest direction not set
{
  d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
===

My cue notes are well above the bass clef d, and well above the treble clef b.

++
<<
{ d,1\rest d,1\rest d,1\rest d,1\rest b1\rest b1\rest }
\new CueVoice {
  \stemUp r4 b, cs ds'^"Tromboni" |
  e4 fs gs r |
  r4 a b cs' |
  d'4 ds' e' \cueClef "treble" \tuplet 3/2 { c''8 c'' c'' } |
  c''4 c''8 c'' c''4 c''8 c'' |
  c''4 c'' c'' c'' |
  \cueClefUnset
}
  >>
+++

Thanks,
Ken Wolcott



Re: Convert rest to spacer

2021-09-13 Thread Leo Correia de Verdier
Thanks a lot! 

Especially for the extending lilypond doc, which I knew is out there but didn’t 
know the name of and couldn’t find. Great work!

> 13 sep. 2021 kl. 16:07 skrev Jean Abou Samra :
> 
> Le 13/09/2021 à 15:49, Leo Correia de Verdier a écrit :
>> Dear list!
>> 
>> How would I go about to write a scheme function that converts all rests in a 
>> passage of music to spacer rests?
>> 
>> Thanks in advance!
>> 
>> /Leo
> 
> 
> \version "2.22.1"
> 
> restsToSkips =
> #(define-music-function (music) (ly:music?)
>(music-map
>  (lambda (m)
>(if (music-is-of-type? m 'rest-event)
>(make-music 'SkipEvent m)
>m))
>  music))
> 
> \restsToSkips { r1 c'2 s4 r4 }
> 
> 
> Some explanations about music-map, music-is-of-type?
> and make-music are at
> https://extending-lilypond.readthedocs.io/en/latest/music.html#music-expressions
> 
> Best,
> Jean
> 
> 



Re: Convert rest to spacer

2021-09-13 Thread Jean Abou Samra

Le 13/09/2021 à 15:49, Leo Correia de Verdier a écrit :

Dear list!

How would I go about to write a scheme function that converts all rests in a 
passage of music to spacer rests?

Thanks in advance!

/Leo



\version "2.22.1"

restsToSkips =
#(define-music-function (music) (ly:music?)
   (music-map
 (lambda (m)
   (if (music-is-of-type? m 'rest-event)
   (make-music 'SkipEvent m)
   m))
 music))

\restsToSkips { r1 c'2 s4 r4 }


Some explanations about music-map, music-is-of-type?
and make-music are at
https://extending-lilypond.readthedocs.io/en/latest/music.html#music-expressions

Best,
Jean





Convert rest to spacer

2021-09-13 Thread Leo Correia de Verdier
Dear list!

How would I go about to write a scheme function that converts all rests in a 
passage of music to spacer rests?

Thanks in advance!

/Leo


Re: Convert rest to spacer

2021-09-13 Thread Leo Correia de Verdier
Basically, change all RestEvent:s into SkipEvent:s

> 13 sep. 2021 kl. 15:49 skrev Leo Correia de Verdier 
> :
> 
> Dear list!
> 
> How would I go about to write a scheme function that converts all rests in a 
> passage of music to spacer rests?
> 
> Thanks in advance!
> 
> /Leo




Re: how to create the same appearance of a full-measure rest in spite of time signature?

2021-08-08 Thread Kenneth Wolcott
Thank you!

On Sun, Aug 8, 2021 at 4:06 PM Carl Sorensen  wrote:
>
>
>
> On 8/8/21, 5:01 PM, "lilypond-user on behalf of Kenneth Wolcott" 
>  kennethwolc...@gmail.com> wrote:
>
> Hello again,
>
>   An update to my earlier question.  I'm engraving a piece now that
> uses 5/4 and 6/4 time signatures.  I have a full measure rest for one
> of each time signatures.  I'd like to have a single rest note for
> those measures, not "r1 r4" and not "r1 r2".  How to do that?\
>
> R1*5/4 in 5/4
> R1*6/4 or R1. In 6/4
>
> HTH,
>
> Carl
>
>
>   What about "9/8"? Etc...things that don't have a denominator of 4.
>
> Thanks,
> Ken
>
> On Tue, Jul 27, 2021 at 7:27 PM David Kastrup  wrote:
> >
> > Kenneth Wolcott  writes:
> >
> > > Well, that was stupid of me :-(
> > >
> > > I replaced, in the current engraving, "r2." with "R2.".
> > >
> > > It works as I had desired.
> >
> > LilyPond still needs you to specify the duration, yes, even though the
> > appearance is almost always the same (there are exceptions like 3/1
> > meter where using a semibreve rest would be too confusing).
> >
> > > Sorry for the noise.
> >
> > Happens.
> >
> > --
> > David Kastrup
>
>
>



Re: how to create the same appearance of a full-measure rest in spite of time signature?

2021-08-08 Thread Carl Sorensen


On 8/8/21, 5:01 PM, "lilypond-user on behalf of Kenneth Wolcott" 
 wrote:

Hello again,

  An update to my earlier question.  I'm engraving a piece now that
uses 5/4 and 6/4 time signatures.  I have a full measure rest for one
of each time signatures.  I'd like to have a single rest note for
those measures, not "r1 r4" and not "r1 r2".  How to do that?\

R1*5/4 in 5/4
R1*6/4 or R1. In 6/4

HTH,

Carl


  What about "9/8"? Etc...things that don't have a denominator of 4.

Thanks,
Ken

On Tue, Jul 27, 2021 at 7:27 PM David Kastrup  wrote:
>
> Kenneth Wolcott  writes:
>
> > Well, that was stupid of me :-(
> >
> > I replaced, in the current engraving, "r2." with "R2.".
> >
> > It works as I had desired.
>
> LilyPond still needs you to specify the duration, yes, even though the
> appearance is almost always the same (there are exceptions like 3/1
> meter where using a semibreve rest would be too confusing).
>
> > Sorry for the noise.
>
> Happens.
>
> --
> David Kastrup





Re: how to create the same appearance of a full-measure rest in spite of time signature?

2021-08-08 Thread Kenneth Wolcott
Hello again,

  An update to my earlier question.  I'm engraving a piece now that
uses 5/4 and 6/4 time signatures.  I have a full measure rest for one
of each time signatures.  I'd like to have a single rest note for
those measures, not "r1 r4" and not "r1 r2".  How to do that?

  What about "9/8"? Etc...things that don't have a denominator of 4.

Thanks,
Ken

On Tue, Jul 27, 2021 at 7:27 PM David Kastrup  wrote:
>
> Kenneth Wolcott  writes:
>
> > Well, that was stupid of me :-(
> >
> > I replaced, in the current engraving, "r2." with "R2.".
> >
> > It works as I had desired.
>
> LilyPond still needs you to specify the duration, yes, even though the
> appearance is almost always the same (there are exceptions like 3/1
> meter where using a semibreve rest would be too confusing).
>
> > Sorry for the noise.
>
> Happens.
>
> --
> David Kastrup



Re: how to create the same appearance of a full-measure rest in spite of time signature?

2021-07-27 Thread David Kastrup
Kenneth Wolcott  writes:

> Well, that was stupid of me :-(
>
> I replaced, in the current engraving, "r2." with "R2.".
>
> It works as I had desired.

LilyPond still needs you to specify the duration, yes, even though the
appearance is almost always the same (there are exceptions like 3/1
meter where using a semibreve rest would be too confusing).

> Sorry for the noise.

Happens.

-- 
David Kastrup



Re: how to create the same appearance of a full-measure rest in spite of time signature?

2021-07-27 Thread Kenneth Wolcott
Well, that was stupid of me :-(

I replaced, in the current engraving, "r2." with "R2.".

It works as I had desired.

Sorry for the noise.

Thanks,
Ken Wolcott

On Tue, Jul 27, 2021 at 6:53 PM Kenneth Wolcott 
wrote:

> Hi,
>
>   I have many engravings for various time signatures of 2/4, 3/4, 4/4, 6/4
> 3/8 6/8, etc.
>
>   I would like single full-measure rests to have the same appearance
> independent of the time signature.
>
>   Apparently other music scoring software applications have this ability.
>
>   I thought at first that I could use "R" to do this without any duration,
> but doing that does not work.
>
>   I looked at Learning, Notation and Snippets; I did not find what I was
> looking for.
>
> Thanks,
> Ken Wolcott
>


how to create the same appearance of a full-measure rest in spite of time signature?

2021-07-27 Thread Kenneth Wolcott
Hi,

  I have many engravings for various time signatures of 2/4, 3/4, 4/4, 6/4
3/8 6/8, etc.

  I would like single full-measure rests to have the same appearance
independent of the time signature.

  Apparently other music scoring software applications have this ability.

  I thought at first that I could use "R" to do this without any duration,
but doing that does not work.

  I looked at Learning, Notation and Snippets; I did not find what I was
looking for.

Thanks,
Ken Wolcott


Re: Rest, skip, or silent notes?

2021-06-02 Thread Bernhard Kleine
Hi Lucas,

I would like to thank you again. The NullVoice advice has been most
valable. In the meantime I have written a couple of other songs, where
NullVoice spared me much work.

This advice is highly appreciated.

Thanks again.

Best Bernhard

Am 23.05.2021 um 15:33 schrieb Lukas-Fabian Moser:
> Hi Bernhard,
>
> Am 23.05.21 um 10:40 schrieb Bernhard Kleine:
>> I have another problem with the score I presented lately:
>>
>> There is a different start for stanza 2 as shown in the attachment. I
>> donot know how to code this. The MWE is attached, too.
>
> Actually, that is not a MWE (_minimal_ working example): There's lots
> of variables and notes and complicated structure unrelated to the
> problem. Hence, it was easier for me to just create a new one. Try:
>
> \version "2.21.1"
> \language "deutsch"
>
> <<
>   \new Staff \with { \clef bass }
>   <<
>     \new Voice = bassMain \relative {
>   \time 3/4
>   fis( h,) e
>   r a a,8 r
>   r4 a' a,8 r
>     }
>     \new NullVoice = bassAlternative {
>   s2.
>   s4 4( 8) r
>   s4 4( 8) r
>     }
>   >>
>   \new Lyrics \lyricsto bassMain {
>     \set stanza = "1."
>     Mä -- del gib acht! gib acht!
>   }
>   \new Lyrics \lyricsto bassAlternative {
>     \set stanza = "2."
>     m __ m __
>   }
>   \new Lyrics \lyricsto bassAlternative {
>     \set stanza = "3."
>     hm __ hm __
>   }
> >>
>
> If you want to have the dotted slurs, that's possible as well, but one
> has to make sure that they do not influence the syllable distribution
> for the first verse. For this, there are several possibilites - for
> example, one using melismaBusyProperties and one using
> ignoreMelismata. Holler if you need help with those! (And there's also
> the dirty solution of using phrasing slurs \( \) as a replacement for
> actual slurs, but I guess this solution would be frowned upon.)
>
> Lukas
>
-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auf mein neues Buch "670 Falterarten im Hochschwarzwald" aufmerksam 
machen 
(Infos bei mir)
-
thunderbird
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




OpenPGP_signature
Description: OpenPGP digital signature


Re: Rest, skip, or silent notes?

2021-05-23 Thread Knute Snortum
On Sun, May 23, 2021 at 8:00 AM Lukas-Fabian Moser  wrote:
>
> Hi Bernhard,
>
> > What I did not find was NullVoice. Even while it can be found by google,
> > the term does not seem to appear in the German documentation for unknown
> > reasons.
>
> The German documentation is lagging behind a bit. Of course everybody
> (me, you, ...) would be invited to help improve them, but of course
> often it's a matter of time and resources.
>
> I've made a habit of making sure, after searching something using a web
> search engine like Google, that
>
> a) I'm looking at a recent version of the documentation: For example, if
> Google leads to you
> http://lilypond.org/doc/v2.18/Documentation/notation/techniques-specific-to-lyrics
> you can simply replace 2.18 by 2.22 in the URL

I've found that a search like this:

site:lilypond.org 2.22 

... or even just:

lilypond 2.22 

... will often as not bring up the correct version of the documentation.



Re: Rest, skip, or silent notes?

2021-05-23 Thread Lukas-Fabian Moser

Hi Bernhard,


What I did not find was NullVoice. Even while it can be found by google,
the term does not seem to appear in the German documentation for unknown
reasons.


The German documentation is lagging behind a bit. Of course everybody 
(me, you, ...) would be invited to help improve them, but of course 
often it's a matter of time and resources.


I've made a habit of making sure, after searching something using a web 
search engine like Google, that


a) I'm looking at a recent version of the documentation: For example, if 
Google leads to you 
http://lilypond.org/doc/v2.18/Documentation/notation/techniques-specific-to-lyrics 
you can simply replace 2.18 by 2.22 in the URL


b) I'm reading the English version of the documentation. I've never 
found out how to keep the browser from displaying the German version 
first, but you can always switch to English using the button at the 
bottom of the page ("Andere Sprachen").


Lukas




Re: Rest, skip, or silent notes?

2021-05-23 Thread Jean Abou Samra

Le 23/05/2021 à 16:49, Bernhard Kleine a écrit :

Am 23.05.2021 um 15:33 schrieb Lukas-Fabian Moser:

\version "2.21.1"
\language "deutsch"

<<
   \new Staff \with { \clef bass }
   <<
     \new Voice = bassMain \relative {
   \time 3/4
   fis( h,) e
   r a a,8 r
   r4 a' a,8 r
     }
     \new NullVoice = bassAlternative {
   s2.
   s4 4( 8) r
   s4 4( 8) r
     }
   >>
   \new Lyrics \lyricsto bassMain {
     \set stanza = "1."
     Mä -- del gib acht! gib acht!
   }
   \new Lyrics \lyricsto bassAlternative {
     \set stanza = "2."
     m __ m __
   }
   \new Lyrics \lyricsto bassAlternative {
     \set stanza = "3."
     hm __ hm __
   }

Thank you Lukas.

What I did not find was NullVoice. Even while it can be found by google,
the term does not seem to appear in the German documentation for unknown
reasons.


Hello,

In the English version, it is here:

http://lilypond.org/doc/v2.22/Documentation/notation/techniques-specific-to-lyrics#polyphony-with-shared-lyrics

The German documentation misses that section. More generally, the German 
translation of the documentation has been lagging behind for quite a 
while due to lack of volunteers. If you want that changed, read the 
contributor's guide and start translating ;-)


http://lilypond.org/doc/v2.23/Documentation/contributor/translating-the-documentation

(By the way, do you know that there is a German-speaking forum? 
https://lilypondforum.de/index.php)


Best,
Jean



Re: Rest, skip, or silent notes?

2021-05-23 Thread Bernhard Kleine

Am 23.05.2021 um 15:33 schrieb Lukas-Fabian Moser:
> \version "2.21.1"
> \language "deutsch"
>
> <<
>   \new Staff \with { \clef bass }
>   <<
>     \new Voice = bassMain \relative {
>   \time 3/4
>   fis( h,) e
>   r a a,8 r
>   r4 a' a,8 r
>     }
>     \new NullVoice = bassAlternative {
>   s2.
>   s4 4( 8) r
>   s4 4( 8) r
>     }
>   >>
>   \new Lyrics \lyricsto bassMain {
>     \set stanza = "1."
>     Mä -- del gib acht! gib acht!
>   }
>   \new Lyrics \lyricsto bassAlternative {
>     \set stanza = "2."
>     m __ m __
>   }
>   \new Lyrics \lyricsto bassAlternative {
>     \set stanza = "3."
>     hm __ hm __
>   }
> >> 

Thank you Lukas.

What I did not find was NullVoice. Even while it can be found by google,
the term does not seem to appear in the German documentation for unknown
reasons.

KR Bernhard

-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auf mein neues Buch "670 Falterarten im Hochschwarzwald" aufmerksam 
machen 
(Infos bei mir)
-
thunderbird
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



OpenPGP_signature
Description: OpenPGP digital signature


Re: Rest, skip, or silent notes?

2021-05-23 Thread Lukas-Fabian Moser

Hi Bernhard,

Am 23.05.21 um 10:40 schrieb Bernhard Kleine:

I have another problem with the score I presented lately:

There is a different start for stanza 2 as shown in the attachment. I
donot know how to code this. The MWE is attached, too.


Actually, that is not a MWE (_minimal_ working example): There's lots of 
variables and notes and complicated structure unrelated to the problem. 
Hence, it was easier for me to just create a new one. Try:


\version "2.21.1"
\language "deutsch"

<<
  \new Staff \with { \clef bass }
  <<
    \new Voice = bassMain \relative {
  \time 3/4
  fis( h,) e
  r a a,8 r
  r4 a' a,8 r
    }
    \new NullVoice = bassAlternative {
  s2.
  s4 4( 8) r
  s4 4( 8) r
    }
  >>
  \new Lyrics \lyricsto bassMain {
    \set stanza = "1."
    Mä -- del gib acht! gib acht!
  }
  \new Lyrics \lyricsto bassAlternative {
    \set stanza = "2."
    m __ m __
  }
  \new Lyrics \lyricsto bassAlternative {
    \set stanza = "3."
    hm __ hm __
  }
>>

If you want to have the dotted slurs, that's possible as well, but one 
has to make sure that they do not influence the syllable distribution 
for the first verse. For this, there are several possibilites - for 
example, one using melismaBusyProperties and one using ignoreMelismata. 
Holler if you need help with those! (And there's also the dirty solution 
of using phrasing slurs \( \) as a replacement for actual slurs, but I 
guess this solution would be frowned upon.)


Lukas




Re: Rest, skip, or silent notes?

2021-05-23 Thread Bernhard Kleine
I solved it to some degree as you can see in the attachment. When the
"1. Mädel" und "gib acht" are horizontly aligned this problem would be
solved. My knowledge of Liliypond is not deep enough to do so.

Any help welcome. Maybe there are other solutions, but with "rest, skip"
in google I come always back to contributions not helpful to the current
problem.

Regards Bernhard

Am 23.05.2021 um 10:40 schrieb Bernhard Kleine:
> I have another problem with the score I presented lately:
>
> There is a different start for stanza 2 as shown in the attachment. I
> donot know how to code this. The MWE is attached, too.
>
> KR Bernhard
>
-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auf mein neues Buch "670 Falterarten im Hochschwarzwald" aufmerksam 
machen 
(Infos bei mir)
-
thunderbird
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

\version "2.21.1"
\language "deutsch"

\header {
  title = "Ländler"
  subsubtitle = "Worte von E.Ferd. Malkowsky"
  instrument = "vierstimmigen Chor a capella"
  composer = "Richerd Gompf"
  meter = "Allegro con moto"
  tagline = "Bernhard Kleine 2021"
}

\paper {
  #(set-paper-size "b4")
}

global = {
  \key d \major
  \numericTimeSignature
  \time 3/4
  \autoBeamOff
  \tempo "Grazioso"
}

soprano = \relative c'' {
  \global
  % Die Noten folgen hier.
cis8 ([d]) cis ([d]) cis4 | cis8 ([h]) cis ([h]) cis ([h]) | a4 r r| R2. 
  
}
dynamicI = {
%2  
   s2.*4

}

alto = \relative c'' {
  \global
  % Die Noten folgen hier.
  a4. a8 a4 | dis, a' gis | a r r | R2. 
  
}

tenor = \relative c' {
  \global
  % Die Noten folgen hier.
   e8 ([fis!]) e ([fis]) e4 | a, dis d | cis r r | s4 d2\rest 
   
}

bass = \relative c {
  \global
  % Die Noten folgen hier.
  e4_. e,_. e'_. s2.*3
}

dynamicIL = {
%2
  s2. | s4 s2\> | s4. s8\! s4 | s2.
}

bassVoiceStA = \relative c { 
  \global
   s2.  fis4 (h,) e | r
   
}
bassVoiceStB = \relative c { 
  \global
s2. s2.  | r4 a' a,8 r | r4 a' a,8 r8
}

altoVerseOne = \lyricmode {
  \set stanza = "1."
  % Liedtext folgt hier.
  Lenz ist da, Mä -- del, gib acht!  
}

altoVerseTwo = \lyricmode {
  \set stanza = "2."
  % Liedtext folgt hier.
  Tra -- la -- la, sucht ei-- nen Schatz!
}

altoVerseThree = \lyricmode {
  \set stanza = "3."
  % Liedtext folgt hier.
  Lieb -- ste an, spitzt sich der Mund!
}

verseBassVoiceOneA = \lyricmode {
  % Liedtext folgt hier. gis''' ais a g a f fis e
  \set stanza = "1"
  Mä -- del 
}
verseBassVoiceOneB = \lyricmode {
  % Liedtext folgt hier. gis''' ais a g a f fis e
  gib acht! gib acht! 
}
verseBassVoiceTwo = \lyricmode {
  \set stanza = "2"
   m_ _  m_ _
}
verseBassVoiceThree = \lyricmode {
  \set stanza = "3"
   hm _ hm _
}  

choirPartI = \new ChoirStaff <<
  \new Staff = "sa" \with {
instrumentName = \markup \center-column { "Sopran" "Alt" }
  } <<
\new Dynamics = "page1"  \with {
  alignAboveContext = "sa"
} \dynamicI
\new Voice = "soprano" { \voiceOne \soprano }
\new Voice = "alto" { \voiceTwo \alto }

  >>
  \new Lyrics \lyricsto "alto" \altoVerseOne
  \new Lyrics \lyricsto "alto" \altoVerseTwo
  \new Lyrics \lyricsto "alto" \altoVerseThree
   
  \new Staff = "tb" \with {
instrumentName = \markup \center-column { "Tenor" "Bass" }
  } <<
\clef bass
\new Voice = "tenor" { \voiceOne \tenor }
\new Voice = "bass" { \voiceTwo \bass }
\new Voice = "bbassA" { \voiceTwo \bassVoiceStA }
\new Voice = "bbassB" { \voiceTwo \bassVoiceStB }
\new Dynamics = "page1L"  \with {
  alignBelowContext = "tb"
} \dynamicIL
>>
  
  \new Lyrics = "bbasslyricsOne" \with {
alignBelowContext = "page1L"  
  } \lyricsto "bbassA" \verseBassVoiceOneA
  \new Lyrics = "bbasslyricsTwo" \with {
alignBelowContext = "page1L"  
  } \lyricsto "bbassB" \verseBassVoiceOneB
  \new Lyrics = "bbasslyricsTwo" \with {
alignBelowContext = "bbassB"  
  } \lyricsto "bbassB" \verseBassVoiceTwo
  \new Lyrics = "bbasslyricsTwo" \with {
alignBelowContext = "bbassB"  
  } \lyricsto "bbassB" \verseBassVoiceThree
>>


\score {
  \choirPartI
  \layout { }
}

 

testtwolaendlerr.pdf
Description: Adobe PDF document


OpenPGP_signature
Description: OpenPGP digital signature


Re: updating "display multi measure rest span"

2021-04-25 Thread fremoin

Le 25/04/2021 à 20:32, Jean Abou Samra a écrit :
(...)


The length of the measure is not taken into account
at all. Here's a fixed version:

(...)

Work great, many thanks !
Regards,
Frédéric




Re: updating "display multi measure rest span"

2021-04-25 Thread Jean Abou Samra



Le 25/04/2021 à 17:58, fremoin a écrit :

Hello,

Le 29/03/2021 à 12:31, Thomas Morley a écrit :
(...)

Here a fixed version:


This version works nicely with \time 4/4 but gives an odd result with 
other \time :


%
\version "2.23.2"

\layout {
  \override Score.BarNumber.break-visibility = ##(#t #t #t)
}

fancyMultiMeasureRestNumber = {
  \applyOutput Voice.MultiMeasureRestNumber
  #(lambda (g c p)
 (let* ((currentBarNumber (ly:context-property c 'currentBarNumber))
    (mmr (ly:grob-parent g X))
    (mmr-length
 (ly:moment-main
  (ly:prob-property (ly:grob-property mmr 'cause) 'length
   (ly:grob-set-property! g 'text
 #{
   \markup
   \center-column {
 #(number->string mmr-length)
 %% value found by try and error
 \translate #'(0 . -7.5)
 \with-dimensions #empty-interval #empty-interval
 \halign #CENTER
 \line
 #(list (number->string currentBarNumber)
    " - "
    (number->string (1- (+ currentBarNumber mmr-length
   }
 #})))
  \compressEmptyMeasures
}

{
  \time 2/4 c'2 \fancyMultiMeasureRestNumber R2*14 c'2
  \time 4/4 c'1 \fancyMultiMeasureRestNumber R1*14 c'1
  \time 3/4 c'2. \fancyMultiMeasureRestNumber R2.*14 c'2.
  \time 6/8 c'2. \fancyMultiMeasureRestNumber R2.*14 c'2.
}
%%%

But I'm absolutely unable to find what's wrong...

Regards,
Frédéric



The length of the measure is not taken into account
at all. Here's a fixed version:

\version "2.23.3"

\layout {
  \override Score.BarNumber.break-visibility = ##(#t #t #t)
}

fancyMultiMeasureRestNumber = {
  \applyOutput Voice.MultiMeasureRestNumber
  #(lambda (g c p)
 (let* ((currentBarNumber (ly:context-property c 'currentBarNumber))
    (measureLength (ly:context-property c 'measureLength))
    (cause (event-cause g))
    (mmr-length (ly:event-property cause 'length))
    (mmr-number
 (ly:moment-main (ly:moment-div mmr-length measureLength
   (ly:grob-set-property! g 'text
 #{
   \markup
   \center-column {
 #(number->string mmr-number)
 %% value found by try and error
 \translate #'(0 . -7.5)
 \with-dimensions #empty-interval #empty-interval
 \halign #CENTER
 \line
 #(list (number->string currentBarNumber)
    " - "
    (number->string (1- (+ currentBarNumber mmr-number
   }
 #})))
  \compressEmptyMeasures
}

{
  \time 2/4 c'2 \fancyMultiMeasureRestNumber R2*14 c'2
  \time 4/4 c'1 \fancyMultiMeasureRestNumber R1*14 c'1
  \time 3/4 c'2. \fancyMultiMeasureRestNumber R2.*14 c'2.
  \time 6/8 c'2. \fancyMultiMeasureRestNumber R2.*14 c'2.
}

Best,
Jean




  1   2   3   4   5   6   7   8   9   10   >