Re: Vertically Repositioning \tempo Output

2024-04-16 Thread Knute Snortum
On Tue, Apr 16, 2024 at 8:05 AM PMA  wrote:

> Hi Knute --
>
> Although my system ignored this "...MetronomeMark..." line, your "\tweak"
> made me think in a new direction.
>
> Once I managed to increase the vertical space *above* my \tempo command,
> the overcrowding disappeared.
>
> Thank you for the inspiration!
>
> Peter A
>
>
> On 4/14/24 21:16, Knute Snortum wrote:
>
> On Sun, Apr 14, 2024 at 2:37 PM PMA  
>  wrote:
>
>
> Hi List --
>
> One of my several \tempo commands is printing its line too far above the
> staff.
>
> My attempts to affect its Y-offset (with \markup, \offset or \tweak) have
> failed.
>
> Could someone please point me in the right direction?
>
>
> It's hard to know how to help you if you don't have a tiny example 
> (https://lilypond.org/tiny-examples.html).  For instance, I was able to
> affect the Y-offset of a metronome mark with this code:
>
> \version "2.24.3"
>
> {
>   \tweak MetronomeMark.Y-offset 5
>   \tempo "Allegro"
>   c''1
> }
>
> --
> Knute Snortum
>
>
Glad I could be an inspiration to you!

In the future, be sure to Reply All or add the LilyPond users list in the
CC to post back to the list.  Thanks.


--
Knute Snortum


Re: Vertically Repositioning \tempo Output

2024-04-14 Thread Knute Snortum
On Sun, Apr 14, 2024 at 2:37 PM PMA  wrote:

> Hi List --
>
> One of my several \tempo commands is printing its line too far above the
> staff.
>
> My attempts to affect its Y-offset (with \markup, \offset or \tweak) have
> failed.
>
> Could someone please point me in the right direction?
>

It's hard to know how to help you if you don't have a tiny example (
https://lilypond.org/tiny-examples.html).  For instance, I was able to
affect the Y-offset of a metronome mark with this code:

\version "2.24.3"

{
  \tweak MetronomeMark.Y-offset 5
  \tempo "Allegro"
  c''1
}

--
Knute Snortum


Vertically Repositioning \tempo Output

2024-04-14 Thread PMA

Hi List --

One of my several \tempo commands is printing its line too far above the 
staff.


My attempts to affect its Y-offset (with \markup, \offset or \tweak) 
have failed.


Could someone please point me in the right direction?

Thanks in advance,

Peter A


Re: Tempo formatting question.

2024-02-10 Thread Hwaen Ch'uqi
Ah, thank you and Jean A. for this. Works perfectly!

Hwaen Ch'uqi


On 2/8/24, Knute Snortum  wrote:
> On Thu, Feb 8, 2024 at 8:26 AM Hwaen Ch'uqi  wrote:
>
>> Greetings,
>>
>> I would like to indicate a metronome mark of "Prestissimo" > note tied to dotted quarter note>=96. How may I do this? I am using
>> version 22.04. Thank you for any help!
>>
>
> Jean A. helped me with this a while back.  Here's what I did:
>
> %%%
> \version "2.24.2"
>
> tempoMarkupA =
> \markup {
>   \large
>   "Prestissimo"
>   \hspace #0.4
>   \teeny
>   \rhythm {
> \override Score.SpacingSpanner.spacing-increment = 0.5
> 4~ 4.
>   }
>   \small
>   \normal-text
>   "= 96"
> }
>
> {
>   \tempo \tempoMarkupA
>   c'1
> }
> %%%
>
>
> --
> Knute Snortum
>



Re: Tempo formatting question.

2024-02-08 Thread Knute Snortum
On Thu, Feb 8, 2024 at 8:26 AM Hwaen Ch'uqi  wrote:

> Greetings,
>
> I would like to indicate a metronome mark of "Prestissimo"  note tied to dotted quarter note>=96. How may I do this? I am using
> version 22.04. Thank you for any help!
>

Jean A. helped me with this a while back.  Here's what I did:

%%%
\version "2.24.2"

tempoMarkupA =
\markup {
  \large
  "Prestissimo"
  \hspace #0.4
  \teeny
  \rhythm {
\override Score.SpacingSpanner.spacing-increment = 0.5
4~ 4.
  }
  \small
  \normal-text
  "= 96"
}

{
  \tempo \tempoMarkupA
  c'1
}
%%%


--
Knute Snortum


Tempo formatting question.

2024-02-08 Thread Hwaen Ch'uqi
Greetings,

I would like to indicate a metronome mark of "Prestissimo" =96. How may I do this? I am using
version 22.04. Thank you for any help!

Hwaen Ch'uqi



Re: Compute \tempo from variables

2024-02-01 Thread David Hobach

On 2/1/24 17:21, Aaron Hill wrote:

On 2024-02-01 7:36 am, David Hobach wrote:

Hi all,

I'd like to compute the \tempo directive from variables, but couldn't yet 
figure out how to do it.

For example, let's say I have two variables such as
myTempoBase = 4
myTempo = 80

Then I'd like to do something such as
global = {
\key c \major
\time 4/4
\tempo \myTempoBase = \myTempo
}

I'd expect it to resolve to \tempo 4 = 80. The above code however fails on 
2.24.1.

Any ideas?



myTempoBase = ##{ 4 #}


That seems to work.  Otherwise, myTempoBase is just a number and not a duration.


Yes, indeed. Thanks a lot!


-- Aaron Hill


OpenPGP_0x08DEA51AE90C3780.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Compute \tempo from variables

2024-02-01 Thread David Kastrup
David Hobach  writes:

> Hi all,
>
> I'd like to compute the \tempo directive from variables, but couldn't
> yet figure out how to do it.
>
> For example, let's say I have two variables such as
> myTempoBase = 4
> myTempo = 80
>
> Then I'd like to do something such as
> global = {
>   \key c \major
>   \time 4/4
>   \tempo \myTempoBase = \myTempo
> }
>
> I'd expect it to resolve to \tempo 4 = 80. The above code however fails on 
> 2.24.1.
>
> Any ideas?

in \tempo 4 = 80 , the 4 is not a number but a duration.  This works
when writing

myTempoBase = ##{ 4 #}
myTempo = 80

global = {
\key c \major
\time 4/4
\tempo \myTempoBase = \myTempo
}

because ##{ 4 #} resolves to a duration rather than a number.

-- 
David Kastrup



Re: Compute \tempo from variables

2024-02-01 Thread Aaron Hill

On 2024-02-01 7:36 am, David Hobach wrote:

Hi all,

I'd like to compute the \tempo directive from variables, but couldn't 
yet figure out how to do it.


For example, let's say I have two variables such as
myTempoBase = 4
myTempo = 80

Then I'd like to do something such as
global = {
\key c \major
\time 4/4
\tempo \myTempoBase = \myTempo
}

I'd expect it to resolve to \tempo 4 = 80. The above code however fails 
on 2.24.1.


Any ideas?



myTempoBase = ##{ 4 #}


That seems to work.  Otherwise, myTempoBase is just a number and not a 
duration.



-- Aaron Hill



Compute \tempo from variables

2024-02-01 Thread David Hobach

Hi all,

I'd like to compute the \tempo directive from variables, but couldn't yet 
figure out how to do it.

For example, let's say I have two variables such as
myTempoBase = 4
myTempo = 80

Then I'd like to do something such as
global = {
\key c \major
\time 4/4
\tempo \myTempoBase = \myTempo
}

I'd expect it to resolve to \tempo 4 = 80. The above code however fails on 
2.24.1.

Any ideas?

Thanks in advance & Best Regards
David


OpenPGP_0x08DEA51AE90C3780.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: tempo marks floating number

2024-01-22 Thread Leo Correia de Verdier
Sorry, copying error: to avoid confusion, the numbers should be 90.86/4 = 
22.715 

> 22 jan. 2024 kl. 22:22 skrev Leo Correia de Verdier 
> :
> 
> Hi Jacopo!
> 
> I think 
> \set Timing.tempoWholesPerMinute = #(ly:make-moment 24.715) % that is 98.86/4
> should work for the midi output. At least it accepts floats. Combining it 
> with Michael’s solution for the markup should get you the complete \tempo
> 
> I might have heard sometime in the past that tempoWholesPerMinute got 
> internally rounded down the line. Do any of you in the developing team know 
> if this has been fixed?
> 
> Anyway, one other caveat to keep in mind is that it is much more common for 
> musicians to see a fractional tempo mark (printed in the score/part, 
> regardless of whether it is motivated by fixed electronics or film) as a 
> reason to sneer at the composer than for it to carry any useful information 
> for their interpretation.
> 
> HTH
> /Leo
> 
>> 22 jan. 2024 kl. 16:53 skrev Michael Werner :
>> 
>> On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo  
>> wrote:
>> How can I simply write a bpm in floating number in lilypond (e.g.♩ = 90.86 ) 
>> ?
>> It seems that \tempo accept only integers.
>> thanks
>> 
>> You can do pretty much any markup with the \tempo command. Two ways you can 
>> do this are either:
>> \tempo \markup { \note { 4 } #UP " = 90.86" }
>> or
>> \tempo \markup { \rhythm { 4 } " = 90.86" }
>> 
>> The \note function is a bit simpler and creates a note stencil that's a tad 
>> larger than what's produced by the \rhythm function. The \rhythm function, 
>> however, is far more flexible in what it can produce. More info on the \note 
>> function at:
>> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
>> and for the \rhythm function see:
>> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm
>> 
>> One caveat to keep in mind is that \tempo entries done with \markup do not 
>> affect MIDI playback.
>> -- 
>> Michael
>> 
> 




Re: tempo marks floating number

2024-01-22 Thread Leo Correia de Verdier
Hi Jacopo!

I think 
\set Timing.tempoWholesPerMinute = #(ly:make-moment 24.715) % that is 98.86/4
should work for the midi output. At least it accepts floats. Combining it with 
Michael’s solution for the markup should get you the complete \tempo

I might have heard sometime in the past that tempoWholesPerMinute got 
internally rounded down the line. Do any of you in the developing team know if 
this has been fixed?

Anyway, one other caveat to keep in mind is that it is much more common for 
musicians to see a fractional tempo mark (printed in the score/part, regardless 
of whether it is motivated by fixed electronics or film) as a reason to sneer 
at the composer than for it to carry any useful information for their 
interpretation.

HTH
/Leo

> 22 jan. 2024 kl. 16:53 skrev Michael Werner :
> 
> On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo  
> wrote:
> How can I simply write a bpm in floating number in lilypond (e.g.♩ = 90.86 ) ?
> It seems that \tempo accept only integers.
> thanks
> 
> You can do pretty much any markup with the \tempo command. Two ways you can 
> do this are either:
> \tempo \markup { \note { 4 } #UP " = 90.86" }
> or
> \tempo \markup { \rhythm { 4 } " = 90.86" }
> 
> The \note function is a bit simpler and creates a note stencil that's a tad 
> larger than what's produced by the \rhythm function. The \rhythm function, 
> however, is far more flexible in what it can produce. More info on the \note 
> function at:
> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
> and for the \rhythm function see:
> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm
> 
> One caveat to keep in mind is that \tempo entries done with \markup do not 
> affect MIDI playback.
> -- 
> Michael
> 




Re: tempo marks floating number

2024-01-22 Thread Michael Werner
On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo 
wrote:

> How can I simply write a bpm in floating number in lilypond (e.g.*♩ =
> 90.86 ) *?
> It seems that \tempo accept only integers.
> thanks
>

You can do pretty much any markup with the \tempo command. Two ways you can
do this are either:
\tempo \markup { \note { 4 } #UP " = 90.86" }
or
\tempo \markup { \rhythm { 4 } " = 90.86" }

The \note function is a bit simpler and creates a note stencil that's a tad
larger than what's produced by the \rhythm function. The \rhythm function,
however, is far more flexible in what it can produce. More info on the
\note function at:
https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
and for the \rhythm function see:
https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm

One caveat to keep in mind is that \tempo entries done with \markup do not
affect MIDI playback.
-- 
Michael


tempo marks floating number

2024-01-22 Thread Jacopo Greco d'Alceo
How can I simply write a bpm in floating number in lilypond (e.g.♩ = 90.86 ) ?
It seems that \tempo accept only integers.
thanks

Re: Tempo marking doesn't avoid cross-staff slur

2024-01-11 Thread Werner LEMBERG


>> This issue belongs into the group of the many cross-staff problems.
>> AFAICS, we don't have this particular case covered, so please file
>> an issue in the LilyPond tracker.
> 
> For reference, it's : https://gitlab.com/lilypond/lilypond/-/issues/6688

Thanks!


Werner



Re: Tempo marking doesn't avoid cross-staff slur

2024-01-11 Thread Knute Snortum
On Thu, Jan 11, 2024 at 4:40 AM Werner LEMBERG  wrote:

>
> > I found a weird behavior -- I don't know if it's worthy of an issue
> > or not, but here it is:
> >
> > The tempo marking will not avoid a slur that goes from staff to
> > staff.  Here is a snippet that shows the problem, and I've attached
> > an image of it: [...]
>
> This issue belongs into the group of the many cross-staff problems.
> AFAICS, we don't have this particular case covered, so please file an
> issue in the LilyPond tracker.
>

For reference, it's : https://gitlab.com/lilypond/lilypond/-/issues/6688

--
Knute Snortum


Re: Tempo marking doesn't avoid cross-staff slur

2024-01-11 Thread Werner LEMBERG


> I found a weird behavior -- I don't know if it's worthy of an issue
> or not, but here it is:
> 
> The tempo marking will not avoid a slur that goes from staff to
> staff.  Here is a snippet that shows the problem, and I've attached
> an image of it: [...]

This issue belongs into the group of the many cross-staff problems.
AFAICS, we don't have this particular case covered, so please file an
issue in the LilyPond tracker.


Werner



Tempo marking doesn't avoid cross-staff slur

2024-01-07 Thread Knute Snortum
I found a weird behavior -- I don't know if it's worthy of an issue or not,
but here it is:

The tempo marking will not avoid a slur that goes from staff to staff.
Here is a snippet that shows the problem, and I've attached an image of it:

\version "2.25.12"

one = \relative {
  \tempo "Allegro maestoso"
  c'''2( e |
  \change Staff = "lower" c,1) |
}

two = \relative {
  s1 |
  s1 |
}

<<
  \new Staff = "upper" \one
  \new Staff = "lower" \two
>>

--
Knute Snortum


Re: Problems with tempo in 15/8 time

2023-09-19 Thread Knute Snortum
On Tue, Sep 19, 2023 at 8:06 AM Jean Abou Samra  wrote:

> So the first question is how do I get the two notes closer.  I've attached
> the LilyPond source and a screenshot of my attempts.
>
>
> You can do
>
> \rhythm {
> \override Score.SpacingSpanner.spacing-increment = 0.5
> 4.~ 4
> }
>
>
> Secondly, what's the best way to get the MIDI to play at the correct
> tempo?  I'd like to do something like \tempo 5*8 = 69 but of course that
> doesn't work.  Right now I have \tempo 8 = 345, which is 69 times five but
> is that the best way to do it?
>
>
> I actually don't see any technical reason why \tempo 8*5 = 69 should be
> rejected. (I just tested the parser change and it didn't seem to cause
> trouble).
>
> Anyway, this works:
>
>   \tempo $#{ 8*5 #} = 70
>

Thanks Jean,  those solutions work great.


Re: Problems with tempo in 15/8 time

2023-09-19 Thread Jean Abou Samra
> So the first question is how do I get the two notes closer.  I've attached the
> LilyPond source and a screenshot of my attempts.

You can do

\rhythm {
\override Score.SpacingSpanner.spacing-increment = 0.5
4.~ 4
}


> Secondly, what's the best way to get the MIDI to play at the correct tempo? 
> I'd like to do something like \tempo 5*8 = 69 but of course that doesn't
> work.  Right now I have \tempo 8 = 345, which is 69 times five but is that the
> best way to do it?

I actually don't see any technical reason why \tempo 8*5 = 69 should be
rejected. (I just tested the parser change and it didn't seem to cause trouble).

Anyway, this works:

  \tempo $#{ 8*5 #} = 70

Best,
Jean




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


Problems with tempo in 15/8 time

2023-09-19 Thread Knute Snortum
Hi everyone.

I am engraving a Scriabin prelude in 15/8 time.  I'm having two problems
both related to the tempo of the piece.  Scriabin used a metronome marking
of a dotted quarter note tied to a quarter note = 69 - 72.  I can use
markup and \rhythm to get the notes, but the two notes are too far apart.
I can use two \note keywords to get the two notes close to each other, but
no tie.  So the first question is how do I get the two notes closer.  I've
attached the LilyPond source and a screenshot of my attempts.

Secondly, what's the best way to get the MIDI to play at the correct
tempo?  I'd like to do something like \tempo 5*8 = 69 but of course that
doesn't work.  Right now I have \tempo 8 = 345, which is 69 times five but
is that the best way to do it?

Thanks as always for your input.

--
Knute Snortum
\version "2.24.2"

tempoMarkupA = 
\markup {
  \large
  "Presto"
  \hspace #0.4
  \teeny
  \rhythm { 4.~ 4 }
  \small 
  \normal-text
  "= 69-72"
}

tempoMarkupB = 
\markup {
  \large
  "Presto"
  \hspace #0.4
  \translate #'(0 . 0.4)
  \teeny { 
\note { 4. } #UP
\note { 4 } #UP
  } 
  \small 
  \normal-text
  "= 69-72"
}

{
  \tempo \tempoMarkupA
  c'1
}

{
  \tempo \tempoMarkupB
  c'1
}

Re: Moving tempo-markup

2023-06-16 Thread Johannes Roeßler

works perfectly fine, thx Jean

|\once \override Score.MetronomeMark.padding = 5|




Re: Moving tempo-markup

2023-06-16 Thread Jean Abou Samra
Le vendredi 16 juin 2023 à 08:53 +0200, Johannes Roeßler a écrit :

>  
> Hi,
>  
> how can I raise the tempo markup to get some space in case I have other 
> markups in place:
>  
> ```
> \version "2.24.0"  
>  {\tempo "Andante" c'4^\markup \italic "mezza voce" c' c' c' }
> ```


Try adding some padding:

```
\version "2.24.1"

{
  \once \override Score.MetronomeMark.padding = 5
  \tempo "Andante"
  c'4^\markup \italic "mezza voce" c' c' c'
}
```

Best,

Jean




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


Moving tempo-markup

2023-06-16 Thread Johannes Roeßler

Hi,

how can I raise the tempo markup to get some space in case I have other 
markups in place:


8<---

\version "2.24.0"
{\tempo "Andante" c'4^\markup \italic "mezza voce" c' c' c' }

->8

Best regards Johannes


Re: Fonts and Tempo

2023-05-21 Thread Paul Hodges
For Unicode in Windows my preference is a little program called Wizkey - not 
free, but extremely ergonomic, both for searching and blind typing (in the case 
of ö, I just keyed: ctrl-: o).
https://antibody-software.com/wizkey/


For the tempo example, I just use markup in the \tempo command.


For the equality, I use something like:
    ^\markup \left-align \concat { "  ← " \smaller \note-by-number #2 #0 #0.8 " 
=" \smaller \note-by-number #2 #0 #0.8 " →" }
with alignment and offset trimmed as required (in my case to get the = over the 
bar-line).


Regards,
Paul





 From:   Greg Lindstrom  
 To:
 Sent:   21/05/2023 3:42 
 Subject:   Fonts and Tempo 


Good evening - 


Let me start off by saying I'm loving working with lilypond to engrave music. 
Well Done!!


Questions. How can I do this (an umlaut over the o??)






And on tempo markings (the "ca." after the equal sign. I could do it as all 
text but wanted to know if there's a more "lilypond" way to do it).






And as long as I'm asking (and you're still reading). How about this (a half 
note = a quarter note. I'd be happy to do it without the arrows -- which I 
think borders on silly -- but I'll give extra credit):






Thanks for any help you can provide. I have the Lilypond 2.12 Notation 
Reference so if you even point me to the section to reference I'll work it out.


Kind Regards,
--greg 

Re: Fonts and Tempo

2023-05-21 Thread Jean Abou Samra
Le samedi 20 mai 2023 à 23:30 -0400, William Rehwinkel via LilyPond user 
discussion a écrit :

>  My apologies for double-posting...after writing I looked some more and found 
> that you can use **\char ##x** to enter unicode characters in a markup 
> block as in here 
> [https://lilypond.org/doc/v2.25/Documentation/notation/unicode](https://lilypond.org/doc/v2.25/Documentation/notation/unicode)

Now that we are on Guile 2, you can also use the built-in Guile syntax:

```
\version "2.25.4"

\markup { ft #"S\xf6rent" }
```

More info here: 
https://www.gnu.org/software/guile/manual/html_node/String-Syntax.html


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


Re: Fonts and Tempo

2023-05-21 Thread Jean Abou Samra
Le samedi 20 mai 2023 à 23:24 -0400, William Rehwinkel via LilyPond user 
discussion a écrit :

>  For the third I hacked together the following, which you can tinker with to 
> your liking  
>
> ```
>  % --  
>  \version "2.25.4"  
>
>  \relative c' {  
>    c4 d e f | \mark \markup \smaller {\super\combine \draw-line #'(2 . 0) 
> \arrow-head #X #LEFT ##t \rhythm {2 } = \rhythm { 4 } \super\combine 
> \draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t} g4  
>  }  
>  % --
> ```

`\mark \markup` is soft-deprecated though (by which I mean that it will keep 
working in the foreseeable future for backwards compatibility, but is no longer 
recommended). Better use

```
\version "2.25.4"

\relative c' {
  c4 d e f |
  \tweak self-alignment-X #CENTER \textMark \markup \smaller {
\super \combine \draw-line #'(2 . 0) \arrow-head #X #LEFT ##t
\rhythm { 2 } = \rhythm { 4 }
\super \combine \draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t
  }
  g4
}
```

Best,

Jean


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


Re: Fonts and Tempo

2023-05-20 Thread William Rehwinkel via LilyPond user discussion
My apologies for double-posting...after writing I looked some more and 
found that you can use *\char ##x* to enter unicode characters in a 
markup block as in here 
https://lilypond.org/doc/v2.25/Documentation/notation/unicode


On 5/20/23 23:24, William Rehwinkel via LilyPond user discussion wrote:

Dear Greg,

For the umlaut, as long as you enter the character with umlaut into 
the file, it should work. for Example, on vim I type -K, then 
colon (:), then "o", and it enters ö.


For the second question, I found 
https://lsr.di.unimi.it/LSR/Snippet?id=1008 (also attached to this 
email) but it unfortunately requires a lot of copy-pasting. If you add 
"\version "2.21.2"" and then run convert-ly it looks like it still 
works on 2.25.4.


For the third I hacked together the following, which you can tinker 
with to your liking


% --
\version "2.25.4"

\relative c' {
  c4 d e f | \mark \markup \smaller {\super\combine \draw-line #'(2 . 
0) \arrow-head #X #LEFT ##t \rhythm {2 } = \rhythm { 4 } 
\super\combine \draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t} g4

}
% --

Thanks,
-William

On 5/20/23 22:42, Greg Lindstrom wrote:

Good evening -

Let me start off by saying I'm loving working with lilypond to 
engrave music. Well Done!!


Questions. How can I do this (an umlaut over the o??)

image.png

And on tempo markings (the "ca." after the equal sign. I could do it 
as all text but wanted to know if there's a more "lilypond" way to do 
it).


image.png


And as long as I'm asking (and you're still reading). How about this 
(a half note = a quarter note. I'd be happy to do it without the 
arrows -- which I think borders on silly -- but I'll give extra credit):


image.png

Thanks for any help you can provide. I have the Lilypond 2.12 
Notation Reference so if you even point me to the section to 
reference I'll work it out.


Kind Regards,
--greg


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +



OpenPGP_signature
Description: OpenPGP digital signature


Re: Fonts and Tempo

2023-05-20 Thread William Rehwinkel via LilyPond user discussion

Dear Greg,

For the umlaut, as long as you enter the character with umlaut into the 
file, it should work. for Example, on vim I type -K, then colon 
(:), then "o", and it enters ö.


For the second question, I found 
https://lsr.di.unimi.it/LSR/Snippet?id=1008 (also attached to this 
email) but it unfortunately requires a lot of copy-pasting. If you add 
"\version "2.21.2"" and then run convert-ly it looks like it still works 
on 2.25.4.


For the third I hacked together the following, which you can tinker with 
to your liking


% --
\version "2.25.4"

\relative c' {
  c4 d e f | \mark \markup \smaller {\super\combine \draw-line #'(2 . 
0) \arrow-head #X #LEFT ##t \rhythm {2 } = \rhythm { 4 } \super\combine 
\draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t} g4

}
% --

Thanks,
-William

On 5/20/23 22:42, Greg Lindstrom wrote:

Good evening -

Let me start off by saying I'm loving working with lilypond to engrave 
music. Well Done!!


Questions. How can I do this (an umlaut over the o??)

image.png

And on tempo markings (the "ca." after the equal sign. I could do it 
as all text but wanted to know if there's a more "lilypond" way to do it).


image.png


And as long as I'm asking (and you're still reading). How about this 
(a half note = a quarter note. I'd be happy to do it without the 
arrows -- which I think borders on silly -- but I'll give extra credit):


image.png

Thanks for any help you can provide. I have the Lilypond 2.12 Notation 
Reference so if you even point me to the section to reference I'll 
work it out.


Kind Regards,
--greg


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +

%%
%  Metronome markup formatter, with more options than the Lilypond
%  default formatter, and changes in sizing (see below).
%  Properties read:
%  - tempoEquationText:text to be put between note and tempo value(s)
%  Default: "="
%  - tempoBetweenText: text to be put between the tempo values. Used
%  only in ranges of tempo values.
%  Default: "-"
%  - tempoHideParenthesis: boolean. If true, the parenthesis are hide.
%  Default: false.
%  - tempoNumberColor: color. If set, the tempo value will be formatted
%  to this color.
%  Default: not set.
%  The size of the text ("Allegro" etc) is a bit larger than Lilypond default.
%  Similarly, the size of the note is smaller than Lilypond default.
%
%  To use this snippet, just \include this file. To revert default
%  Lilypond formatter inside the score:
%  \set Score.metronomeMarkFormatter = #format-metronome-markup
%
%  tested: Version "2.21.2"
%
%  This snippet is based on a snippet by Arnold Theresius. The original
%  snippet create a formatter called  "format-metronome-markup-approx",
%  and the default value to tempoEquationText in that snippet is "≈".
%  I changed back this default to Lilypond default, and added the
%  tempoBetweenText property.
%
%  Original header of the Theresius snippet:
%% http://lsr.di.unimi.it/LSR/Item?id=869

%by: ArnoldTheresius

%tested: Version "2.21.2"


% lilypond 2.14.x:
% Almost copied from .../scm/translation-functions.scm:
% --> added »-approx« to the function names of
% »format-metronome-markup« and »metronome-markup«
% --> replaced "=" with "≈" (approx. instead of equal)

#(define-public (format-metronome-markup-custom event context)
  (let ((eq-sym-def (ly:context-property context 'tempoEquationText))   
  ; added option
(bet-sym-def (ly:context-property context 'tempoBetweenText))   
  ; added option
(hide-paren (eq? #t (ly:context-property context 
'tempoHideParenthesis))) ; added option
(num-color (ly:context-property context 'tempoNumberColor #f))  
  ; added option
    (hide-note (ly:context-property context 'tempoHideNote #f))
(text (ly:event-property event 'text))
(dur (ly:event-property event 'tempo-unit))
(count (ly:event-property event 'metronome-count)))

(metronome-markup-custom text dur count hide-note eq-sym-def bet-sym-def 
hide-paren num-color)))

#(define-public (metronome-markup-custom text dur count hide-note eq-sym-def 
bet-sym-def hide-paren col)
  (let* ((note-mark (if (and (not hide-note) (ly:duration? dur))
(make-teeny-markup; note 
smaller than Lilypond default
 (make-note-by-number-markup (ly:duration-log dur)

Re: Fonts and Tempo

2023-05-20 Thread Andrew Bernard
Just enter the character. Lilypond supports Unicode. Use whatever 
character map tool you like.


What platform are you on? PopChar is good on Windows.

Andrew


On 21/05/2023 12:42 pm, Greg Lindstrom wrote:

Questions. How can I do this (an umlaut over the o??)




Re: Fonts and Tempo

2023-05-20 Thread Andrew Bernard
For a start you would be well advised to upgrade to the latest stable 
version 2.24.1. 2.12 is positively ancient.


It will make it easier for people to help you for a start.

There is a script called convert-ly that can help with syntax changes if 
need be.


Andrew


On 21/05/2023 12:42 pm, Greg Lindstrom wrote:
Thanks for any help you can provide. I have the Lilypond 2.12 Notation 
Reference so if you even point me to the section to reference I'll 
work it out.




Fonts and Tempo

2023-05-20 Thread Greg Lindstrom
Good evening -

Let me start off by saying I'm loving working with lilypond to engrave
music. Well Done!!

Questions. How can I do this (an umlaut over the o??)

[image: image.png]

And on tempo markings (the "ca." after the equal sign. I could do it as all
text but wanted to know if there's a more "lilypond" way to do it).

[image: image.png]


And as long as I'm asking (and you're still reading). How about this (a
half note = a quarter note. I'd be happy to do it without the arrows --
which I think borders on silly -- but I'll give extra credit):

[image: image.png]

Thanks for any help you can provide. I have the Lilypond 2.12 Notation
Reference so if you even point me to the section to reference I'll work it
out.

Kind Regards,
--greg


Re: Bar numbers and multiple tempo lines

2023-05-09 Thread Kevin Pye
Thanks Jean.

This does of course work, but leaves the bar numbers a lot higher than 
previously. Using a value of 1 is almost the same as before, even 2 is a lot 
higher.

However overnight I had a thought -- moving Bar_number_engraver from the Score 
context into the ChoirStaff context restores the original behaviour quite well.

Kevin.

On Tue, 9 May 2023, at 17:30, Jean Abou Samra wrote:
> Le mardi 09 mai 2023 à 17:21 +1000, Kevin Pye a écrit :
> 
>> However, when this is done the bar numbers are lowered, and conflict with 
>> the ChoirStaff bracket: (Normally the bar numbers would be higher so as not 
>> to collide with the bracket.)  Presumably this is because the 
>> Bar_number_engraver also uses the results of the Staff_collecting_engraver.
>> 
> Yes, known issue. Try
> 
> `\override BarNumber.outside-staff-horizontal-padding = 1000  
`
> in the `\layout { \context { \Score ... } }` block.
> 
> 
> *Attachments:*
>  • signature.asc


Re: Bar numbers and multiple tempo lines

2023-05-09 Thread Jean Abou Samra
Le mardi 09 mai 2023 à 17:21 +1000, Kevin Pye a écrit :

> However, when this is done the bar numbers are lowered, and conflict with the 
> ChoirStaff bracket:
> (Normally the bar numbers would be higher so as not to collide with the 
> bracket.)  Presumably this is because the Bar_number_engraver also uses the 
> results of the Staff_collecting_engraver.


Yes, known issue. Try

```  
        \override BarNumber.outside-staff-horizontal-padding = 1000  
```

in the `\layout { \context { \Score ... } }` block.


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


Bar numbers and multiple tempo lines

2023-05-09 Thread Kevin Pye
I often generate vocal scores with multiple staves in a ChoirStaff and two 
staves in a PianoStaff. Typically such scores have the tempo markings both 
above the ChoirStaff and above the PianoStaff.

This is easily done in Lilypond by moving the Metronome_mark_engraver and 
Staff_collecting_engraver from the Score context to the ChoirStaff and 
PianoStaff contexts, as in this example:

\version "2.25.0" 

\header { 
  title   = "title" 
} 

tempoTrack = { 
  \tempo Moderato 4=120 
} 

music = \relative { 
  c'4 c c c c c c c c c c c c c c c c
  c c c c c c c c c c c c c c c c c c c c c 
  c c c c c c c c c c c c c c c c c c 
  \bar "|." 
} 

\book { 
  \score { 
<< 
  \new ChoirStaff << 
\new Staff 
<< 
  \new Voice \TempoTrack 
  \new Voice \music 
>> 
\new Staff 
<< 
  \new Voice \music 
>> 
  >> 
  \new PianoStaff << 
\new Staff 
<< 
  \new Voice \TempoTrack 
  \new Voice \music 
>> 
  >> 
>> 
\layout { 
  \context { 
\Score 
\remove Metronome_mark_engraver 
\remove Staff_collecting_engraver 
  } 
  \context { 
\ChoirStaff 
\consists Metronome_mark_engraver 
\consists Staff_collecting_engraver 
  } 
  \context { 
\PianoStaff 
\consists Metronome_mark_engraver 
\consists Staff_collecting_engraver 
  } 
} 
  } 
}

However, when this is done the bar numbers are lowered, and conflict with the 
ChoirStaff bracket:



(Normally the bar numbers would be higher so as not to collide with the 
bracket.)  Presumably this is because the Bar_number_engraver also uses the 
results of the Staff_collecting_engraver.

Is there an easy fix?

Kevin.

Re: Tempo vs. markup

2023-03-12 Thread Ralph Palmer
On Sun, Mar 12, 2023 at 5:36 AM Valentin Petzel  wrote:

> Hello Ralph,
>
> while Pierre’s solution works with some adaptation I think your approach
> is
> wrong.
>
> Tempo is something that is created at the Score level, while TextScripts
> are
> created at the Staff level. This means that it should be expected for
> TextScripts to be closer to the Staff. Rather use the correct devices for
> what
> you want:
>
> Trio
>
> is not a staff text, but in fact a label for a part or section. So rather
> use a
> SectionLabel (which also lives at the Score level), and style it to look
> the
> way you like it to look.
>
> Half as fast
>
> is in fact a Tempo mark, so include it into your tempo mark. A tempo mark
> can
> use multiple lines by using \column.
>
>
> which I’d argue is cleaner in both code and implementation.
>
> Many thanks both to Pierre and to Valentin for their solutions!

All the best,

Ralph
__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: Tempo vs. markup

2023-03-12 Thread Valentin Petzel
Hello Ralph,

while Pierre’s solution works with some adaptation I think your approach is 
wrong.

Tempo is something that is created at the Score level, while TextScripts are 
created at the Staff level. This means that it should be expected for 
TextScripts to be closer to the Staff. Rather use the correct devices for what 
you want:

Trio

is not a staff text, but in fact a label for a part or section. So rather use a 
SectionLabel (which also lives at the Score level), and style it to look the 
way you like it to look.

Half as fast

is in fact a Tempo mark, so include it into your tempo mark. A tempo mark can 
use multiple lines by using \column.

Using this your code might look like this

\version "2.24.0"

\layout {
  % Have the label start after the time signature like Metronome Mark
  % (else it would be at start of system)
  \override Score.SectionLabel.break-align-symbols = #'(time-signature)
  % Make section label normal size and bold
  \override Score.SectionLabel.font-size = #0
  \override Score.SectionLabel.font-series = #'bold
}

\relative c' {
  \time 3/4
  \sectionLabel "Trio"
  \tempo \markup \column {
"Half as fast"
\vspace #0.1 % add some spacing
% prevent = from being bold, which looks weird with stem thickness
\normal-text
\concat {
  (
  \smaller \general-align #Y #DOWN \note {2} #0.8
  " = "
  \smaller \general-align #Y #DOWN \note {4} #0.8
  )
}
  }
  d4^\markup\italic{arco} d d
}

which I’d argue is cleaner in both code and implementation.

Cheers,
Valentin

Am Sonntag, 12. März 2023, 05:45:11 CET schrieb Ralph Palmer:
> Greetings -
> 
> Thanks to all the list members who respond so quickly and thoroughly to our
> questions.
> 
> I'm running 2.24.0 and Frescobaldi 3.2 under Linux/Ubuntu.
> 
> I cannot figure out how to move the tempo indication below the markups in
> this minimal example. Can anyone help me?
> 
> All the best,
> 
> Ralph
> __
> Ralph Palmer
> Seattle
> USA
> (he, him, his)
> palmer.r.vio...@gmail.com



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


Re: Tempo vs. markup

2023-03-11 Thread Pierre Perol-Schneider
Hi Ralph,
Try:
\version "2.24.0"

\relative c' {
\time 3/4
\tweak outside-staff-priority #0
\tempo \markup {
\concat {
  (
  \smaller \general-align #Y #DOWN \note {2} #1
  " = "
  \smaller \general-align #Y #DOWN \note {4} #1
  )
}
  }
  d4^\markup\italic{arco}^\markup\bold{Half as fast}^\markup\bold{Trio} d d
}

See also:
https://lilypond.org/doc/v2.24/Documentation/notation/default-values-for-outside_002dstaff_002dpriority
HTH, Cheers,
Pierre

Le dim. 12 mars 2023 à 05:45, Ralph Palmer  a
écrit :

> Greetings -
>
> Thanks to all the list members who respond so quickly and thoroughly to
> our questions.
>
> I'm running 2.24.0 and Frescobaldi 3.2 under Linux/Ubuntu.
>
> I cannot figure out how to move the tempo indication below the markups in
> this minimal example. Can anyone help me?
>
> All the best,
>
> Ralph
> __
> Ralph Palmer
> Seattle
> USA
> (he, him, his)
> palmer.r.vio...@gmail.com
>


Tempo vs. markup

2023-03-11 Thread Ralph Palmer
Greetings -

Thanks to all the list members who respond so quickly and thoroughly to our
questions.

I'm running 2.24.0 and Frescobaldi 3.2 under Linux/Ubuntu.

I cannot figure out how to move the tempo indication below the markups in
this minimal example. Can anyone help me?

All the best,

Ralph
__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com
\version "2.24.0"

\relative c' {
  \time 3/4
\tempo \markup {
\concat {
  (
  \smaller \general-align #Y #DOWN \note {2} #1
  " = "
  \smaller \general-align #Y #DOWN \note {4} #1
  )
}
  }
  d4^\markup\italic{arco}^\markup\bold{Half as fast}^\markup\bold{Trio} d d
}

MoveTempoTest.pdf
Description: Adobe PDF document


Re: Tempo Mark with letter

2023-03-04 Thread Ralph Palmer
Thanks for the quick and helpful response, Jean!

All the best,

Ralph
__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com


On Sat, Mar 4, 2023 at 10:29 AM Jean Abou Samra  wrote:

> Le samedi 04 mars 2023 à 10:16 -0800, Ralph Palmer a écrit :
>
> Greetings -
>
> I'm running LilyPond 2.24.0 under Frescobaldi 3.2 and Ubuntu 22.04.2 LTS.
>
> I'm trying to get a tempo indication similar to the included screenshot (I
> couldn't figure out how to include the screenshot as an attachment -
> sorry). My problem is the "c." I looked at the documentation and at the
> archives. I tried multiple ways, but either the 1/4 note comes out as the
> fraction 1/4 or LilyPond rejects the "c.". I also tried using a tilde ("~")
> instead of "=c.", but no joy. It's not a huge deal, but if someone could
> point me in the right direction, I would appreciate it.
>
> \version "2.24.1"
>
> \fixed c' {
>   \tempo \markup { Simple, flowing ( \hspace #-0.4 \rhythm {{4}} = c.76) }
>   \time 2/4
>   e4\mp( d8 e)
>   c8 c( d e)
> }
>
> The \tempo   =  form doesn't support customizing the
> (note = bpm) part, but you can simply include it into the text as markup.
>
> If you also need that tempo in MIDI output, you can use tags to have a \tempo
> 4 = 76 commands in MIDI and the \tempo \markup ... command in graphical
> output.
>
> Also, note that \rhythm requires extra braces in 2.24 because its
> argument is only one note specified as a simple duration. This quirk has
> been lifted in 2.25.
>
> HTH,
>
> Jean
>


Re: Tempo Mark with letter

2023-03-04 Thread Jean Abou Samra
Le samedi 04 mars 2023 à 10:16 -0800, Ralph Palmer a écrit :
> Greetings -
> 
> I'm running LilyPond 2.24.0 under Frescobaldi 3.2 and Ubuntu 22.04.2 LTS.
> 
> I'm trying to get a tempo indication similar to the included screenshot (I 
> couldn't figure out how to include the screenshot as an attachment - sorry). 
> My problem is the "c." I looked at the documentation and at the archives. I 
> tried multiple ways, but either the 1/4 note comes out as the fraction 1/4 or 
> LilyPond rejects the "c.". I also tried using a tilde ("~") instead of "=c.", 
> but no joy. It's not a huge deal, but if someone could point me in the right 
> direction, I would appreciate it.

```
\version "2.24.1"

\fixed c' {
  \tempo \markup { Simple, flowing ( \hspace #-0.4 \rhythm {{4}} = c.76) }
  \time 2/4
  e4\mp( d8 e)
  c8 c( d e)
}
```

The `\tempo   = ` form doesn't support customizing the 
(note = bpm) part, but you can simply include it into the text as markup.

If you also need that tempo in MIDI output, you can use tags to have a `\tempo 
4 = 76` commands in MIDI and the `\tempo \markup ...` command in graphical 
output.

Also, note that `\rhythm` requires extra braces in 2.24 because its argument is 
only one note specified as a simple duration. This quirk has been lifted in 
2.25.

HTH,

Jean


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


Tempo Mark with letter

2023-03-04 Thread Ralph Palmer
Greetings -

I'm running LilyPond 2.24.0 under Frescobaldi 3.2 and Ubuntu 22.04.2 LTS.

I'm trying to get a tempo indication similar to the included screenshot (I
couldn't figure out how to include the screenshot as an attachment -
sorry). My problem is the "c." I looked at the documentation and at the
archives. I tried multiple ways, but either the 1/4 note comes out as the
fraction 1/4 or LilyPond rejects the "c.". I also tried using a tilde ("~")
instead of "=c.", but no joy. It's not a huge deal, but if someone could
point me in the right direction, I would appreciate it.

All the best,

Ralph

[image: image.png]

__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: tempo indication without parentheses

2022-12-17 Thread Paul Scott
Thank you.  I'm sure I could make definition in my shortcuts file but as 
I mentioned in the other part of this thread the extra set of curly 
brackets works fine.


Thank you all for your work on this,

Paul


On 12/17/22 6:23 PM, Valentin Petzel wrote:

Hello Paul,

formatting of the Metronome Marks is done by a function taking the event and
the context given by the context property metronomeMarkFormatter.

If we look into ly/engraver-init.ly we see the default behaviour:

metronomeMarkFormatter = #format-metronome-markup

The scheme function format-metronome-markup is defined in scm/translation-
functions.scm:

(define-public (format-metronome-markup event context)
   (let ((hide-note (ly:context-property context 'tempoHideNote #f))
 (text (ly:event-property event 'text))
 (dur (ly:event-property event 'tempo-unit))
 (count (ly:event-property event 'metronome-count)))
 (metronome-markup text dur count hide-note)))

where the scheme function metronome-markup is defined below:

(define (metronome-markup text dur count hide-note)
   (let* ((note-mark
   (if (and (not hide-note) (ly:duration? dur))
   (make-smaller-markup
(make-note-by-number-markup
 (ly:duration-log dur)
 (ly:duration-dot-count dur)
 UP))
   #f))
  (count-markup (cond ((number? count)
   (if (> count 0)
   (make-simple-markup
(number->string count))
   #f))
  ((pair? count)
   ;; Thin Spaces U+2009 & En-dash U+2013
   (make-simple-markup
(format #f "~a – ~a" (car count) (cdr count
  (else #f)))
  (note-markup (if (and (not hide-note) count-markup)
   (list
(make-general-align-markup Y DOWN note-mark)
(make-simple-markup " = ")
count-markup)
   #f))
  (text-markup (if (not (null? text)) (make-bold-markup text) #f)))
 (if text-markup
 (if (and note-markup (not hide-note))
 (make-line-markup (list (make-concat-markup
  (append (list text-markup
(make-simple-markup " ("))
  note-markup
  (list (make-simple-markup
")"))
 (make-line-markup (list text-markup)))
 (if note-markup
 (make-line-markup (list (make-concat-markup note-markup)))
 (make-null-markup)


By copying these and adapting them to your liking you can shape the formatting
any way you want, such as
→ no parentheses
→ approx sign or other marks instead of =
→ Different order of text and metronome marking

Cheers,
Valentin

Am Samstag, 17. Dezember 2022, 19:18:17 CET schrieb Paul Scott:

Tempo indications in some published music doesn't use parentheses, i.e.
quarter = 120 rather than (quarter = 120).  I have my own code to do
this but would like to know if I can get Lilypond to omit the
parentheses in:

\version "2.24.0"

   \tempo 4 = 120

TIA,

Paul




Re: tempo indication without parentheses

2022-12-17 Thread Valentin Petzel
Hello Paul,

formatting of the Metronome Marks is done by a function taking the event and 
the context given by the context property metronomeMarkFormatter.

If we look into ly/engraver-init.ly we see the default behaviour:

metronomeMarkFormatter = #format-metronome-markup

The scheme function format-metronome-markup is defined in scm/translation-
functions.scm:

(define-public (format-metronome-markup event context)
  (let ((hide-note (ly:context-property context 'tempoHideNote #f))
(text (ly:event-property event 'text))
(dur (ly:event-property event 'tempo-unit))
(count (ly:event-property event 'metronome-count)))
(metronome-markup text dur count hide-note)))

where the scheme function metronome-markup is defined below:

(define (metronome-markup text dur count hide-note)
  (let* ((note-mark
  (if (and (not hide-note) (ly:duration? dur))
  (make-smaller-markup
   (make-note-by-number-markup
(ly:duration-log dur)
(ly:duration-dot-count dur)
UP))
  #f))
 (count-markup (cond ((number? count)
  (if (> count 0)
  (make-simple-markup
   (number->string count))
  #f))
 ((pair? count)
  ;; Thin Spaces U+2009 & En-dash U+2013
  (make-simple-markup
   (format #f "~a – ~a" (car count) (cdr count
 (else #f)))
 (note-markup (if (and (not hide-note) count-markup)
  (list
   (make-general-align-markup Y DOWN note-mark)
   (make-simple-markup " = ")
   count-markup)
  #f))
 (text-markup (if (not (null? text)) (make-bold-markup text) #f)))
(if text-markup
(if (and note-markup (not hide-note))
(make-line-markup (list (make-concat-markup
 (append (list text-markup
   (make-simple-markup " ("))
 note-markup
 (list (make-simple-markup 
")"))
(make-line-markup (list text-markup)))
(if note-markup
(make-line-markup (list (make-concat-markup note-markup)))
(make-null-markup)


By copying these and adapting them to your liking you can shape the formatting 
any way you want, such as
→ no parentheses
→ approx sign or other marks instead of =
→ Different order of text and metronome marking

Cheers,
Valentin

Am Samstag, 17. Dezember 2022, 19:18:17 CET schrieb Paul Scott:
> Tempo indications in some published music doesn't use parentheses, i.e.
> quarter = 120 rather than (quarter = 120).  I have my own code to do
> this but would like to know if I can get Lilypond to omit the
> parentheses in:
> 
> \version "2.24.0"
> 
>   \tempo 4 = 120
> 
> TIA,
> 
> Paul



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


Re: tempo indication without parentheses

2022-12-17 Thread Paul Scott

Thank you,

Here's what I have in one of my files of shortcuts:

#(define-markup-command (MM layout props dura beats) (ly:duration? string?)
  (interpret-markup layout props
   (markup
    #:tiny #:raise 0.4 (#:note dura up)
    #:tiny "="
    #:tiny beats
  )))

Paul





Re: tempo indication without parentheses

2022-12-17 Thread William Rehwinkel

Dear Paul,

I wasn't able to find any vanilla lilypond options to do that for you. 
Of course I assume that you were talking about a situation in which you 
have text followed by the quarter=number tempo, because just `\tempo 4 = 
120` does display without parenthesis.


The best I could find was this snippet: 
https://lsr.di.unimi.it/LSR/Item?id=1008 , which I will paste below in 
case the page is taken offline in the future. This is probably similar 
to the code that you were running.


Thanks,

-William

%%

Copied from https://lsr.di.unimi.it/LSR/Snippet?id=869

%% http://lsr.di.unimi.it/LSR/Item?id=869

%by: ArnoldTheresius

% lilypond 2.14.x:
% Almost copied from .../scm/translation-functions.scm:
% --> added »-approx« to the function names of
% »format-metronome-markup« and »metronome-markup«
% --> replaced "=" with "≈" (approx. instead of equal)
%

%%
% START of my personal include file 'tempo-approx.ly'
%%

#(define-public (format-metronome-markup-approx event context)
  (let ((eq-sym-def (ly:context-property context 
'tempoEquationText)) ; added option
    (hide-paren (eq? #t (ly:context-property context 
'tempoHideParenthesis))) ; added option
    (num-color (ly:context-property context 'tempoNumberColor 
#f))    ; added option

    (hide-note (ly:context-property context 'tempoHideNote #f))
    (text (ly:event-property event 'text))
    (dur (ly:event-property event 'tempo-unit))
    (count (ly:event-property event 'metronome-count)))
    (metronome-markup-approx text dur count hide-note eq-sym-def 
hide-paren num-color)))


#(define-public (metronome-markup-approx text dur count hide-note 
eq-sym-def hide-paren col)

  (let* ((note-mark (if (and (not hide-note) (ly:duration? dur))
        (make-smaller-markup
         (make-note-by-number-markup (ly:duration-log dur)
                     (ly:duration-dot-count dur)
                     1))
        #f))
     (count-markup (cond ((number? count)
          (if (> count 0)
              (number->string count)
              #f))
         ((pair? count)
          (make-concat-markup
           (list
            (number->string (car count))
            (ly:wide-char->utf-8 #x2009)
            (ly:wide-char->utf-8 #x2013)
            (ly:wide-char->utf-8 #x2009)
            (number->string (cdr count)
         (else #f)))
 (note-markup (if (and (not hide-note) count-markup)
          (make-concat-markup
           (list
            (make-general-align-markup Y DOWN note-mark)
            " "
            (if (string? eq-sym-def)
    eq-sym-def
    (ly:wide-char->utf-8 #x2248))
            " "
            (if (eq? col #f)
 count-markup
 (make-with-color-markup col count-markup
          #f))
 (text-markup (if (not (null? text))
          (make-bold-markup text)
          #f)))
    (if text-markup
    (if (and note-markup (not hide-note))
    (make-line-markup (list text-markup
   (if hide-paren
    note-markup
                (make-concat-markup
             (list "("
                   note-markup
                   ")")
    (make-line-markup (list text-markup)))
    (if note-markup
    (make-line-markup (list note-markup))
    (make-null-markup)



% Make this new formatter the default:
\layout {
  \context {
    \Score
    metronomeMarkFormatter = #format-metronome-markup-approx
  }
}

#(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 (_ "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))
    `((tempoHideParenthesis
   ,boolean?
   "Hide the parenthesis around the metronome markup with text")
  (tempoEquationText
   ,string?
   "initially ''='' in the metronome markup, but here the default 
is altered to ''≈''")

  (tempoNumberColor
   ,list?
   "alternate color, in which the tempo value should be displayed")))

%%
% END of my personal include file 'tempo-approx.ly'
%%%

tempo indication without parentheses

2022-12-17 Thread Paul Scott
Tempo indications in some published music doesn't use parentheses, i.e. 
quarter = 120 rather than (quarter = 120).  I have my own code to do 
this but would like to know if I can get Lilypond to omit the 
parentheses in:


\version "2.24.0"

 \tempo 4 = 120

TIA,

Paul





Re: Vertically shift tempo prescription

2022-12-02 Thread Arno Waschk

Thanks!  knew it was my fault :-)

Arno

On 02.12.22 21:20, Jean Abou Samra wrote:

Hello,

Le 02/12/2022 à 21:11, Arno Waschk a écrit :

  %\override MetronomeMark.extra-offset = #'(-20.0 . 20.0)




Here, you are missing the context:

\override Score.MetronomeMark.extra-offset = ...
  ^

Without a context specified, overrides are applied in the
innermost context, which in this case is a Voice context.
MetronomeMark lives in Score, so the override doesn't
reach it.



  \tempo "Allegro" 4=120
    \repeat unfold 8{c'8}

  %\tweak extra-offset #'(-40.0 . 40.0)
    \tempo "Allegro" 4=120



Please see my previous reply about issue #6142.

Best,
Jean



--
Arno Waschk
Gubener Str. 44
10243 Berlin
+49 172 3149605
*a...@arnowaschk.de*

current and upcoming projects:

*Beichte* mit Markus Öhrn Schweden, on tour ab Dezember 2020
*Klaus Maria Brandauer Faust ein gefesselter Prometheus* Burgtheater
Wien, 11. November 2020
*Die Nase: Gogol und Schostakowitsch* mit Katharina Susewind und Clemens
Berger Weissenburg i. Bay. 7. November 2020
*100 Jahre Theremin mit Dorit Chrysler* Waidhofen a. d. Ybbs Schloss
Rothschild, 15. Oktober 2020
*3 Episodes of Life* Wiener Festwochen u. v. a. mit Markus Öhrn
on tour 2021
*Häusliche Gewalt* Wiener Festwochen, Biennale Wiesbaden, u. v. a. mit
Markus Öhrn
on tour 2021
*Antigone* Residenztheater München Regie: Hans Neuenfels
*Schlingensief und die Avantgarde* Publikation ZiF Bielefeld
*Fräulein Else* Hörbuch mit Elisabeth Trissenaar, erschienen 2018
*Moby Dick* mit Klaus Maria Brandauer, fortlaufend
*Debussy, gesamtes Klavierwerk* ab 2019
*Beethoven, die drei letzten Klaviersonaten* ab 2018/19
*Bach, Goldberg-Variationen* wieder ab 2019
*u. v. a.*


Re: Vertically shift tempo prescription

2022-12-02 Thread Flaming Hakama by Elaine
>
> -- Forwarded message --
> From: Arno Waschk 
> To: David Kastrup 
> Cc: Jean Abou Samra , a...@arnowaschk.de,
> lilypond-user@gnu.org
> Bcc:
> Date: Fri, 2 Dec 2022 21:11:35 +0100
> Subject: Re: Vertically shift tempo prescription
> Hi David,
>
> sure, here you are.
> (Taking the risk to be pointed to a most trivial silliness on my side :-) )
>
> \version "2.23.10"
> \score{
>   \new Staff{
>   \partial 4
>   c'4
>   \tempo "Allegro" 4=120
>   \repeat unfold 8{c'8}
>
>   %\override MetronomeMark.extra-offset = #'(-20.0 . 20.0)
>   \tempo "Allegro" 4=120
> \repeat unfold 8{c'8}
>
>   %\tweak extra-offset #'(-40.0 . 40.0)
> \tempo "Allegro" 4=120
>   \repeat unfold 8{c'8}
>
>
> }}
>
> It prints three times the same positioned Allegro.
> I hoped that uncommenting the commented lines would shift things around.
> Here it doesn't. Yet.
>
> Thanks, Arno
>

You were missing "Score." before the MetronomeMark


\version "2.22.2"
\score{
\new Staff {
\partial 4
c'4
\tempo "Allegro" 4=120
\repeat unfold 8{c'8}

    \once \override Score.MetronomeMark.extra-offset = #'(-5.0 . 5.0)
\tempo "Allegro" 4=120
\repeat unfold 8 {c'8}

%\tweak extra-offset #'(-40.0 . 40.0)
\tempo "Allegro" 4=120
\repeat unfold 8 {c'8}
}
}


HTH,

Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Re: Vertically shift tempo prescription

2022-12-02 Thread Jean Abou Samra

Hello,

Le 02/12/2022 à 21:11, Arno Waschk a écrit :

  %\override MetronomeMark.extra-offset = #'(-20.0 . 20.0)




Here, you are missing the context:

\override Score.MetronomeMark.extra-offset = ...
  ^

Without a context specified, overrides are applied in the
innermost context, which in this case is a Voice context.
MetronomeMark lives in Score, so the override doesn't
reach it.



  \tempo "Allegro" 4=120
    \repeat unfold 8{c'8}

  %\tweak extra-offset #'(-40.0 . 40.0)
    \tempo "Allegro" 4=120



Please see my previous reply about issue #6142.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Vertically shift tempo prescription

2022-12-02 Thread Arno Waschk

Hi David,

sure, here you are.
(Taking the risk to be pointed to a most trivial silliness on my side :-) )

\version "2.23.10"
\score{
  \new Staff{
  \partial 4
  c'4
  \tempo "Allegro" 4=120
  \repeat unfold 8{c'8}

  %\override MetronomeMark.extra-offset = #'(-20.0 . 20.0)
  \tempo "Allegro" 4=120
    \repeat unfold 8{c'8}

  %\tweak extra-offset #'(-40.0 . 40.0)
    \tempo "Allegro" 4=120
  \repeat unfold 8{c'8}


}}

It prints three times the same positioned Allegro.
I hoped that uncommenting the commented lines would shift things around.
Here it doesn't. Yet.

Thanks, Arno

On 30.11.22 22:38, David Kastrup wrote:

Arno Waschk  writes:


Thanks for your answers!

I tried both MetronomeMark and the direct tweak. In the result there was
no visible shift at all.
What is the correct override to try here?

An example would help.



--
Arno Waschk
Gubener Str. 44
10243 Berlin
+49 172 3149605
*a...@arnowaschk.de*

current and upcoming projects:

*Beichte* mit Markus Öhrn Schweden, on tour ab Dezember 2020
*Klaus Maria Brandauer Faust ein gefesselter Prometheus* Burgtheater
Wien, 11. November 2020
*Die Nase: Gogol und Schostakowitsch* mit Katharina Susewind und Clemens
Berger Weissenburg i. Bay. 7. November 2020
*100 Jahre Theremin mit Dorit Chrysler* Waidhofen a. d. Ybbs Schloss
Rothschild, 15. Oktober 2020
*3 Episodes of Life* Wiener Festwochen u. v. a. mit Markus Öhrn
on tour 2021
*Häusliche Gewalt* Wiener Festwochen, Biennale Wiesbaden, u. v. a. mit
Markus Öhrn
on tour 2021
*Antigone* Residenztheater München Regie: Hans Neuenfels
*Schlingensief und die Avantgarde* Publikation ZiF Bielefeld
*Fräulein Else* Hörbuch mit Elisabeth Trissenaar, erschienen 2018
*Moby Dick* mit Klaus Maria Brandauer, fortlaufend
*Debussy, gesamtes Klavierwerk* ab 2019
*Beethoven, die drei letzten Klaviersonaten* ab 2018/19
*Bach, Goldberg-Variationen* wieder ab 2019
*u. v. a.*


Re: Vertically shift tempo prescription

2022-11-30 Thread David Kastrup
Arno Waschk  writes:

> Thanks for your answers!
>
> I tried both MetronomeMark and the direct tweak. In the result there was
> no visible shift at all.
> What is the correct override to try here?

An example would help.

-- 
David Kastrup



Re: Vertically shift tempo prescription

2022-11-30 Thread Arno Waschk

Thanks for your answers!

I tried both MetronomeMark and the direct tweak. In the result there was
no visible shift at all.
What is the correct override to try here?

Best, Arno

On 30.11.22 15:03, Jean Abou Samra wrote:

Le 30/11/2022 à 14:58, David Kastrup a écrit :

Arno Waschk  writes:


Dear list,


in a complex situation i need to vertically shift the result of a
'\tempo \markup{\column{ ... }}' thing.

Probably that could be done by a \override XXX.extra-offset = #'(0.0 .
8.0) . But what is XXX in that case?

Why even bother with the name?

{
   \tweak extra-offset #'(0 . 8) \tempo \markup \column { 1 2 }
   c'1
}

It would be MetronomeMark, but for a one-shot thing like extra-offset,
it seems more suitable to use a tweak rather than an override.





Note, though, that this will fail on \tempo  = . This
is actually
a bug, https://gitlab.com/lilypond/lilypond/-/issues/6142 (one needs
\override
in that case).





--
Arno Waschk
Gubener Str. 44
10243 Berlin
+49 172 3149605
*a...@arnowaschk.de*

current and upcoming projects:

*Beichte* mit Markus Öhrn Schweden, on tour ab Dezember 2020
*Klaus Maria Brandauer Faust ein gefesselter Prometheus* Burgtheater
Wien, 11. November 2020
*Die Nase: Gogol und Schostakowitsch* mit Katharina Susewind und Clemens
Berger Weissenburg i. Bay. 7. November 2020
*100 Jahre Theremin mit Dorit Chrysler* Waidhofen a. d. Ybbs Schloss
Rothschild, 15. Oktober 2020
*3 Episodes of Life* Wiener Festwochen u. v. a. mit Markus Öhrn
on tour 2021
*Häusliche Gewalt* Wiener Festwochen, Biennale Wiesbaden, u. v. a. mit
Markus Öhrn
on tour 2021
*Antigone* Residenztheater München Regie: Hans Neuenfels
*Schlingensief und die Avantgarde* Publikation ZiF Bielefeld
*Fräulein Else* Hörbuch mit Elisabeth Trissenaar, erschienen 2018
*Moby Dick* mit Klaus Maria Brandauer, fortlaufend
*Debussy, gesamtes Klavierwerk* ab 2019
*Beethoven, die drei letzten Klaviersonaten* ab 2018/19
*Bach, Goldberg-Variationen* wieder ab 2019
*u. v. a.*


Re: Vertically shift tempo prescription

2022-11-30 Thread Flaming Hakama by Elaine
>
>
> -- Forwarded message --
> From: David Kastrup 
> To: Arno Waschk 
> Cc: lilypond-user@gnu.org, a...@arnowaschk.de
> Bcc:
> Date: Wed, 30 Nov 2022 14:58:54 +0100
> Subject: Re: Vertically shift tempo prescription
> Arno Waschk  writes:
>
> > Dear list,
> >
> >
> > in a complex situation i need to vertically shift the result of a
> > '\tempo \markup{\column{ ... }}' thing.
> >
> > Probably that could be done by a \override XXX.extra-offset = #'(0.0 .
> > 8.0) . But what is XXX in that case?
>
> Why even bother with the name?
>
> {
>   \tweak extra-offset #'(0 . 8) \tempo \markup \column { 1 2 }
>   c'1
> }
>
> It would be MetronomeMark, but for a one-shot thing like extra-offset,
> it seems more suitable to use a tweak rather than an override.
>
> --
> David Kastrup
>
>
>
I have had success with

\once \override Score.MetronomeMark #'extra-offset = #'( 0.0 . 0.8 )


HTH
Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Re: Vertically shift tempo prescription

2022-11-30 Thread Jean Abou Samra

Le 30/11/2022 à 14:58, David Kastrup a écrit :

Arno Waschk  writes:


Dear list,


in a complex situation i need to vertically shift the result of a
'\tempo \markup{\column{ ... }}' thing.

Probably that could be done by a \override XXX.extra-offset = #'(0.0 .
8.0) . But what is XXX in that case?

Why even bother with the name?

{
   \tweak extra-offset #'(0 . 8) \tempo \markup \column { 1 2 }
   c'1
}

It would be MetronomeMark, but for a one-shot thing like extra-offset,
it seems more suitable to use a tweak rather than an override.





Note, though, that this will fail on \tempo  = . This is 
actually
a bug, https://gitlab.com/lilypond/lilypond/-/issues/6142 (one needs 
\override

in that case).





OpenPGP_signature
Description: OpenPGP digital signature


Re: Vertically shift tempo prescription

2022-11-30 Thread David Kastrup
Arno Waschk  writes:

> Dear list,
>
>
> in a complex situation i need to vertically shift the result of a
> '\tempo \markup{\column{ ... }}' thing.
>
> Probably that could be done by a \override XXX.extra-offset = #'(0.0 .
> 8.0) . But what is XXX in that case?

Why even bother with the name?

{
  \tweak extra-offset #'(0 . 8) \tempo \markup \column { 1 2 }
  c'1
}

It would be MetronomeMark, but for a one-shot thing like extra-offset,
it seems more suitable to use a tweak rather than an override.

-- 
David Kastrup



Vertically shift tempo prescription

2022-11-30 Thread Arno Waschk

Dear list,


in a complex situation i need to vertically shift the result of a
'\tempo \markup{\column{ ... }}' thing.

Probably that could be done by a \override XXX.extra-offset = #'(0.0 .
8.0) . But what is XXX in that case?


Thanks for your help!

Arno


--
Arno Waschk
Gubener Str. 44
10243 Berlin
+49 172 3149605
*a...@arnowaschk.de*













current and upcoming projects:

*Beichte* mit Markus Öhrn Schweden, on tour ab Dezember 2020
*Klaus Maria Brandauer Faust ein gefesselter Prometheus* Burgtheater
Wien, 11. November 2020
*Die Nase: Gogol und Schostakowitsch* mit Katharina Susewind und Clemens
Berger Weissenburg i. Bay. 7. November 2020
*100 Jahre Theremin mit Dorit Chrysler* Waidhofen a. d. Ybbs Schloss
Rothschild, 15. Oktober 2020
*3 Episodes of Life* Wiener Festwochen u. v. a. mit Markus Öhrn
on tour 2021
*Häusliche Gewalt* Wiener Festwochen, Biennale Wiesbaden, u. v. a. mit
Markus Öhrn
on tour 2021
*Antigone* Residenztheater München Regie: Hans Neuenfels
*Schlingensief und die Avantgarde* Publikation ZiF Bielefeld
*Fräulein Else* Hörbuch mit Elisabeth Trissenaar, erschienen 2018
*Moby Dick* mit Klaus Maria Brandauer, fortlaufend
*Debussy, gesamtes Klavierwerk* ab 2019
*Beethoven, die drei letzten Klaviersonaten* ab 2018/19
*Bach, Goldberg-Variationen* wieder ab 2019
*u. v. a.*


Re: tempo markup problem

2022-08-10 Thread Jean Abou Samra




Le 11/08/2022 à 03:11, Craig Dabelstein a écrit :

Hi all,

I know this is not difficult but I just can't get it to work.

I want the tempo to look like:

Allegro moderato
die *[image of crotchet] *etwa 108 M.M.

I have this so far:

\tempo \markup \left-column { "Allegro moderato"
                                \smaller "die etwa 108 M.M."  }

To produce the crotchet I have:

\note {4} #1

but I can't get it all combined to actually work.

Any help?

All the best,




The piece you are missing is probably \line, which you
need in order to group elements in just one line of the column.

\version "2.22.2"

{
  \tempo \markup \left-column {
    "Allegro moderato"
    \line {
  \fontsize #-3 \general-align #Y #-0.8 \note {4} #1
  \smaller "die etwa 108 M.M."
    }
  }
  c'
}


See also
https://lilypond.org/doc/v2.23/Documentation/notation/formatting-text#text-markup-introduction
(that page of the documentation was improved in 2.23, but
the text there will work in 2.22 too).

Best,
Jean




Re: tempo markup problem

2022-08-10 Thread Andrew Bernard

Have a look at LSR 1138.

Andrew





tempo markup problem

2022-08-10 Thread Craig Dabelstein
Hi all,

I know this is not difficult but I just can't get it to work.

I want the tempo to look like:

Allegro moderato
die *[image of crotchet] *etwa 108 M.M.

I have this so far:

\tempo \markup \left-column { "Allegro moderato"
\smaller "die etwa 108 M.M."  }

To produce the crotchet I have:

\note {4} #1

but I can't get it all combined to actually work.

Any help?

All the best,

Craig
-- 

[image: Craig Dabelstein]
Craig Dabelstein
Owner, Maxime's Music

<https://www.facebook.com/concertbandmusicstore>
<https://www.instagram.com/maximes_music/>
<https://www.linkedin.com/company/20441607/>
<https://www.youtube.com/channel/UCxo8uqqcwzrQtCIbJ9Ea5Xg>
Mobile   0404884173
Website   concertbandmusicstore.com
Email   cr...@concertbandmusicstore.com
Address   19 Twelfth Ave, Kedron, QLD <https://maps.google.com/?q=19
Twelfth Ave, Kedron, QLD>
Free eBook: Right Hemisphere Conducting  Just sign up to our newsletter
<https://mailchi.mp/e15429808530/right-hemisphere-ebook>
[image: App Social Buttons Image]
<https://www.linkedin.com/in/concert-band-music/>


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: Tempo arguments

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

> Le 18/07/2022 à 00:35, David F. a écrit :
>> \tempo 4 = 90
>>
>> How is tempo able to take ‘4 = 90’ as an argument?  Is this
>> hardwired into the language or can any function take ‘x = y’ as an
>> argument?
>
> It is hardwired. Music functions cannot take arguments with '='.

Similar with \override and \set .  It would be nice to turn them into
some kind of music function, but so far I've come up short with ideas
for sensible implementation semantics.

\tempo has the additional complication that both

\tempo "Allegro"

and

\tempo "Allegro" 4 = 90

are valid commands.

-- 
David Kastrup



Re: Tempo arguments

2022-07-17 Thread Jean Abou Samra




Le 18/07/2022 à 00:35, David F. a écrit :

\tempo 4 = 90

How is tempo able to take ‘4 = 90’ as an argument?  Is this hardwired into the 
language or can any function take ‘x = y’ as an argument?


It is hardwired. Music functions cannot take arguments with '='.

Jean





Tempo arguments

2022-07-17 Thread David F.
\tempo 4 = 90

How is tempo able to take ‘4 = 90’ as an argument?  Is this hardwired into the 
language or can any function take ‘x = y’ as an argument?

David F.




Re: shiftDurations and tempo

2022-06-27 Thread David Kastrup
Jean Abou Samra  writes:

> When you say "tackle the resulting parser conflicts", that means
> "add precedences to solve them by making interpretation choices",
> not "solve them in a way that always does what the user might intend",
> right? As I understand it, there is a shift/reduce conflict on
>
> \tempo    [here]   # ...
>
> where the single lookahead token # is not enough
> to distinguish between \tempo   = 
> and \tempo  #  . The only
> way to "solve" while not breaking existing use of the second
> possibility would be to reduce on
>
> \tempo  [here] #
>
> and thus fail on
>
> \tempo  # = 
>
> as that would be interpreted as
>
> \tempo 
> # =  % don't know what to do with this
>
> Does that sound right? I'm interested in understanding the parser
> better, but it's a bit foggy for me at the moment.

It's a bit foggy to the wizards.  It's quite opaque for most.

Here is Bison's take on the conflicts:

lily/parser.yy: warning: shift/reduce conflict on token SCM_TOKEN 
[-Wcounterexamples]
  First example: "#{" $@1 "\\tempo" text • SCM_TOKEN '=' tempo_range
  Shift derivation
start_symbol
↳ 3: "#{" $@1 embedded_lilypond
  ↳ 51: identifier_init_nonumber
↳ 81: music_assign
  ↳ 190: simple_music
 ↳ 201: event_chord
↳ 408: tempo_event
   ↳ 175: "\\tempo" text 
embedded_scm_bare '=' tempo_range
 ↳ 22: 
• SCM_TOKEN
  Second example: "#{" $@1 "\\tempo" text • SCM_TOKEN music_list "end of input"
  Reduce derivation
$accept
↳ 0: start_symbol   
 "end of input"
 ↳ 3: "#{" $@1 embedded_lilypond
   ↳ 55: music_embedded 
music_embeddedmusic_list
 ↳ 184: music   
↳ 186: music_embedded_backup
↳ 180: music_assign 
   ↳ 189: embedded_scm
   ↳ 190: simple_music  
  ↳ 40: embedded_scm_bare
  ↳ 201: event_chord    
↳ 22: SCM_TOKEN
 ↳ 408: tempo_event
    ↳ 174: 
"\\tempo" text •
lily/parser.yy: warning: shift/reduce conflict on token SCM_IDENTIFIER 
[-Wcounterexamples]
  First example: "#{" $@1 "\\tempo" text • SCM_IDENTIFIER '=' tempo_range
  Shift derivation
start_symbol
↳ 3: "#{" $@1 embedded_lilypond
  ↳ 51: identifier_init_nonumber
↳ 81: music_assign
  ↳ 190: simple_music
 ↳ 201: event_chord
↳ 408: tempo_event
   ↳ 175: "\\tempo" text 
embedded_scm_bare  '=' tempo_range
 ↳ 23: 
• SCM_IDENTIFIER
  Second example: "#{" $@1 "\\tempo" text • SCM_IDENTIFIER music_list "end of 
input"
  Reduce derivation
$accept
↳ 0: start_symbol   
"end of input"
 ↳ 3: "#{" $@1 embedded_lilypond
   ↳ 55: music_embedded 
music_embedded   music_list
 ↳ 184: music   
↳ 186: music_embedded_backup
↳ 180: music_assign 
   ↳ 189: embedded_scm
   ↳ 190: simple_music  
      ↳ 40: embedded_scm_bare
  ↳ 201: event_chord
↳ 23: SCM_IDENTIFIER
 ↳ 408: tempo_event
↳ 174: 
"\\tempo" text •




Which actually does not look all that different from your analysis.

-- 
David Kastrup



Re: shiftDurations and tempo

2022-06-27 Thread Simon Albrecht

Hi David,

On 27/06/2022 21:07, David Kastrup wrote:

Before looking for a possible following `=`
LilyPond has to have made a decision what type the token/expression
coming before that has.  It cannot look at the type of a #... expression
before deciding to look for `=` but it can (and will) look at the type
of a $... expression.

Now syntax errors are comparatively unhelpful, so one could try to
tentatively accept an #... = ... expression anyway and then barf if the
expression type does not support it.  The result would likely not be
worse for the user.



thanks for your consideration. I don’t think I’m qualified to speak on 
that… a decision might depend on how strongly a user is expected to know 
about the # vs. $ issue.


Best, Simon




Re: shiftDurations and tempo

2022-06-27 Thread Simon Albrecht

Hi Jean,

On 27/06/2022 20:37, Jean Abou Samra wrote:



Le 27/06/2022 à 20:10, Simon Albrecht a écrit :

Hello everyone,

I’m trying to encode a piece such that I can switch whether or not 
durations will be shifted (note values halved/doubled). Unfortunately 
\tempo isn’t affected by \shiftDurations (that would be a sensible 
feature request, right?),


Go open an issue.



I did: <https://gitlab.com/lilypond/lilypond/-/issues/6366>



so I tried this:
%%%
\version "2.23.9"

durationShiftOne = #-1
{
  \tempo #(ly:make-duration

[…]


Can I make that work some other way?



\version "2.23.9"

durationShiftOne = #-1
{
  \tempo $(ly:make-duration (+ 3 durationShiftOne)) = 152
  \shiftDurations \durationShiftOne #0 { 8 }
}


You just need to use $ instead of #.



I keep forgetting to try that. I’ll try understanding the difference 
better as well. Thanks for the help!


Best, Simon




Re: shiftDurations and tempo

2022-06-27 Thread Jean Abou Samra




Le 28/06/2022 à 00:15, David Kastrup a écrit :

David Kastrup  writes:


Jean Abou Samra  writes:


Le 27/06/2022 à 20:10, Simon Albrecht a écrit :

Hello everyone,

I’m trying to encode a piece such that I can switch whether or not
durations will be shifted (note values
halved/doubled). Unfortunately \tempo isn’t affected by
\shiftDurations (that would be a sensible feature request, right?),

Go open an issue.



so I tried this:
%%%
\version "2.23.9"

durationShiftOne = #-1
{
   \tempo #(ly:make-duration (+ 3 durationShiftOne)) = 152
   \shiftDurations \durationShiftOne #0 { 8 }
}


but unfortunately Lily won’t accept that Scheme expression instead
of the normal duration.

Can I make that work some other way?

Should the parser be able to take that Scheme expression there?


\version "2.23.9"

durationShiftOne = #-1
{
   \tempo $(ly:make-duration (+ 3 durationShiftOne)) = 152
   \shiftDurations \durationShiftOne #0 { 8 }
}


You just need to use $ instead of #. See these pages about the difference:

https://lilypond.org/doc/v2.23/Documentation/extending/lilypond-scheme-syntax.html
https://extending-lilypond.readthedocs.io/en/latest/lily-and-scheme.html#hash-vs-dollar

The problem is that \tempo has multiple syntaxes (\tempo ,
\tempo  =  and \tempo   = ),
which makes it impossible to accept # here because early evaluation
is needed to disambiguate, I think. I'm no expert of the parser
though.

It's sort of like that.  Before looking for a possible following `=`
LilyPond has to have made a decision what type the token/expression
coming before that has.  It cannot look at the type of a #... expression
before deciding to look for `=` but it can (and will) look at the type
of a $... expression.

Now syntax errors are comparatively unhelpful, so one could try to
tentatively accept an #... = ... expression anyway and then barf if the
expression type does not support it.  The result would likely not be
worse for the user.

To wit:
It's debatable whether this partial ability to specify the duration as
#... but not in the long form including text is worth the confusion.
Anyone who wants to tackle the resulting parser conflicts is welcome to
try: Bison appears to do a pretty good job these days proposing
productions that may trigger the problem when giving the right options.




When you say "tackle the resulting parser conflicts", that means
"add precedences to solve them by making interpretation choices",
not "solve them in a way that always does what the user might intend",
right? As I understand it, there is a shift/reduce conflict on

\tempo    [here]   # ...

where the single lookahead token # is not enough
to distinguish between \tempo   = 
and \tempo  #  . The only
way to "solve" while not breaking existing use of the second
possibility would be to reduce on

\tempo  [here] #

and thus fail on

\tempo  # = 

as that would be interpreted as

\tempo 
# =  % don't know what to do with this

Does that sound right? I'm interested in understanding the parser
better, but it's a bit foggy for me at the moment.

Thanks,
Jean




Re: shiftDurations and tempo

2022-06-27 Thread David Kastrup
David Kastrup  writes:

> Jean Abou Samra  writes:
>
>> Le 27/06/2022 à 20:10, Simon Albrecht a écrit :
>>> Hello everyone,
>>>
>>> I’m trying to encode a piece such that I can switch whether or not
>>> durations will be shifted (note values
>>> halved/doubled). Unfortunately \tempo isn’t affected by
>>> \shiftDurations (that would be a sensible feature request, right?),
>>
>> Go open an issue.
>>
>>
>>> so I tried this:
>>> %%%
>>> \version "2.23.9"
>>>
>>> durationShiftOne = #-1
>>> {
>>>   \tempo #(ly:make-duration (+ 3 durationShiftOne)) = 152
>>>   \shiftDurations \durationShiftOne #0 { 8 }
>>> }
>>> 
>>>
>>> but unfortunately Lily won’t accept that Scheme expression instead
>>> of the normal duration.
>>>
>>> Can I make that work some other way?
>>>
>>> Should the parser be able to take that Scheme expression there?
>>
>>
>> \version "2.23.9"
>>
>> durationShiftOne = #-1
>> {
>>   \tempo $(ly:make-duration (+ 3 durationShiftOne)) = 152
>>   \shiftDurations \durationShiftOne #0 { 8 }
>> }
>>
>>
>> You just need to use $ instead of #. See these pages about the difference:
>>
>> https://lilypond.org/doc/v2.23/Documentation/extending/lilypond-scheme-syntax.html
>> https://extending-lilypond.readthedocs.io/en/latest/lily-and-scheme.html#hash-vs-dollar
>>
>> The problem is that \tempo has multiple syntaxes (\tempo ,
>> \tempo  =  and \tempo   = ),
>> which makes it impossible to accept # here because early evaluation
>> is needed to disambiguate, I think. I'm no expert of the parser
>> though.
>
> It's sort of like that.  Before looking for a possible following `=`
> LilyPond has to have made a decision what type the token/expression
> coming before that has.  It cannot look at the type of a #... expression
> before deciding to look for `=` but it can (and will) look at the type
> of a $... expression.
>
> Now syntax errors are comparatively unhelpful, so one could try to
> tentatively accept an #... = ... expression anyway and then barf if the
> expression type does not support it.  The result would likely not be
> worse for the user.

To wit:

>From 56869db10837eac331e89d074efa5952116ce3d6 Mon Sep 17 00:00:00 2001
From: David Kastrup 
Date: Tue, 28 Jun 2022 00:06:17 +0200
Subject: [PATCH] Allow \tempo # = ... for tempo specifications

What doesn't work is specifying \tempo "text" # = ...
because its implementation would lead to parser conflicts.
---
 lily/parser.yy | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/lily/parser.yy b/lily/parser.yy
index 9207e479c8..7fff2fd019 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -1403,6 +1403,16 @@ tempo_event:
 	TEMPO steno_duration '=' tempo_range	{
 		$$ = MAKE_SYNTAX (tempo, @$, SCM_EOL, $2, $4);
 	}
+	| TEMPO embedded_scm_bare '=' tempo_range {
+		if (unsmob ($2))
+		{
+			$$ = MAKE_SYNTAX (tempo, @$, SCM_EOL, $2, $4);
+		} else {
+			parser->parser_error (@2, _("duration expected"));
+			$$ = MAKE_SYNTAX (tempo, @$,
+	  SCM_EOL, Duration (2, 0).smobbed_copy (), $4);
+		}
+	}
 	| TEMPO text steno_duration '=' tempo_range	{
 		$$ = MAKE_SYNTAX (tempo, @$, $2, $3, $5);
 	}
-- 
2.34.1


It's debatable whether this partial ability to specify the duration as
#... but not in the long form including text is worth the confusion.
Anyone who wants to tackle the resulting parser conflicts is welcome to
try: Bison appears to do a pretty good job these days proposing
productions that may trigger the problem when giving the right options.

-- 
David Kastrup


Re: shiftDurations and tempo

2022-06-27 Thread David Kastrup
Jean Abou Samra  writes:

> Le 27/06/2022 à 20:10, Simon Albrecht a écrit :
>> Hello everyone,
>>
>> I’m trying to encode a piece such that I can switch whether or not
>> durations will be shifted (note values
>> halved/doubled). Unfortunately \tempo isn’t affected by
>> \shiftDurations (that would be a sensible feature request, right?),
>
> Go open an issue.
>
>
>> so I tried this:
>> %%%
>> \version "2.23.9"
>>
>> durationShiftOne = #-1
>> {
>>   \tempo #(ly:make-duration (+ 3 durationShiftOne)) = 152
>>   \shiftDurations \durationShiftOne #0 { 8 }
>> }
>> 
>>
>> but unfortunately Lily won’t accept that Scheme expression instead
>> of the normal duration.
>>
>> Can I make that work some other way?
>>
>> Should the parser be able to take that Scheme expression there?
>
>
> \version "2.23.9"
>
> durationShiftOne = #-1
> {
>   \tempo $(ly:make-duration (+ 3 durationShiftOne)) = 152
>   \shiftDurations \durationShiftOne #0 { 8 }
> }
>
>
> You just need to use $ instead of #. See these pages about the difference:
>
> https://lilypond.org/doc/v2.23/Documentation/extending/lilypond-scheme-syntax.html
> https://extending-lilypond.readthedocs.io/en/latest/lily-and-scheme.html#hash-vs-dollar
>
> The problem is that \tempo has multiple syntaxes (\tempo ,
> \tempo  =  and \tempo   = ),
> which makes it impossible to accept # here because early evaluation
> is needed to disambiguate, I think. I'm no expert of the parser
> though.

It's sort of like that.  Before looking for a possible following `=`
LilyPond has to have made a decision what type the token/expression
coming before that has.  It cannot look at the type of a #... expression
before deciding to look for `=` but it can (and will) look at the type
of a $... expression.

Now syntax errors are comparatively unhelpful, so one could try to
tentatively accept an #... = ... expression anyway and then barf if the
expression type does not support it.  The result would likely not be
worse for the user.

-- 
David Kastrup



Re: shiftDurations and tempo

2022-06-27 Thread Jean Abou Samra




Le 27/06/2022 à 20:10, Simon Albrecht a écrit :

Hello everyone,

I’m trying to encode a piece such that I can switch whether or not 
durations will be shifted (note values halved/doubled). Unfortunately 
\tempo isn’t affected by \shiftDurations (that would be a sensible 
feature request, right?),


Go open an issue.



so I tried this:
%%%
\version "2.23.9"

durationShiftOne = #-1
{
  \tempo #(ly:make-duration (+ 3 durationShiftOne)) = 152
  \shiftDurations \durationShiftOne #0 { 8 }
}


but unfortunately Lily won’t accept that Scheme expression instead of 
the normal duration.


Can I make that work some other way?

Should the parser be able to take that Scheme expression there?



\version "2.23.9"

durationShiftOne = #-1
{
  \tempo $(ly:make-duration (+ 3 durationShiftOne)) = 152
  \shiftDurations \durationShiftOne #0 { 8 }
}


You just need to use $ instead of #. See these pages about the difference:

https://lilypond.org/doc/v2.23/Documentation/extending/lilypond-scheme-syntax.html
https://extending-lilypond.readthedocs.io/en/latest/lily-and-scheme.html#hash-vs-dollar

The problem is that \tempo has multiple syntaxes (\tempo ,
\tempo  =  and \tempo   = ),
which makes it impossible to accept # here because early evaluation
is needed to disambiguate, I think. I'm no expert of the parser
though.

Best,
Jean




shiftDurations and tempo

2022-06-27 Thread Simon Albrecht

Hello everyone,

I’m trying to encode a piece such that I can switch whether or not 
durations will be shifted (note values halved/doubled). Unfortunately 
\tempo isn’t affected by \shiftDurations (that would be a sensible 
feature request, right?), so I tried this:


%%%
\version "2.23.9"

durationShiftOne = #-1
{
  \tempo #(ly:make-duration (+ 3 durationShiftOne)) = 152
  \shiftDurations \durationShiftOne #0 { 8 }
}


but unfortunately Lily won’t accept that Scheme expression instead of 
the normal duration.


Can I make that work some other way?

Should the parser be able to take that Scheme expression there?

Best, Simon




Re: extending tempo

2022-06-04 Thread Ursus Kirk

Thanks Harm,

It was a good starting point. Needed yet more tweeking and although it 
now looks right it still throws up an error, which for now will ignore


Ursus

Op 4-6-2022 om 17:06 schreef Thomas Morley:

Am Fr., 3. Juni 2022 um 15:40 Uhr schrieb E Appeldoorn :

I'm looking for a way to further extend the tempo mark

I know about the simple version

  \relative c'' {
   \tempo \markup {
 \concat {
   \bold "Andante appasionata "
   "("
   \lower #-0.5 \note {4} #UP
   " ("
   \lower #-0.5 \note {4.} #UP
   ") = 42)"
 }
   }
   a1

Now this is what I need the tempo to look like

With Swing 2=80 (  two beamed eights = \tuplet 3/2 { 4 2 } )

So how do I create the beamed eights and then create the tuplet (with 
tupletbeam -3-)
Thanks for your generous help.

vriendelijke groet, Erik Appeldoorn


Does
https://lsr.di.unimi.it/LSR/Item?id=1029
kelp?

Cheers,
   Harm


--
Met vriendelijke groet,
Erik Appeldoorn




Re: extending tempo

2022-06-04 Thread Thomas Morley
Am Fr., 3. Juni 2022 um 15:40 Uhr schrieb E Appeldoorn :
>
> I'm looking for a way to further extend the tempo mark
>
> I know about the simple version
>
>  \relative c'' {
>   \tempo \markup {
> \concat {
>   \bold "Andante appasionata "
>   "("
>   \lower #-0.5 \note {4} #UP
>   " ("
>   \lower #-0.5 \note {4.} #UP
>   ") = 42)"
> }
>   }
>   a1
>
> Now this is what I need the tempo to look like
>
> With Swing 2=80 (  two beamed eights = \tuplet 3/2 { 4 2 } )
>
> So how do I create the beamed eights and then create the tuplet (with 
> tupletbeam -3-)
> Thanks for your generous help.
>
> vriendelijke groet, Erik Appeldoorn
>

Does
https://lsr.di.unimi.it/LSR/Item?id=1029
kelp?

Cheers,
  Harm



extending tempo

2022-06-03 Thread E Appeldoorn

I'm looking for a way to further extend the tempo mark

I know about the simple version

 \relative c'' {
  \tempo \markup {
\concat {
  \bold "Andante appasionata "
  "("
  \lower #-0.5 \note {4} #UP
  " ("
  \lower #-0.5 \note {4.} #UP
  ") = 42)"
}
  }
  a1

Now this is what I need the tempo to look like

With Swing 2=80 (  two beamed eights = \tuplet 3/2 { 4 2 } )

So how do I create the beamed eights and then create the tuplet (with 
tupletbeam -3-)

Thanks for your generous help.

vriendelijke groet, Erik Appeldoorn


Re: problems with \tempo

2022-03-16 Thread Carl Sorensen
I'm sorry to top post.  My outlook online email client doesn't work well with 
the Liypond mailer, and my desktop Outlook client is broken right now.

Have you looked at the lilypond log file?  Your snippet creates errors.

var/folders/q5/88k2s1717qv1v7rq4tqz53k8gn/T/frescobaldi-5i3u1hok/tmpc7w_p6ze/document.ly:4:28:
 error: not a note name: …

 \tempo "Allegro" 2 = 200  
                           … 400 … 600
/var/folders/q5/88k2s1717qv1v7rq4tqz53k8gn/T/frescobaldi-5i3u1hok/tmpc7w_p6ze/document.ly:4:30:
 error: not a duration
 \tempo "Allegro" 2 = 200  … 
                             400 … 600
/var/folders/q5/88k2s1717qv1v7rq4tqz53k8gn/T/frescobaldi-5i3u1hok/tmpc7w_p6ze/document.ly:4:34:
 error: not a note name: …
 \tempo "Allegro" 2 = 200  … 400 
                                 … 600
/var/folders/q5/88k2s1717qv1v7rq4tqz53k8gn/T/frescobaldi-5i3u1hok/tmpc7w_p6ze/document.ly:4:36:
 error: not a duration
 \tempo "Allegro" 2 = 200  … 400 … 
                                   600

You have improper lilypond code.

The code below should give you accelerating tempo in midi (but it does it in 
steps, not continuously).
 theMusic = \relative {
 \tempo "Largo" 4 = 50
 c''4 c c c |
 \tempo "Allegro" 2 = 200
 c2 c 
 \set Score.tempoHideNote = ##t
 \tempo 2 = 400
c c |
 \set Score.tempoHideNote = ##t
 \tempo 2 = 600
 c c c c |
}

Carl



From: lilypond-user  
on behalf of Mario Bolognani 
Sent: Wednesday, March 16, 2022 10:20 AM
To: Knute Snortum
Cc: lilypond-user
Subject: Re: problems with \tempo

Many thanks Knute,

using your snippet in this way:

theMusic = \relative {
 \tempo "Largo" 4 = 50
 c''4 c c c |
 \tempo "Allegro" 2 = 200  … 400 … 600
 c2 c c c |
}

nothing changes. The midi output of “Allegro” is not going progressively faster.

Mario


Mario Bolognani
mario.bologn...@gmail.com



> Il giorno 16 mar 2022, alle ore 15:46, Knute Snortum  ha 
> scritto:
>
> As always, a small, working example will help diagnose the problem and
> demonstrate to us what is going wrong.  For instance, this snippet
> works fine for me:
>
> %%%
> \version "2.22.2"
>
> theMusic = \relative {
>  \tempo "Largo" 4 = 50
>  c''4 c c c |
>  \tempo "Alegro" 4 = 120
>  c4 c c c |
> }
>
> \score {
>  \new Staff \theMusic
>  \layout {}
>  \midi {}
> }
> %%%
>
> --
> Knute Snortum
>
>
> --
> Knute Snortum
>
>
>
> On Wed, Mar 16, 2022 at 1:47 AM Jacques Menu  wrote:
>>
>> Hello Mario,
>>
>> The \midi block is your friend:
>>
>> \book {
>>  \score {
>>    <<
>>
>>      \new Staff = "Part_POne_Staff_One"
>>      \with {
>>      }
>>      <<
>>        \context Voice = "Part_POne_Staff_One_Voice_One" <<
>>          \Part_POne_Staff_One_Voice_One
>>>>
>>>>
>>
>>>>
>>
>>    \layout {
>>      \context {
>>        \Score
>>        autoBeaming = ##f % to display tuplets brackets
>>      }
>>      \context {
>>        \Voice
>>      }
>>    }
>>
>>    \midi {
>>      \tempo 16 = 360
>>    }
>>  }
>>
>> }
>>
>>
>> Le 16 mars 2022 à 05:08, Mario Bolognani  a écrit 
>> :
>>
>> I’m using LilyPomd 2.20 with Frescobaldi 3.1.3 on a MacBook M1 with  MacOSX 
>> Monterey (last version). With \time 3)1 and \tempo \breve (or breve.) = xx 
>> the midi output seems not responding to \tempo changes. Any suggestion?
>>
>> Many thanks
>>
>>
>> Mario Bolognani
>> mario.bologn...@gmail.com
>>
>>
>>
>>





Re: problems with \tempo

2022-03-16 Thread Mario Bolognani
Many thanks Knute,

using your snippet in this way:

theMusic = \relative {
 \tempo "Largo" 4 = 50
 c''4 c c c |
 \tempo "Allegro" 2 = 200  … 400 … 600
 c2 c c c |
}

nothing changes. The midi output of “Allegro” is not going progressively faster.

Mario


Mario Bolognani
mario.bologn...@gmail.com



> Il giorno 16 mar 2022, alle ore 15:46, Knute Snortum  ha 
> scritto:
> 
> As always, a small, working example will help diagnose the problem and
> demonstrate to us what is going wrong.  For instance, this snippet
> works fine for me:
> 
> %%%
> \version "2.22.2"
> 
> theMusic = \relative {
>  \tempo "Largo" 4 = 50
>  c''4 c c c |
>  \tempo "Alegro" 4 = 120
>  c4 c c c |
> }
> 
> \score {
>  \new Staff \theMusic
>  \layout {}
>  \midi {}
> }
> %%%
> 
> --
> Knute Snortum
> 
> 
> --
> Knute Snortum
> 
> 
> 
> On Wed, Mar 16, 2022 at 1:47 AM Jacques Menu  wrote:
>> 
>> Hello Mario,
>> 
>> The \midi block is your friend:
>> 
>> \book {
>>  \score {
>><<
>> 
>>  \new Staff = "Part_POne_Staff_One"
>>  \with {
>>  }
>>  <<
>>\context Voice = "Part_POne_Staff_One_Voice_One" <<
>>  \Part_POne_Staff_One_Voice_One
>>>> 
>>>> 
>> 
>>>> 
>> 
>>\layout {
>>  \context {
>>\Score
>>autoBeaming = ##f % to display tuplets brackets
>>  }
>>  \context {
>>    \Voice
>>  }
>>}
>> 
>>\midi {
>>  \tempo 16 = 360
>>}
>>  }
>> 
>> }
>> 
>> 
>> Le 16 mars 2022 à 05:08, Mario Bolognani  a écrit 
>> :
>> 
>> I’m using LilyPomd 2.20 with Frescobaldi 3.1.3 on a MacBook M1 with  MacOSX 
>> Monterey (last version). With \time 3)1 and \tempo \breve (or breve.) = xx 
>> the midi output seems not responding to \tempo changes. Any suggestion?
>> 
>> Many thanks
>> 
>> 
>> Mario Bolognani
>> mario.bologn...@gmail.com
>> 
>> 
>> 
>> 




Re: problems with \tempo

2022-03-16 Thread Knute Snortum
As always, a small, working example will help diagnose the problem and
demonstrate to us what is going wrong.  For instance, this snippet
works fine for me:

%%%
\version "2.22.2"

theMusic = \relative {
  \tempo "Largo" 4 = 50
  c''4 c c c |
  \tempo "Alegro" 4 = 120
  c4 c c c |
}

\score {
  \new Staff \theMusic
  \layout {}
  \midi {}
}
%%%

--
Knute Snortum


--
Knute Snortum



On Wed, Mar 16, 2022 at 1:47 AM Jacques Menu  wrote:
>
> Hello Mario,
>
> The \midi block is your friend:
>
> \book {
>   \score {
> <<
>
>   \new Staff = "Part_POne_Staff_One"
>   \with {
>   }
>   <<
> \context Voice = "Part_POne_Staff_One_Voice_One" <<
>   \Part_POne_Staff_One_Voice_One
> >>
>   >>
>
> >>
>
> \layout {
>   \context {
> \Score
> autoBeaming = ##f % to display tuplets brackets
>   }
>   \context {
> \Voice
>   }
> }
>
> \midi {
>   \tempo 16 = 360
> }
>   }
>
> }
>
>
> Le 16 mars 2022 à 05:08, Mario Bolognani  a écrit :
>
> I’m using LilyPomd 2.20 with Frescobaldi 3.1.3 on a MacBook M1 with  MacOSX 
> Monterey (last version). With \time 3)1 and \tempo \breve (or breve.) = xx 
> the midi output seems not responding to \tempo changes. Any suggestion?
>
> Many thanks
>
>
> Mario Bolognani
> mario.bologn...@gmail.com
>
>
>
>



Re: problems with \tempo

2022-03-16 Thread Jacques Menu
Hello Mario,

The \midi block is your friend:

\book {
  \score {
<<

  \new Staff = "Part_POne_Staff_One"
  \with {
  }
  <<
\context Voice = "Part_POne_Staff_One_Voice_One" <<
  \Part_POne_Staff_One_Voice_One
>>
  >>

>>

\layout {
  \context {
\Score
autoBeaming = ##f % to display tuplets brackets
  }
  \context {
\Voice
  }
}

\midi {
  \tempo 16 = 360
}
  }

}


> Le 16 mars 2022 à 05:08, Mario Bolognani  a écrit :
> 
> I’m using LilyPomd 2.20 with Frescobaldi 3.1.3 on a MacBook M1 with  MacOSX 
> Monterey (last version). With \time 3)1 and \tempo \breve (or breve.) = xx 
> the midi output seems not responding to \tempo changes. Any suggestion?
> 
> Many thanks 
> 
> 
> Mario Bolognani
> mario.bologn...@gmail.com <mailto:mario.bologn...@gmail.com>
> 
> 
> 



problems with \tempo

2022-03-15 Thread Mario Bolognani
I’m using LilyPomd 2.20 with Frescobaldi 3.1.3 on a MacBook M1 with  MacOSX 
Monterey (last version). With \time 3)1 and \tempo \breve (or breve.) = xx the 
midi output seems not responding to \tempo changes. Any suggestion?

Many thanks 


Mario Bolognani
mario.bologn...@gmail.com





Re: Fingering collision with tempo when using cross-staff beams

2022-01-06 Thread Valentin Petzel
A quick workaround:

\version "2.23.5"

global = {
  \time 6/8
  \tempo "Allegro"
}

goUp = { \change Staff = "right"
 \stemDown
}

goDown = { \change Staff = "left"
   \stemUp
}

right = \relative c'' {
  \global
  \once\override Fingering.cross-staff = ##f
  8-2-4 \goDown  \goUp  \goDown d,4.->_5 |

}

left = \relative c' {
  \global
  s2. |

}

\score {
  \new PianoStaff <<
\new Staff = "right" \right
\new Staff = "left" { \left }
  >>
}

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


Re: Fingering collision with tempo when using cross-staff beams

2022-01-05 Thread Jean Abou Samra

Le 05/01/2022 à 20:59, Michael Rivers a écrit :
The fingering here collides with the tempo. If the cross-staff beams 
are commented out (all notes on the upper staff), the fingering 
displays fine.


Is there a workaround? Am I doing something wrong?

\version "2.23.5"

global = {
  \time 6/8
  \tempo "Allegro"
}

goUp = { \change Staff = "right"
         \stemDown
}

goDown = { \change Staff = "left"
           \stemUp
}

right = \relative c'' {
  \global
  8-2-4 \goDown  \goUp  \goDown d,4.->_5 |
}

left = \relative c' {
  \global
  s2. |
}

\score {
  \new PianoStaff <<
    \new Staff = "right" \right
    \new Staff = "left" { \left }
  >>
}




I've just added this bug to the tracker here:

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

You can work around it by positioning the tempo mark yourself, adjusting 
its Y-offset:


\version "2.23.5"

global = {
  \time 6/8
  \once \override Score.MetronomeMark.Y-offset = 6
  \tempo "Allegro"
}

goUp = { \change Staff = "right"
 \stemDown
}

goDown = { \change Staff = "left"
   \stemUp
}

right = \relative c'' {
  \global
  8-2-4 \goDown  \goUp  \goDown d,4.->_5 |

}

left = \relative c' {
  \global
  s2. |

}

\score {
  \new PianoStaff <<
    \new Staff = "right" \right
    \new Staff = "left" { \left }
  >>
}

See this for more information:

https://lilypond.org/doc/v2.22/Documentation/notation/aligning-objects.html#setting-x_002doffset-and-y_002doffset-directly

Best,
Jean






Fingering collision with tempo when using cross-staff beams

2022-01-05 Thread Michael Rivers
The fingering here collides with the tempo. If the cross-staff beams are
commented out (all notes on the upper staff), the fingering displays fine.

Is there a workaround? Am I doing something wrong?

\version "2.23.5"

global = {
  \time 6/8
  \tempo "Allegro"
}

goUp = { \change Staff = "right"
 \stemDown
}

goDown = { \change Staff = "left"
   \stemUp
}

right = \relative c'' {
  \global
  8-2-4 \goDown  \goUp  \goDown d,4.->_5 |

}

left = \relative c' {
  \global
  s2. |

}

\score {
  \new PianoStaff <<
\new Staff = "right" \right
\new Staff = "left" { \left }
  >>
}


Re: Relative Tempo Markings in Lilypond 2.22

2021-12-30 Thread David M. Boothe, CAS
Thanks, Carl. I didn't think about convert-ly. It's been a while since I
needed it.

dB

On Wed, Dec 29, 2021, 11:10 PM Carl Sorensen  wrote:

>
>
> convert-ly will fix this for you.
>
> The argument for \note changed from a string ( #"8")  to a duration
> ({8}).  See http://lilypond.org/doc/v2.22/Documentation/changes/
>
> HTH,
>
> Carl
>
>
>


Re: Relative Tempo Markings in Lilypond 2.22

2021-12-29 Thread Carl Sorensen


On 12/29/21, 6:20 PM, "lilypond-user on behalf of David M. Boothe, CAS" 
 wrote:

I have a score in 2.18, one section of which uses with the following code:

\tempo \markup { \pad-to-box #'(0 . 0) #'(8 . 10)
  \concat {
{ \override #'(font-name . "Linux Biolinum Slanted")
\fontsize #1 "Musette  " }
  (
  \small \general-align #Y #DOWN \note #"8" #1
  " = "
  \small \general-align #Y #DOWN \note #"8" #1
  )
  }
  }
This produces the section title followed by eighth note equals eighth
note, in parentheses.

When I tried to render the score in 2.22, I received the following
error message:

/music_typeset/tonsing_pm+f/tonsing_pm+f3.ly:147:52: error: wrong type
for argument 1.  Expecting duration, found "8"
  \small \general-align #Y #DOWN \note
   #"8" #1
As best I can tell, I'm using the form given in the manual, so I'm not
sure what this error means or how to fix it. Commenting out the code
to create the "Musette" title makes no difference.

I'm using Lilypond in Frescobaldi on WIndows 10.

convert-ly will fix this for you.

The argument for \note changed from a string ( #"8")  to a duration ({8}).  See 
http://lilypond.org/doc/v2.22/Documentation/changes/

HTH,

Carl
 



Relative Tempo Markings in Lilypond 2.22

2021-12-29 Thread David M. Boothe, CAS
I have a score in 2.18, one section of which uses with the following code:

\tempo \markup { \pad-to-box #'(0 . 0) #'(8 . 10)
  \concat {
{ \override #'(font-name . "Linux Biolinum Slanted")
\fontsize #1 "Musette  " }
  (
  \small \general-align #Y #DOWN \note #"8" #1
  " = "
  \small \general-align #Y #DOWN \note #"8" #1
  )
  }
  }
This produces the section title followed by eighth note equals eighth
note, in parentheses.

When I tried to render the score in 2.22, I received the following
error message:

/music_typeset/tonsing_pm+f/tonsing_pm+f3.ly:147:52: error: wrong type
for argument 1.  Expecting duration, found "8"
  \small \general-align #Y #DOWN \note
   #"8" #1
As best I can tell, I'm using the form given in the manual, so I'm not
sure what this error means or how to fix it. Commenting out the code
to create the "Musette" title makes no difference.

I'm using Lilypond in Frescobaldi on WIndows 10.

Me: I've been using Lilypond for 15 or 16 years, but am new to this list.

Thanks for any help.

dB



Re: Dynamics and tempo alignment?

2021-11-04 Thread Kevin Cole
On Thu, Nov 4, 2021 at 2:31 PM Mark Knoop  wrote:

> \tempo is not a postfix command like dynamics and markups. Just put it before 
> the g2.

I do so love the simple fixes. Thanks!



Re: Dynamics and tempo alignment?

2021-11-04 Thread Mark Knoop



At 14:16 on 04 Nov 2021, Kevin Cole wrote:

Hi,

I think I'm making great strides with my wee little transcriptions,
but here's my latest puzzle:

I have the following measure:

  g2^\>\tempo \markup { \italic "Slower." } 4 = 65
  <<
{ \voiceOne fs8\!\p([ g8]) }
\new Voice
{ \voiceTwo fs8 g8 }
  >>
  \oneVoice  | %  20

I want the "Slower (♩= 65)" to appear above and at the start of the
decrescendo. But instead it appears to the right of it. (See attached
PNG.)  There seem to be a lot of different -- and to me -- overly
complicated -- ways of doing this. Is there a "recommended" way
without trying to give relative coordinates to move to?


\tempo is not a postfix command like dynamics and markups. Just put it before 
the g2.

--
Mark Knoop



Dynamics and tempo alignment?

2021-11-04 Thread Kevin Cole
Hi,

I think I'm making great strides with my wee little transcriptions,
but here's my latest puzzle:

I have the following measure:

  g2^\>\tempo \markup { \italic "Slower." } 4 = 65
  <<
{ \voiceOne fs8\!\p([ g8]) }
\new Voice
{ \voiceTwo fs8 g8 }
  >>
  \oneVoice  | %  20

I want the "Slower (♩= 65)" to appear above and at the start of the
decrescendo. But instead it appears to the right of it. (See attached
PNG.)  There seem to be a lot of different -- and to me -- overly
complicated -- ways of doing this. Is there a "recommended" way
without trying to give relative coordinates to move to?

Thanks.


Re: Getting \tempo params

2021-10-21 Thread David Kastrup
Paolo Prete  writes:

> On Thu, Oct 21, 2021 at 3:04 PM David Kastrup  wrote:
>
>>
>>
>> Here's a cut of something I currently use in scores of mine for
>> doing things like accelerando, ritardando, and so on.
>>
>> tempoChange =
>> #(define-music-function (interval endscale thenscale music)
>>(ly:duration? scale? (scale? 1) ly:music?)
>>   "Make a gradual tempo change over @var{music}, essentially changing
>> speed after
>> every duration of @var{interval}, approaching a factor of speed of
>> @var{endscale}
>> compared to the start.  Afterwards, tempo is switched to @var{thenscale}
>> of the
>> original speed (default 1).  If @var{thenscale} is 0, the speed reached at
>> the
>> end is just maintained and can be overriden with an explicit @samp{\\tempo}
>> command if required."
>>(define (scaletempo oldscale newscale)
>>  (make-apply-context
>>   (lambda (ctx)
>> (set! (ly:context-property ctx 'tempoWholesPerMinute)
>>  (ly:moment-mul (ly:context-property ctx 'tempoWholesPerMinute)
>>  (ly:make-moment (/ newscale oldscale)))
>>
>>(let* ((muslen (ly:moment-main (ly:music-length music)))
>>   (intlen (ly:moment-main (ly:duration-length interval)))
>>   (steps (/ muslen intlen))
>>   (endfactor (scale->factor endscale))
>>   (thenfactor (scale->factor thenscale)))
>>  (make-simultaneous-music
>>   (list music
>> (context-spec-music
>>  (make-sequential-music
>>   (let loop ((rsteplst (iota (1+ steps) endfactor (/ (- 1
>> endfactor) steps)))
>>  (res (if (positive? thenfactor)
>>   (list (scaletempo endfactor thenfactor))
>>   (list
>> (if (null? (cdr rsteplst))
>> res
>> (loop (cdr rsteplst)
>>   (cons* (scaletempo (cadr rsteplst) (car
>> rsteplst))
>>  (make-skip-music (ly:make-duration 0 0
>> intlen))
>>      res)
>>  'Score)
>>
>> See if that helps you achieve your objective.
>>
>>
> This is interesting, thanks, but I don't understand if it fits with the
> growing beam example.
>  When that beams occur, I need three parameters:
>
> 1) the \tempo just before the beam
> 2) the \tempo at first note of the beam
> 3) the \tempo at the last note of the beam.
>
> Soon after the beam, I need that the tempo must be reset to 1)

That's the default.

> From what I see, in your code, at the end of $music the tempo is reset to
> 2) : am I wrong?

I guess so.

2) is not separately settable but determined by the requested overall
speed change (probably 1/2 or 2/1 in your case) divided by the number of
steps requested (probably 4 or 8 or so).

-- 
David Kastrup



Re: Getting \tempo params

2021-10-21 Thread Paolo Prete
On Thu, Oct 21, 2021 at 3:04 PM David Kastrup  wrote:

>
>
> Here's a cut of something I currently use in scores of mine for
> doing things like accelerando, ritardando, and so on.
>
> tempoChange =
> #(define-music-function (interval endscale thenscale music)
>(ly:duration? scale? (scale? 1) ly:music?)
>   "Make a gradual tempo change over @var{music}, essentially changing
> speed after
> every duration of @var{interval}, approaching a factor of speed of
> @var{endscale}
> compared to the start.  Afterwards, tempo is switched to @var{thenscale}
> of the
> original speed (default 1).  If @var{thenscale} is 0, the speed reached at
> the
> end is just maintained and can be overriden with an explicit @samp{\\tempo}
> command if required."
>(define (scaletempo oldscale newscale)
>  (make-apply-context
>   (lambda (ctx)
> (set! (ly:context-property ctx 'tempoWholesPerMinute)
>  (ly:moment-mul (ly:context-property ctx 'tempoWholesPerMinute)
>  (ly:make-moment (/ newscale oldscale)))
>
>(let* ((muslen (ly:moment-main (ly:music-length music)))
>   (intlen (ly:moment-main (ly:duration-length interval)))
>   (steps (/ muslen intlen))
>   (endfactor (scale->factor endscale))
>   (thenfactor (scale->factor thenscale)))
>  (make-simultaneous-music
>   (list music
> (context-spec-music
>  (make-sequential-music
>   (let loop ((rsteplst (iota (1+ steps) endfactor (/ (- 1
> endfactor) steps)))
>  (res (if (positive? thenfactor)
>   (list (scaletempo endfactor thenfactor))
>   (list
> (if (null? (cdr rsteplst))
> res
> (loop (cdr rsteplst)
>   (cons* (scaletempo (cadr rsteplst) (car
> rsteplst))
>  (make-skip-music (ly:make-duration 0 0
> intlen))
>  res)
>  'Score)
>
> See if that helps you achieve your objective.
>
>
This is interesting, thanks, but I don't understand if it fits with the
growing beam example.
 When that beams occur, I need three parameters:

1) the \tempo just before the beam
2) the \tempo at first note of the beam
3) the \tempo at the last note of the beam.

Soon after the beam, I need that the tempo must be reset to 1)

>From what I see, in your code, at the end of $music the tempo is reset to
2) : am I wrong?






> --
> David Kastrup
>


Re: Getting \tempo params

2021-10-21 Thread David Kastrup
Paolo Prete  writes:

> On Thu, Oct 21, 2021 at 2:01 PM David Kastrup  wrote:
>
>> Paolo Prete  writes:
>>
>> > On Thu, Oct 21, 2021 at 1:22 PM David Kastrup  wrote:
>> >
>> >> Paolo Prete  writes:
>> >>
>> >> > Hello,
>> >> >
>> >> > after a \tempo X = Y is set, is there a way (a scheme function or
>> >> > variable?) to get X and Y?
>> >>
>> >> What does "after" mean and "is set"?  At a later point in the source
>> >> text, at a later time in musical execution?
>> >>
>> >>
>> > yes
>>
>> Those are two different things entirely.  "yes" as an answer is not
>> suitable.
>>
>
>
> Sorry, I used a bad quote of the text. With "yes" I mean "at a later point
> in the source text".

And then you go on to give an example where clearly "at a later time in
musical execution" is desired.

>> > unfortunately this doesn't sound trivial to achieve, and I presume
>> > that tempoWholesPerMinute is not in the API.
>>
>> I have no idea what you mean by "is not in the API".  What is the API
>> according to your definition?
>>
>>
> API is the public interface exposed to the user. I assumed that
> tempoWholesPerMinute was internal stuff,


> but I just checked that it IS in the API:
> https://lilypond.org/doc/v2.22/Documentation/internals/tempo_005fperformer

Given that the manual is called "Internals", you may need to adjust your
terminology to that other LilyPond users work with.

> Anyway, I don't know if it fits what I need. More specifically, I'm
> trying to obtain in the midi output the behavior of growing beams
> (Beam.grow-direction). For example, a sort of accelerando from a fixed
> metronome (which is not the previous metronome mark).  After the beam,
> the metronome must be reset to the initial value.  For example:
>
> %%%
> {
>
> \tempo 4 = 120
>
> c'4
>
> \override Beam.grow-direction = #RIGHT
> %start from \tempo 4 = 40
> c'16[
> % \tempo 4 = 40 + 20%
> c'
> % \tempo 4 = 40 + 40%
> c'
> % \tempo 4 = 40 + 60%
> c']
>
> %reset \tempo to 4 = 120
> c'4
>
> }
> %%%
>
> I already wrote a Scheme function that increases a tempo by 20% for each
> note grouped by the beam, starting from a chosen value, but I don't know
> how to reset the tempo after the beam.

Here's a cut of something I currently use in scores of mine for
doing things like accelerando, ritardando, and so on.

tempoChange =
#(define-music-function (interval endscale thenscale music)
   (ly:duration? scale? (scale? 1) ly:music?)
  "Make a gradual tempo change over @var{music}, essentially changing speed 
after
every duration of @var{interval}, approaching a factor of speed of 
@var{endscale}
compared to the start.  Afterwards, tempo is switched to @var{thenscale} of the
original speed (default 1).  If @var{thenscale} is 0, the speed reached at the
end is just maintained and can be overriden with an explicit @samp{\\tempo}
command if required."
   (define (scaletempo oldscale newscale)
 (make-apply-context
  (lambda (ctx)
(set! (ly:context-property ctx 'tempoWholesPerMinute)
 (ly:moment-mul (ly:context-property ctx 'tempoWholesPerMinute)
 (ly:make-moment (/ newscale oldscale)))

   (let* ((muslen (ly:moment-main (ly:music-length music)))
  (intlen (ly:moment-main (ly:duration-length interval)))
  (steps (/ muslen intlen))
  (endfactor (scale->factor endscale))
  (thenfactor (scale->factor thenscale)))
 (make-simultaneous-music
  (list music
(context-spec-music
 (make-sequential-music
  (let loop ((rsteplst (iota (1+ steps) endfactor (/ (- 1 
endfactor) steps)))
 (res (if (positive? thenfactor)
  (list (scaletempo endfactor thenfactor))
  (list
(if (null? (cdr rsteplst))
res
(loop (cdr rsteplst)
  (cons* (scaletempo (cadr rsteplst) (car rsteplst))
 (make-skip-music (ly:make-duration 0 0 intlen))
 res)
 'Score)

See if that helps you achieve your objective.

-- 
David Kastrup



Re: Getting \tempo params

2021-10-21 Thread Paolo Prete
On Thu, Oct 21, 2021 at 2:01 PM David Kastrup  wrote:

> Paolo Prete  writes:
>
> > On Thu, Oct 21, 2021 at 1:22 PM David Kastrup  wrote:
> >
> >> Paolo Prete  writes:
> >>
> >> > Hello,
> >> >
> >> > after a \tempo X = Y is set, is there a way (a scheme function or
> >> > variable?) to get X and Y?
> >>
> >> What does "after" mean and "is set"?  At a later point in the source
> >> text, at a later time in musical execution?
> >>
> >>
> > yes
>
> Those are two different things entirely.  "yes" as an answer is not
> suitable.
>


Sorry, I used a bad quote of the text. With "yes" I mean "at a later point
in the source text".


>
> > unfortunately this doesn't sound trivial to achieve, and I presume that
> > tempoWholesPerMinute is not in the API.
>
> I have no idea what you mean by "is not in the API".  What is the API
> according to your definition?
>
>
API is the public interface exposed to the user. I assumed that
tempoWholesPerMinute  was internal stuff, but I just checked that it IS in
the API:
https://lilypond.org/doc/v2.22/Documentation/internals/tempo_005fperformer
Anyway, I don't know if it fits what I need. More specifically, I'm trying
to obtain in the midi output the behavior of growing beams
(Beam.grow-direction). For example, a sort of accelerando from a fixed
metronome (which is not the previous metronome mark).
After the beam, the metronome must be reset to the initial value.
For example:

%%%
{

\tempo 4 = 120

c'4

\override Beam.grow-direction = #RIGHT
%start from \tempo 4 = 40
c'16[
% \tempo 4 = 40 + 20%
c'
% \tempo 4 = 40 + 40%
c'
% \tempo 4 = 40 + 60%
c']

%reset \tempo to 4 = 120
c'4

}
%%%

I already wrote a Scheme function that increases a tempo by 20% for each
note grouped by the beam, starting from a chosen value, but I don't know
how to reset the tempo after the beam.

thanks,
P


Re: Getting \tempo params

2021-10-21 Thread David Kastrup
Paolo Prete  writes:

> On Thu, Oct 21, 2021 at 1:22 PM David Kastrup  wrote:
>
>> Paolo Prete  writes:
>>
>> > Hello,
>> >
>> > after a \tempo X = Y is set, is there a way (a scheme function or
>> > variable?) to get X and Y?
>>
>> What does "after" mean and "is set"?  At a later point in the source
>> text, at a later time in musical execution?
>>
>>
> yes

Those are two different things entirely.  "yes" as an answer is not
suitable.

>> With regard to the latter (which you could access in callbacks or
>> \applyContext) \tempo sets the context variable tempoWholesPerMinute in
>> the Score context.  How this relates to X and Y depends on the unit of
>> the beat.  A reasonable guess is it is measured in baseMoment beats,
>> possibly multipled by the gcd of the values in beatStructure (if any).
>> At least that's what Time_signature_performer tries to state.
>>
>>
> unfortunately this doesn't sound trivial to achieve, and I presume that
> tempoWholesPerMinute is not in the API.

I have no idea what you mean by "is not in the API".  What is the API
according to your definition?

> Then I wonder if it's preferable to override the \tempo function by setting
> two custom vars

Setting variables (unless you mean context properties) sounds like you
are interested in "a later point in the source text" which is quite
different from what I was writing about.

\tempo creates a music expression, and this music expression has effects
when the music is being interpreted ("iterated").  You sound like you
want to remember what \tempo does in the source text instead.  That's
kind of unusual and there are few things treated in that manner (default
durations during entry are the main exception coming to mind).  What are
you actually trying to do?

-- 
David Kastrup



Re: Getting \tempo params

2021-10-21 Thread Paolo Prete
On Thu, Oct 21, 2021 at 1:22 PM David Kastrup  wrote:

> Paolo Prete  writes:
>
> > Hello,
> >
> > after a \tempo X = Y is set, is there a way (a scheme function or
> > variable?) to get X and Y?
>
> What does "after" mean and "is set"?  At a later point in the source
> text, at a later time in musical execution?
>
>
yes

With regard to the latter (which you could access in callbacks or
> \applyContext) \tempo sets the context variable tempoWholesPerMinute in
> the Score context.  How this relates to X and Y depends on the unit of
> the beat.  A reasonable guess is it is measured in baseMoment beats,
> possibly multipled by the gcd of the values in beatStructure (if any).
> At least that's what Time_signature_performer tries to state.
>
>
unfortunately this doesn't sound trivial to achieve, and I presume that
tempoWholesPerMinute is not in the API.
Then I wonder if it's preferable to override the \tempo function by setting
two custom vars

thanks,
P



> --
> David Kastrup
>


Re: Getting \tempo params

2021-10-21 Thread David Kastrup
Paolo Prete  writes:

> Hello,
>
> after a \tempo X = Y is set, is there a way (a scheme function or
> variable?) to get X and Y?

What does "after" mean and "is set"?  At a later point in the source
text, at a later time in musical execution?

With regard to the latter (which you could access in callbacks or
\applyContext) \tempo sets the context variable tempoWholesPerMinute in
the Score context.  How this relates to X and Y depends on the unit of
the beat.  A reasonable guess is it is measured in baseMoment beats,
possibly multipled by the gcd of the values in beatStructure (if any).
At least that's what Time_signature_performer tries to state.

-- 
David Kastrup



Getting \tempo params

2021-10-21 Thread Paolo Prete
Hello,

after a \tempo X = Y is set, is there a way (a scheme function or
variable?) to get X and Y?

Thanks!
P


Re: Complex Tempo Marking

2021-10-15 Thread Valentin Petzel
Hello Zon,

I do not completely understand what marking you wish to achieve, but usually 
you can do such more complex marking by simply using score within your markup, 
remove anything but the notes and scale them to whatever you want.

See this example (but I don’t know if this is what you consider a dotted 
eighth-note triplet).

Cheers,
Valentin

Am Freitag, 15. Oktober 2021, 21:05:48 CEST schrieb Zone Dremik:
> Hello,
> 
> Does anyone have code I could use to indicate a tempo marking that shows two
> barred eighth-notes equal to a dotted eighth-note triplet?
> 
> Also, as a general inquiry, what would be needed to have notation in a
> markup? (Would this be a major Scheme coding project!?)
> 
> I've searched through the documentation, and the group postings, but I
> suspect I'm not using the right search terms. Any direction would be
> appreciated.
> 
> Thanks,
> 
> Zon D.\language "deutsch"

scoreA = \markup\score {
  {\stopStaff \tiny \stemUp h'8[ 8] }
  \layout {
\context {
  \Staff
  \remove Clef_engraver
  \remove Time_signature_engraver
  \override Stem.length-fraction = #0.7
  \override Beam.length-fraction = #0.8
  \override Beam.beam-thickness = #0.45
}
\context {
  \Score proportionalNotationDuration = #(ly:make-moment 1/8)
}
indent = 0}

}

scoreB = \markup\score {
  {\stopStaff\time 2/8 \tiny \stemUp \times 2/3 { h'8.[ h'] } }
  \layout {
\context {
  \Staff
  \remove Clef_engraver
  \remove Time_signature_engraver
  \override Stem.length-fraction = #0.7
  \override Beam.length-fraction = #0.8
  \override Beam.beam-thickness = #0.45
}
\context {
  \Score proportionalNotationDuration = #(ly:make-moment 1/8)
    }
indent = 0}
}

{
  \tempo \markup { "Some tempo marking"

   \bracket\concat {
 \scoreA
 " " =
 \scoreB
  
  }} 4=120 c'4
}

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


Re: Complex Tempo Marking

2021-10-15 Thread Lukas-Fabian Moser

Hi,

Does anyone have code I could use to indicate a tempo marking that shows two 
barred eighth-notes equal to a dotted eighth-note triplet?

Also, as a general inquiry, what would be needed to have notation in a markup? 
(Would this be a major Scheme coding project!?)

I've searched through the documentation, and the group postings, but I suspect 
I'm not using the right search terms. Any direction would be appreciated.


It's perfectly possible already to use notation in a markup, namely 
\markup { \score { ... } }. In order to only display single notes, that 
score has to be stripped down considerably, which is a bit of work but 
absolutely possible.


Now, I'm not sure what you mean by barred eigth-notes versus dotted 
eigth-note triplets, but ignoring "barred" and "dotted", a possible 
markup would be:


\version "2.22"

#(define-markup-command (rhythm layout props content) (ly:music?)
   #:properties ((time #f))
   (interpret-markup layout props #{
 \markup {
   \score {
 \new RhythmicStaff \with {
   \override StaffSymbol.line-count = 0
   \override Rest.staff-position = 2
   \override BarLine.bar-extent = #'(-0.5 . 2)
   \override TimeSignature.Y-offset = 0.5
   #(if (not time)
    #{
  \with { \remove Time_signature_engraver }
    #})
 }
 {
   #(if time #{ \time $time #})
   #content
 }
 \layout {
   indent = 0
   #(layout-set-staff-size 12)
 }
   }
 } #}))

{
  c'4 4 4 4
  \bar "||"
  \override Score.MetronomeMark.self-alignment-X = #CENTER
  \tempo \markup {
    \rhythm { 8[ 8] }
    =
    \rhythm { \tuplet 3/2 { 8[ 8 8] } }
  }
  c'4 4
}

Improvements are certainly possible.

Lukas




  1   2   3   4   5   6   7   8   9   10   >