layout-set-staff-size seems to mess with \override Rest.staff-position

2022-06-08 Thread Adam M. Griggs
Hello list,

#(layout-set-staff-size) seems to mess with vertical positioning for
r\longa, r\breve and multimeasure rests. Please see the attached
not-quite-minimal code sample.

If I adjust the score (book) size via #(set-global-staff-size)
instead, everything works as expected.

In case I'm missing something obvious, I just wanted to check in here
before submitting this as a bug.



On a related note, the two different methods of changing the staff
size yield different horizontal spacing. How can I avoid this? I'm
preparing a single book with scores ranging from six parts to over
twenty, so I need to alter this on the score level and the results
aren't ideal.
\version "2.23.9"

%#(set-global-staff-size 12)

notes = \relative d' { \time 2/2 R1*7 r2 d2 f4 e d2 }
incipitNotes =
\relative c'
{
	\time 2/2
	r\longa
	\override Rest.staff-position = #-2
	r\breve
	\override Rest.staff-position = #-4
	r1
	r2
	d2 f4 e d2
}

\score {
	\new Staff \with { instrumentName = "" }
	{
	\incipit { \cadenzaOn \incipitNotes }
	\compressMMRests \notes
	}
	\layout {
		#(layout-set-staff-size 12)
		indent = #44
		incipit-width = #40
	}
}


Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi Ya;

  Thank you for showing me the  "\set Voice.midiExpression" idea.

Ken

On Tue, Jun 7, 2022 at 12:11 AM Ya Gloops  wrote:
>
> May be mix with \set Voice.midiExpression=#1 ...
>
> \version "2.22.2"
>
>
> % Massenet: Meditation, from "Thais"
>
>
> global = {
>   \language "english"
>   \numericTimeSignature
>   \time 4/4
>   \key d \major
>   \tempo "Andante religioso"
> }
>
>
> \header {
>   title = "Meditation"
>   subtitle = "(from \"Thais\")"
>   composer = "Massenet"
>   arranger = "arr. David Bruce"
> }
>
>
> animando = ^\markup { \upright \fontsize #3 "animando" }
> a_tempo = ^\markup { \upright \fontsize #3 "a tempo" }
> espressivo = ^\markup { \upright \fontsize #3 "espressivo" }
> papa = ^\markup { \upright \fontsize #3 "poco a poco appassionato" }
> pma = ^\markup { \upright \fontsize #3 "piu mosso, agito" }
> ppa = ^\markup { \upright \fontsize #3 "poco piu appassionato" }
> poco_rit = ^\markup { \upright \fontsize #3 "poco rit." }
> rit = ^\markup { \upright \fontsize #3 "rit..." }
> up_cresc = ^\markup { \upright \fontsize #3 "cresc..." }
> my_cresc = _\markup { \italic "cresc."}
> my_dim = _\markup { \italic "dim."}
>
>
> contrabass = {
>   \global
>   \clef bass
>   R1| % m01
>   R1| % m02
>   fs2%\mp
>   ~ fs8 d \tuplet 3/2 { a,8(d fs) }  | % m03
>   b2(cs'4 d')   | % m04
> \break
>   d4.(e8) \tuplet 5/4 { fs16(g fs e fs) }  a8 a,  | % m05
>   b,2. cs8 d  | % m06
>   fs8 e g2 ds8 e  | % m07
>   fs8 g a b b4 b, | % m08
> \break
>   cs2 d4 e16(d cs d)  | % m09
>   e2\rit f| % m10
>   fs2\a_tempo ~ fs8 d \tuplet 3/2 { a, d fs}  | % m11
>   b2 cs'4 d'  | % m12
> \break
>   fs2 ~ fs8. d16 a, d fs a | % m13
>   c'2 d'4 e'   | % m14
>   fs'2 ~ fs'8 cs' \tuplet 3/2 { b fs ds }  | % m15
>   \tuplet 3/2 { a4 g8 }
>   \tuplet 3/2 { e8 b, g, }
>   \tuplet 3/2 { fs4 e8 }
>   \tuplet 3/2 { b,8 g, e, }| % m16
> \break
>   \tuplet 3/2 { d4 a,8 } \tuplet 3/2 { fs,8 d a,} b,4 cs8 d  | % m17
>   e2 fs4 g   | % m18
>   e4 fs b, e | % m19
>   << { d2 cs | } \\ { s8\> s s2\rit s8 s\! } >>% m20
> \break
>   | % m21
>   | % m22
>   | % m23
>   | % m24
> \break
>   | % m25
>   | % m26
>   | % m27
>   | % m28
> \break
>   | % m29
>   | % m30
>   | % m31
>   | % m32
> \break
>   | % m33
>   | % m34
>   | % m35
> \break
>   | % m36
>   | % m37
>   | % m38
>   | % m39
> \break
>   | % m40
>   | % m41
>   | % m42
>   | % m43
> \break
>   | % m44
>   | % m45
>   | % m46
>   | % m47
> \break
>   | % m48
>   | % m49
>   | % m50
>   | % m51
> \break
>   | % m52
>   | % m53
>   | % m54
>   | % m55
> \break
>   | % m56
>   | % m57
>   | % m58
>   | % m59
> \break
>   | % m60
>   | % m61
>   | % m62
>   | % m63
> \break
>   | % m64
>   | % m65
>   | % m66
>   | % m67
> \break
>   | % m68
>   | % m69
>   | % m70
>   | % m71
>   \bar "|."
> }
>
>
> rh_one = {
>   \global
>   \clef treble
>   b'2\rest%\ppp
>   8  4  | % m01
>   b'2\rest 8  4  | % m02
>   b'2\rest 8  4  | % m03
>   b'2\rest 8  4  | % m04
> \break
>   b'2\rest 8  4  | % m05
>   b'2\rest 8  4  | % m06
>   b'2\rest 8  4| % m07
>   b'2\rest 8  4| % m08
> \break
>   b'8\rest  g' cs'' b'\rest  g' d''  | % m09
>   b'8\rest  a' e'' b'\rest  bf' f''  | % m10
>   b'2\rest 8  4| % m11
>   b'2\rest 8  4| % m12
> \break
>   b'2\rest 8  4| % m13
>   b'2\rest 8  4  | % m14
>   b'2\rest 8  4  | % m15
>   b'2\rest 8  4  | % m16
> \break
>   d''1\rest   | % m17
>   b'8\rest b' g' b' g' b' e'' b'  | % m18
>   b'8\rest g' b' g' b'\rest g' b' g'  | % m19
>   b'8\rest g'\> b' g' b'\rest g' b' g'\!  | % m20
> \break
>   | % m21
>   | % m22
>   | % m23
>   | % m24
> \break
>   | % m25
>   | % m26
>   | % m27
>   | % m28
> \break
>   | % m29
>   | % m30
>   | % m31
>   | % m32
> \break
>   | % m33
>   | % m34
>   | % m35
> \break
>   | % m36
>   | % m37
>   | % m38
>   | % m39
> \break
>   | % m40
>   | % m41
>   | % m42
>   | % m43
> \break
>   | % m44
>   | % m45
>   | % m46
>   | % m47
> \break
>   | % m48
>   | % m49
>   | % m50
>   | % m51
> \break
>   | % m52
>   | % m53
>   | % m54
>   | % m55
> \break
>   | % m56
>   | % m57
>   | % m58
>   | % m59
> \break
>   | % m60
>   | % m61
>   | % m62
>   | % m63
> \break
>   | % m64
>   | % m65
>   | % m66
>   | % m67
> \break
>   | % m68
>   | % m69
>   | % m70
>   | % m71
>   \bar "|."
> }
>
>
> rh_two = {
>   \global
>   \clef treble
>   s1  | % m01
>   s1  | % m02
>   s1  | % m03
>   s1  | % m04
> \break
>   s1  | % m05
>   s1  | % m06
>   s1  | % m07
>   s1  | % m08
> 

Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi Peter;

  Thank you very much for helping me connect the Dynamics context with
the GrandStaff; I just did not grasp this previously.

  I definitely need to start implementing the Dynamics context in my
Lilypond projects.

Ken

On Mon, Jun 6, 2022 at 11:15 PM  wrote:
>
> > "Kenneth" == Kenneth Wolcott  writes:
>
> Kenneth>   Frequently I have engraved music that doesn't sound good
> Kenneth> when the corresponding midi is played, usually with regards
> Kenneth> to two (or more) instruments that are overwhelmed by one of
> Kenneth> them.
>
> There are ways to set the dynamic range for each instrument.  See
> https://lilypond.org/doc/v2.22/Documentation/internals/dynamic_005fperformer
>
> Kenneth>   In this case, I have a piece which has a Contrabass with
> Kenneth> Piano accompaniment, with two different kinds of unwanted
> Kenneth> domination.  In the first case I have to specify the dynamics
> Kenneth> for the right hand and the left hand separately (a human
> Kenneth> pianist would not need this).
>
> IF you want dynamics to apply to the entire GrandStaff, create a
> separate Dynamics context with just the dynamics and spacing events in
> it.  Otherwise, dynamics are per-voice.
>
>
> Peter C



Re: how to hide dynamics? Only solution is to have a dedicated midi music variable?

2022-06-08 Thread Kenneth Wolcott
Hi David;

  Thank you for the tip regarding DAW; seems a bit over my head for
now, but I will put it in my ToDo list for future reference.

Ken

On Mon, Jun 6, 2022 at 10:44 PM David Bellows  wrote:
>
> If you care a lot about how it sounds then you'll want to import the
> MIDI into a DAW and make your adjustments there.
>
> If you are content with just the MIDI sounds then what I have done in
> the past is to make a copy of the LilyPond file and make all the
> adjustments I want to the dynamics on that version and generate a MIDI
> file from it. This way you can also change tempo slightly frequently,
> add ornaments, etc. The pdf you print from that will now be a visual
> representation of the DAW-like changes you've made and you can
> continue to work from that to get the kind of performance you want.
>
> On Mon, Jun 6, 2022 at 9:20 PM Kenneth Wolcott  
> wrote:
> >
> > HI;
> >
> >   Frequently I have engraved music that doesn't sound good when the
> > corresponding midi is played, usually with regards to two (or more)
> > instruments that are overwhelmed by one of them.
> >
> >   In this case, I have a piece which has a Contrabass with Piano
> > accompaniment, with two different kinds of unwanted domination.  In
> > the first case I have to specify the dynamics for the right hand and
> > the left hand separately (a human pianist would not need this).
> > Secondly, the left hand encounters polyphony about fifteen bars into
> > the piece.  Then, these notes are played at mezzo forte or forte when
> > I want them to be the same dynamic as previously (ppp).  I can't have
> > the Contrabass and the Piano playing at piano dynamics because the
> > Contrabass is completely dominated by the Piano.
> >
> >   I guess I could solve this problem by having four variables for the
> > left hand (lh_one, lh_two, lh_one_midi and lh_two_midi), but that
> > seems quite a bit of work.
> >
> >   Am I the only one that would like to have the midi output sound at
> > least somewhat pleasant?  Or am I the only one who has this problem
> > with the midi dynamics being wonky?
> >
> >   See attached files for details.
> >
> >   Mac Mini
> >   Lilypond 2.22.2 (from home brew)
> >   Fluidsynth (from home brew)
> >
> > Thanks,
> > Ken Wolcott
>



Re: Extending Slur engraver

2022-06-08 Thread Andrew Bernard
Me too. Speaking as a violin player I do not know what you are referring 
to. Can you post a picture?


Andrew

David Kastrup wrote on 9/06/2022 6:55 AM:

Kyle Baldwin  writes:


Hello –

I’m looking at creating a new slur to be used as a “bowing-slur.”
Essentially it would be a styled slur that can co-exist with the slur
and phrasing slur grobs.

I have trouble understanding how a "bowing-slur" would differ in any
meaning from a slur.






TextScript inside staff

2022-06-08 Thread Ahanu Banerjee
Hello,

I'm looking for a way to put markup text, anchored to a note, inside the
staff. The only way I have found so far is using extra-offset, which
results in spacing issues around the text's original position. Is there
another way?

Example:

\version "2.23.8"
{ \stemUp e'' -\tweak extra-offset #'(0 . 2.75) -\tweak whiteout ##t
_\markup "II" }


Thanks,
-Ahanu


Re: Reducing spacing round clef between notes

2022-06-08 Thread Kieren MacMillan
Hi Paul,

> I have a clef change in the middle of a group of semiquavers, and the amount 
> of space round it is distorting the spacing of the notes in the group more 
> than is acceptable.  There is lots of space on both sides of it which could 
> happily be reduced.  However, I have been unable to find the incantation 
> which will do this.  Any hints?

Please post a MWE.
https://lilypond.org/tiny-examples.html

Thanks,
Kieren.


Reducing spacing round clef between notes

2022-06-08 Thread Paul Hodges
I have a clef change in the middle of a group of semiquavers, and the amount of 
space round it is distorting the spacing of the notes in the group more than is 
acceptable.  There is lots of space on both sides of it which could happily be 
reduced.  However, I have been unable to find the incantation which will do 
this.  Any hints?


Thanks,
Paul

Re: Extending Slur engraver

2022-06-08 Thread David Kastrup
Kyle Baldwin  writes:

> Hello –
>
> I’m looking at creating a new slur to be used as a “bowing-slur.”
> Essentially it would be a styled slur that can co-exist with the slur
> and phrasing slur grobs.

I have trouble understanding how a "bowing-slur" would differ in any
meaning from a slur.

-- 
David Kastrup



Re: Extending Slur engraver

2022-06-08 Thread Kyle Baldwin
Ah – Perfect. Thank you. When I first learned lilypond it was around 2.18. I 
forgot this got added in the last couple of years.

Thank you!


From: Jean Abou Samra 
Date: Wednesday, June 8, 2022 at 1:06 PM
To: Kyle Baldwin , lilypond-user@gnu.org 

Subject: Re: Extending Slur engraver
Le 08/06/2022 à 21:55, Kyle Baldwin a écrit :
>
> Hello –
>
> I’m looking at creating a new slur to be used as a “bowing-slur.”
> Essentially it would be a styled slur that can co-exist with the slur
> and phrasing slur grobs.
>
> Looking in the source code for the phrasing slur engraver, it looks
> like it just passes the information to the slur engraver
>
> https://gitlab.com/lilypond/lilypond/-/blob/master/lily/slur-engraver.cc
>
> I’m looking through the external documentation and found the “creating
> an engraver” in scheme, but have had no luck doing the same kind of
> extending that happens in the phrasing slur (as I’m not sure of the
> c++ <-> scheme equivalence).
> https://extending-lilypond.readthedocs.io/en/latest/translation.html#writing-an-engraver


Heh, nice for me to see that this is being useful.


> How could I recreate my new “Bowing_slur_engraver” to just pass to the
> slur engraver? (I assume I can…)



No, you can't. The advantage with C++ code is that it
is fast. The disadvantage is that it is compiled statically
to machine code, so you can't extend it dynamically (in
your .ly file, without recompiling LilyPond yourself) in
Scheme unless it provides specific facilities to do so.
The code in question uses class inheritance, which does
not work the same way in Scheme, and it has no Scheme
interfaces to the individual class methods anyway.

Luckily, slurs already support this kind of thing. You can
use the \= command to give the slur an ID that can then
be reused to close it. This is a very simple solution
to your problem without even touching Scheme. See below
for an example. Documentation is here:
https://lilypond.org/doc/v2.22/Documentation/notation/expressive-marks-as-curves#slurs


> How do I style the slur before passing it to the slur engraver? I
> would assume the (tweaks (..)) function in scheme, but just want to
> make sure.


Use \tweak. In Scheme that would be (tweak ...).

All in all:

\version "2.22.2"

startBow = \tweak color red \=bow (
endBow = \=bow )

{ c'4\startBow 4\( 4( 4) 4( 4\endBow 4) 4\) }


Best,
Jean


Extending Slur engraver

2022-06-08 Thread Kyle Baldwin
Hello –

I’m looking at creating a new slur to be used as a “bowing-slur.” Essentially 
it would be a styled slur that can co-exist with the slur and phrasing slur 
grobs.

Looking in the source code for the phrasing slur engraver, it looks like it 
just passes the information to the slur engraver
https://gitlab.com/lilypond/lilypond/-/blob/master/lily/slur-engraver.cc

I’m looking through the external documentation and found the “creating an 
engraver” in scheme, but have had no luck doing the same kind of extending that 
happens in the phrasing slur (as I’m not sure of the c++ <-> scheme 
equivalence). 
https://extending-lilypond.readthedocs.io/en/latest/translation.html#writing-an-engraver


  1.  How could I recreate my new “Bowing_slur_engraver” to just pass to the 
slur engraver? (I assume I can…)
  2.  How do I style the slur before passing it to the slur engraver? I would 
assume the (tweaks (..)) function in scheme, but just want to make sure.

Thank you !

-Kyle



Re: Extending Slur engraver

2022-06-08 Thread Jean Abou Samra

Le 08/06/2022 à 21:55, Kyle Baldwin a écrit :


Hello –

I’m looking at creating a new slur to be used as a “bowing-slur.” 
Essentially it would be a styled slur that can co-exist with the slur 
and phrasing slur grobs.


Looking in the source code for the phrasing slur engraver, it looks 
like it just passes the information to the slur engraver


https://gitlab.com/lilypond/lilypond/-/blob/master/lily/slur-engraver.cc

I’m looking through the external documentation and found the “creating 
an engraver” in scheme, but have had no luck doing the same kind of 
extending that happens in the phrasing slur (as I’m not sure of the 
c++ <-> scheme equivalence). 
https://extending-lilypond.readthedocs.io/en/latest/translation.html#writing-an-engraver



Heh, nice for me to see that this is being useful.


How could I recreate my new “Bowing_slur_engraver” to just pass to the 
slur engraver? (I assume I can…) 




No, you can't. The advantage with C++ code is that it
is fast. The disadvantage is that it is compiled statically
to machine code, so you can't extend it dynamically (in
your .ly file, without recompiling LilyPond yourself) in
Scheme unless it provides specific facilities to do so.
The code in question uses class inheritance, which does
not work the same way in Scheme, and it has no Scheme
interfaces to the individual class methods anyway.

Luckily, slurs already support this kind of thing. You can
use the \= command to give the slur an ID that can then
be reused to close it. This is a very simple solution
to your problem without even touching Scheme. See below
for an example. Documentation is here:
https://lilypond.org/doc/v2.22/Documentation/notation/expressive-marks-as-curves#slurs


How do I style the slur before passing it to the slur engraver? I 
would assume the (tweaks (..)) function in scheme, but just want to 
make sure.



Use \tweak. In Scheme that would be (tweak ...).

All in all:

\version "2.22.2"

startBow = \tweak color red \=bow (
endBow = \=bow )

{ c'4\startBow 4\( 4( 4) 4( 4\endBow 4) 4\) }


Best,
Jean




Extending Slur engraver

2022-06-08 Thread Kyle Baldwin
Hello –

I’m looking at creating a new slur to be used as a “bowing-slur.” Essentially 
it would be a styled slur that can co-exist with the slur and phrasing slur 
grobs.

Looking in the source code for the phrasing slur engraver, it looks like it 
just passes the information to the slur engraver
https://gitlab.com/lilypond/lilypond/-/blob/master/lily/slur-engraver.cc

I’m looking through the external documentation and found the “creating an 
engraver” in scheme, but have had no luck doing the same kind of extending that 
happens in the phrasing slur (as I’m not sure of the c++ <-> scheme 
equivalence). 
https://extending-lilypond.readthedocs.io/en/latest/translation.html#writing-an-engraver


  1.  How could I recreate my new “Bowing_slur_engraver” to just pass to the 
slur engraver? (I assume I can…)
  2.  How do I style the slur before passing it to the slur engraver? I would 
assume the (tweaks (..)) function in scheme, but just want to make sure.

Thank you !

-Kyle