Re: Override note properties in markup,note or rhythm

2023-01-22 Thread | || | |

Got it. Now I think I agree with you this is better how it is.

Thank you again :)
Tomasz

W dniu 22.01.2023 o 17:46, Jean Abou Samra pisze:

Le 22/01/2023 à 14:11, | || | | a écrit :
Thank you for the really comprehensive answer! You solved a few other 
problems I was struggling with in the process.


I don't get why this kind of diversity with overriding properties 
would have any purpose for a user. I mean, I see there are different 
sizes of notes between general score and tempo, but it's only that.




If I use, say, \easyHeadsOn or \aikenHeads in the main music, I
definitely don't want this to also occur in the tempo indication,
it would just make no sense. That is the reason why \rhythm
is intentionally not influenced by the main music or the usual
forms of a \layout block, but has its own places to define 
customizations,

the body of the \rhythm argument and the StandaloneRhythm...
contexts in \layout.

The difference between \note and \rhythm is a bit more arbitrary:
\note is the historical command while \rhythm is new in 2.24
and more flexible. Arguably, it would make sense for \tempo
to internally use \rhythm so that changing properties in 
StandaloneRhythm...

would affect it.

Jean






Re: Lilypond in Termux (Android)

2023-01-22 Thread m.tarensk...@kpnmail.nl
Maybe you need to run the termux-setup-storage command?Maybe the location where you have your .ly file is read-only for Termux?It's working for me. Communication between files inside the Termux directories and other locations and apps (like my pdf viewer) on my tablet is a bit awkward, but it works.MTVerzonden vanaf mijn Huawei mobiele telefoon Oorspronkelijk bericht Onderwerp: Re: Lilypond in Termux (Android)Van: Shane Brandes Aan: Martin Tarenskeen Cc: lilypond-user mailinglist o.k. out of rampant curiosity I gave it a try on termux. And can't seem to get any output. I managed to download lilypond 2.24.0 and extract it and the chmod to make executable. Added a shebang and ran it on a file.  it appears to work, but either there is no actual output, or it gets placed somewhere unknown to me. Any ideas what I am not doing correctly? Googling hasn't provided an answer but maybe I was asking the wrong question.regards,ShaneOn Sun, Jan 22, 2023 at 8:26 AM Martin Tarenskeen  wrote:Hi,Recently I discovered that LilyPond is available for Termux, a Linux-like terminal app for Android devices.Unfortunately it crashed my older (32bits) Samsung tablet, but it did run on my (64bits) phone. After my bugreport on Github something was fixed in the Guile package built for Termux a few days ago and now I am able to use LilyPond on Android. Hurray!If you want to try LilyPond on your Android device: First install Termux on your device using F-droid instead of directly from Google Play Store. I think Termux is not updated on Google Play anymore.Just wanted to share this with the Lilypond community.MT


Re: Repeat Segno with MIDI

2023-01-22 Thread Jean Abou Samra
On 22/01/2023 22:03, Jean Abou Samra wrote:
> Le 22/01/2023 à 21:58, Jean Abou Samra a écrit :
>>   \volta   1        {   a4 a4 a4 a4   }
>>          
>> ~~
>>   \volta        
> 
> 
> 
> Stupid mail client mangling indentation... I hope it'll work this time:
> 
>   \volta   1        {   a4  a4 a4 a4  }
>          
> ~~
>   \volta        
> 
> 



*Now*, this should work. Sorry, Thunderbird makes it incredibly hard
to send just unmangled plain text.


 
 \volta   1{   a4  a4 a4   a4   
}

   
~~
 \volta




OpenPGP_signature
Description: OpenPGP digital signature


Re: Repeat Segno with MIDI

2023-01-22 Thread Jean Abou Samra

Le 22/01/2023 à 21:58, Jean Abou Samra a écrit :

  \volta   1        {   a4 a4 a4 a4   }
         
~~
  \volta        




Stupid mail client mangling indentation... I hope it'll work this time:

  \volta   1        {   a4  a4 a4 a4  }
         
~~
  \volta        




OpenPGP_signature
Description: OpenPGP digital signature


Re: Lilypond in Termux (Android)

2023-01-22 Thread Shane Brandes
o.k. out of rampant curiosity I gave it a try on termux. And can't seem to
get any output. I managed to download lilypond 2.24.0 and extract it and
the chmod to make executable. Added a shebang and ran it on a file.  it
appears to work, but either there is no actual output, or it gets placed
somewhere unknown to me. Any ideas what I am not doing correctly? Googling
hasn't provided an answer but maybe I was asking the wrong question.
regards,
Shane

On Sun, Jan 22, 2023 at 8:26 AM Martin Tarenskeen 
wrote:

> Hi,
>
> Recently I discovered that LilyPond is available for Termux, a Linux-like
> terminal app for Android devices.
> Unfortunately it crashed my older (32bits) Samsung tablet, but it did run
> on my (64bits) phone. After my bugreport on Github something was fixed in
> the Guile package built for Termux a few days ago and now I am able to use
> LilyPond on Android. Hurray!
>
> If you want to try LilyPond on your Android device: First install Termux
> on your device using F-droid instead of directly from Google Play Store. I
> think Termux is not updated on Google Play anymore.
>
> Just wanted to share this with the Lilypond community.
>
> MT
>


Re: Repeat Segno with MIDI

2023-01-22 Thread Jean Abou Samra

Le 22/01/2023 à 21:25, Mark Mathias a écrit :

Jean,
Ahh... of course. I had forgotten that LilyPond doesn't require the 
braces for a single note, but does for anything more.




Well... that is true in a sense, but from the way you phrase it, I have the
impression that the underlying logic that explains why this behavior makes
sense is not clear to you.

Ok, let me try again. LilyPond thinks in terms of music expressions. This:

  a4

is an expression. This:

  a4 a4 a4 a4

is four distinct music expressions. The syntax of \volta is

  \volta  

so when you write

  \volta 1 a4 a4 a4 a4

it is parsed as

  \volta    1       a4    a4    a4  a4
  \volta  
      ~~~   ~~~
          



Now, when you have several expressions, LilyPond will let you
combine them. This:

  { a4 a4 a4 a4 }

is one single, compound expression that puts four subexpressions in
sequence, and this:

  << a4 a4 a4 a4 >>

is also a compound music expression, putting its four elements in
parallel. So, when you write

  \volta 1 { a4 a4 a4 a4 }

this is parsed as

  \volta   1        {   a4  a4 a4 a4   }
         
~~
  \volta        


Does that help?

Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Repeat Segno with MIDI

2023-01-22 Thread Mark Mathias
Jean,
Ahh... of course. I had forgotten that LilyPond doesn't require the braces
for a single note, but does for anything more.
Thank you!
Mark

On Sun, Jan 22, 2023 at 3:17 PM Jean Abou Samra  wrote:

> Le 22/01/2023 à 21:05, Mark Mathias a écrit :
> > I'm not seeing a post from anyone else exactly on this issue, so...
> >
> > I like the new repeat structure:
> >
> https://lilypond.org/doc/v2.24/Documentation/notation/long-repeats#segno-repeat-structure
> >
> > The example works with the whole note after volta 1, but if you add
> > more notes, change the rhythm, etc., the pdf doesn't display properly
> > and MIDI generates a warning and doesn't execute the repeat properly.
> > If you put curly brackets around the volta 1 section the problem
> > disappears.
> >
> > Is this a bug, or am I missing something (as usual).
>
>
>
> To explain it by analogy, it's as if you had written
>
> {
>\transpose c' d'
>a b c' d' e' f' g'
> }
>
> and expected \transpose to transpose everything after it.
> That's not how it works. Unlike things like \clef and \time,
> commands like \transpose, \repeat and \volta apply to
> a music argument, so you need to write
>
> {
>\transpose c' d' {
>  a b c' d' e' f' g'
>}
> }
>
>
> If you don't put the braces in
>
> \volta 1 a4 a a a
>
> it's as if you had written
>
>
> \volta 1 {
>a4
> }
> a a a
>
>
> The notes after the first one are not included in the argument
> to \volta, and thus not part of the volta, which makes LilyPond
> legitimately confused.
>
> Regards,
> Jean
>
>


Re: Repeat Segno with MIDI

2023-01-22 Thread Jean Abou Samra

Le 22/01/2023 à 21:05, Mark Mathias a écrit :

I'm not seeing a post from anyone else exactly on this issue, so...

I like the new repeat structure:
https://lilypond.org/doc/v2.24/Documentation/notation/long-repeats#segno-repeat-structure

The example works with the whole note after volta 1, but if you add 
more notes, change the rhythm, etc., the pdf doesn't display properly 
and MIDI generates a warning and doesn't execute the repeat properly. 
If you put curly brackets around the volta 1 section the problem 
disappears.


Is this a bug, or am I missing something (as usual).




To explain it by analogy, it's as if you had written

{
  \transpose c' d'
  a b c' d' e' f' g'
}

and expected \transpose to transpose everything after it.
That's not how it works. Unlike things like \clef and \time,
commands like \transpose, \repeat and \volta apply to
a music argument, so you need to write

{
  \transpose c' d' {
    a b c' d' e' f' g'
  }
}


If you don't put the braces in

\volta 1 a4 a a a

it's as if you had written


\volta 1 {
  a4
}
a a a


The notes after the first one are not included in the argument
to \volta, and thus not part of the volta, which makes LilyPond
legitimately confused.

Regards,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Translating “Extending LilyPond” — any takers?

2023-01-22 Thread Jean Abou Samra

Hi,

[Sent to lilypond-user, BBCed to lilypond-devel]

After almost two years of promising myself I would integrate
https://extending-lilypond.readthedocs.io/ into the official
LilyPond documentation someday while never doing it, I decided
to officialize the status quo that it would be maintained separately
from the official documentation.

Now that it doesn't have a perspective of being translated inside
the LilyPond documentation anymore, it makes sense to translate it
into other languages in the repository where it lives. Today, I added
a little bit of infrastructure for that and put a stub for a French
translation, which I will probably work on at some point in the coming
months.

If you are interested in translating this into another language,
please let me know. The translation is done in .po files, like
most translation workflows (but not the one for the official
documentation).

Keep in mind that, from my experience, it is necessary to have some
level of familiarity with the content in order to do a translation.

The same goes for https://scheme-tutorial.readthedocs.io/,
which is currently available in English and French. Actually,
this one might be both shorter and less technical for a translator,
and more important to translate. However, the current translation
is from French to English, so I would have to "reverse" it. I'll do
this if anybody is interested in translating it.

Also, trying not to sound pretentious, I do think the extending guide
is not a completely insignificant part of the LilyPond ecosystem
today, as it is basically the only place other than LilyPond's
source code to learn about quite a few programming techniques. For
this reason, I am interested in increasing its bus factor. I'll
gladly grant access to anybody requesting it provided that I have
a little bit of experience working with that person. This applies
to the Scheme tutorial too.

Regards,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Repeat Segno with MIDI

2023-01-22 Thread Mark Mathias
I'm not seeing a post from anyone else exactly on this issue, so...

I like the new repeat structure:
https://lilypond.org/doc/v2.24/Documentation/notation/long-repeats#segno-repeat-structure

The example works with the whole note after volta 1, but if you add more
notes, change the rhythm, etc., the pdf doesn't display properly and MIDI
generates a warning and doesn't execute the repeat properly. If you put
curly brackets around the volta 1 section the problem disappears.

Is this a bug, or am I missing something (as usual).

Thanks,
Mark
\version "2.24.0"

% https://lilypond.org/doc/v2.24/Documentation/notation/long-repeats#segno-repeat-structure

musicQ = \fixed c' {
  f1
  \repeat segno 2 {
g1
\volta 2 \fine
\volta 1 a4 a a a
  }
  \section
}

musicQcurly = \fixed c' {
  f1
  \repeat segno 2 {
g1
\volta 2 \fine
\volta 1 { a4 a a a }
  }
  \section
}

\score { \musicQ }
\score { \unfoldRepeats \musicQ }
\score { \unfoldRepeats \musicQ
 \midi { }
}

\score { \musicQcurly }
\score { \unfoldRepeats \musicQcurly
 \midi { }
}



Repeat Segno With MIDI-1.mid
Description: audio/mid


Repeat Segno With MIDI.mid
Description: audio/mid


Repeat Segno With MIDI.pdf
Description: Adobe PDF document


Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra

Le 22/01/2023 à 18:22, Darren Ng a écrit :

Thanks. The following works:

   accOne =
   #(define-music-function
   (x)
   (ly:pitch?)
 #{
   $x 8 $x 8
 #})

My ultimate goal is a function which does the following

   accTwo =
   #(define-music-function
   (x)
   (ly:pitch?)
 #{
   $x 8 r8
   <($x+4) ($x+7)>8 r8
   ($x-5) 8 r8
   <($x+4) ($x+7)>8 r8
 #})

E.g.

   \accTwo c expands to { c8r8 8r8  g,8r8 8r8 }
   \accTwo f expands to { f8r8 8r8 c8r8  8r8 }

What material should I read so that I'll be able to achieve this?



Spoiler: you can do that with just

\version "2.24.0"

accTwo =
#(define-music-function
    (x    )
    (ly:pitch?)
  #{
    $x 8
    r8
    <\transpose c e $x \transpose c g $x >8
    r8
    <\transpose c g, $x >8 r8
    <\transpose c e $x \transpose c g $x >8
    r8
  #})

\accTwo c'



Now, if you still want to learn how you might have done that in Scheme, 
try reading


https://extending-lilypond.readthedocs.io/en/latest/music.html#pitches

and you might also want a Scheme tutorial in case you don't already know the
language itself:

https://scheme-book.readthedocs.io/

or

https://tutoriel-scheme.readthedocs.io/

Jean





OpenPGP_signature
Description: OpenPGP digital signature


Re: LP 2.24.0 segno repeat where coda break is in the middle of a repeat volta block

2023-01-22 Thread Kenneth Wolcott
Hi David;

  Thank you so much for reminding me that there are ways to reduce the
size of the pdf, decreasing the size to reduce the pain of downloading
a huge attachment.

Ken

On Sun, Jan 22, 2023 at 8:35 AM David Wright  wrote:
>
> On Sat 21 Jan 2023 at 15:51:16 (-0800), Kenneth Wolcott wrote:
> > Using Lilypond 2.24.0, I engraved "Memory" (from "Cats") using the
> > example published in the Hal Leonard Easy Piano Songs book (the pdf
> > file generated from photos from this book are huge).
>
> I displayed your PDF at 60% size, and took screenshots of the pages.
> The structure of the score is still plainly visible, but five pages
> like this would take about 750KB to post instead of 14MB: of great
> benefit to many.
>
> I won't post them here, but I can send you pages privately.
>
> Cheers,
> David.



Re: substitution function variable name

2023-01-22 Thread Darren Ng
Thanks. The following works:

  accOne =
  #(define-music-function
  (x)
  (ly:pitch?)
#{
  $x 8 $x 8
#})

My ultimate goal is a function which does the following

  accTwo =
  #(define-music-function
  (x)
  (ly:pitch?)
#{
  $x 8 r8
  <($x+4) ($x+7)>8 r8
  ($x-5) 8 r8
  <($x+4) ($x+7)>8 r8
#})

E.g.

  \accTwo c expands to { c8r8 8r8  g,8r8 8r8 }
  \accTwo f expands to { f8r8 8r8 c8r8  8r8 }

What material should I read so that I'll be able to achieve this?

On Mon, Jan 23, 2023 at 12:36 AM Jean Abou Samra  wrote:
>
>
>
> Le 22/01/2023 à 17:33, Jean Abou Samra a écrit :
> >
> >
> > Le 22/01/2023 à 17:20, Darren Ng a écrit :
> >> Define substitution function accOne() as:
> >>
> >>  accOne =
> >>  #(define-music-function
> >>  (x)
> >>  (ly:music?)
> >>#{
> >>  $x8 $x8 $x8 $x8 $x8
> >>#})
> >>
> >> Call accOne() with:
> >>
> >>  \accOne f
> >>
> >> Expected output is:
> >>
> >>  f8 f8 f8 f8 f8
> >>
> >> However, lilypond reports error as follows:
> >>
> >>  GNU LilyPond 2.24.0 (running Guile 2.2)
> >>  Processing `main.ly'
> >>  Parsing...
> >>  accompanimentfunc.ly:19:6: error: Guile signaled an error for the
> >> expression beginning here
> >>  $
> >>   x8 $x8 $x8 $x8 $x8
> >>  Unbound variable: x8
> >>  accompanimentfunc.ly:19:10: error: Guile signaled an error for the
> >> expression beginning here
> >>  $x8 $
> >>   x8 $x8 $x8 $x8
> >>  Unbound variable: x8
> >>  accompanimentfunc.ly:19:14: error: Guile signaled an error for the
> >> expression beginning here
> >>  $x8 $x8 $
> >>   x8 $x8 $x8
> >>  Unbound variable: x8
> >>  accompanimentfunc.ly:19:18: error: Guile signaled an error for the
> >> expression beginning here
> >>  $x8 $x8 $x8 $
> >>   x8 $x8
> >>  Unbound variable: x8
> >>  accompanimentfunc.ly:19:22: error: Guile signaled an error for the
> >> expression beginning here
> >>  $x8 $x8 $x8 $x8 $
> >>   x8
> >>  Unbound variable: x8
> >>  Interpreting music...
> >>
> >> How to tell lilypond to look for variable "x" and make a 1/8 note out
> >> of it,
> >> instead of looking for variable "x8"?
> >
> >
> >
> > Simply insert a space between "x" and "8".
>
>
> Also, the result will likely still surprise you because you are receiving
> the argument "x" as ly:music?, which means a full note, with its duration
> (implicitly taken from the previous duration if you call it as \accNote f
> rather than \accNote f16 for example), so the "8" parts in the function
> are standalone durations, which inherit the pitch from the previous note,
> and you get something equivalent to
>
>f4 f8 f4 f8 f4 f8 f4 f8 f4 f8
>
> So better replace ly:music? with ly:pitch?. See also
>
> https://extending-lilypond.readthedocs.io/en/latest/music.html#argument-type-checking
>
> Best,
> Jean
>



Re: Override note properties in markup,note or rhythm

2023-01-22 Thread Jean Abou Samra

Le 22/01/2023 à 14:11, | || | | a écrit :
Thank you for the really comprehensive answer! You solved a few other 
problems I was struggling with in the process.


I don't get why this kind of diversity with overriding properties 
would have any purpose for a user. I mean, I see there are different 
sizes of notes between general score and tempo, but it's only that.




If I use, say, \easyHeadsOn or \aikenHeads in the main music, I
definitely don't want this to also occur in the tempo indication,
it would just make no sense. That is the reason why \rhythm
is intentionally not influenced by the main music or the usual
forms of a \layout block, but has its own places to define customizations,
the body of the \rhythm argument and the StandaloneRhythm...
contexts in \layout.

The difference between \note and \rhythm is a bit more arbitrary:
\note is the historical command while \rhythm is new in 2.24
and more flexible. Arguably, it would make sense for \tempo
to internally use \rhythm so that changing properties in StandaloneRhythm...
would affect it.

Jean




OpenPGP_signature
Description: OpenPGP digital signature


Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra



Le 22/01/2023 à 17:33, Jean Abou Samra a écrit :



Le 22/01/2023 à 17:20, Darren Ng a écrit :

Define substitution function accOne() as:

 accOne =
 #(define-music-function
 (x    )
 (ly:music?)
   #{
 $x8 $x8 $x8 $x8 $x8
   #})

Call accOne() with:

 \accOne f

Expected output is:

 f8 f8 f8 f8 f8

However, lilypond reports error as follows:

 GNU LilyPond 2.24.0 (running Guile 2.2)
 Processing `main.ly'
 Parsing...
 accompanimentfunc.ly:19:6: error: Guile signaled an error for the
expression beginning here
 $
  x8 $x8 $x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:10: error: Guile signaled an error for the
expression beginning here
 $x8 $
  x8 $x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:14: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $
  x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:18: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $x8 $
  x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:22: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $x8 $x8 $
  x8
 Unbound variable: x8
 Interpreting music...

How to tell lilypond to look for variable "x" and make a 1/8 note out 
of it,

instead of looking for variable "x8"?




Simply insert a space between "x" and "8".



Also, the result will likely still surprise you because you are receiving
the argument "x" as ly:music?, which means a full note, with its duration
(implicitly taken from the previous duration if you call it as \accNote f
rather than \accNote f16 for example), so the "8" parts in the function
are standalone durations, which inherit the pitch from the previous note,
and you get something equivalent to

  f4 f8 f4 f8 f4 f8 f4 f8 f4 f8

So better replace ly:music? with ly:pitch?. See also

https://extending-lilypond.readthedocs.io/en/latest/music.html#argument-type-checking

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: LP 2.24.0 segno repeat where coda break is in the middle of a repeat volta block

2023-01-22 Thread David Wright
On Sat 21 Jan 2023 at 15:51:16 (-0800), Kenneth Wolcott wrote:
> Using Lilypond 2.24.0, I engraved "Memory" (from "Cats") using the
> example published in the Hal Leonard Easy Piano Songs book (the pdf
> file generated from photos from this book are huge).

I displayed your PDF at 60% size, and took screenshots of the pages.
The structure of the score is still plainly visible, but five pages
like this would take about 750KB to post instead of 14MB: of great
benefit to many.

I won't post them here, but I can send you pages privately.

Cheers,
David.



Re: substitution function variable name

2023-01-22 Thread Jean Abou Samra



Le 22/01/2023 à 17:20, Darren Ng a écrit :

Define substitution function accOne() as:

 accOne =
 #(define-music-function
 (x)
 (ly:music?)
   #{
 $x8 $x8 $x8 $x8 $x8
   #})

Call accOne() with:

 \accOne f

Expected output is:

 f8 f8 f8 f8 f8

However, lilypond reports error as follows:

 GNU LilyPond 2.24.0 (running Guile 2.2)
 Processing `main.ly'
 Parsing...
 accompanimentfunc.ly:19:6: error: Guile signaled an error for the
expression beginning here
 $
  x8 $x8 $x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:10: error: Guile signaled an error for the
expression beginning here
 $x8 $
  x8 $x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:14: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $
  x8 $x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:18: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $x8 $
  x8 $x8
 Unbound variable: x8
 accompanimentfunc.ly:19:22: error: Guile signaled an error for the
expression beginning here
 $x8 $x8 $x8 $x8 $
  x8
 Unbound variable: x8
 Interpreting music...

How to tell lilypond to look for variable "x" and make a 1/8 note out of it,
instead of looking for variable "x8"?




Simply insert a space between "x" and "8".

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


substitution function variable name

2023-01-22 Thread Darren Ng
Define substitution function accOne() as:

accOne =
#(define-music-function
(x)
(ly:music?)
  #{
$x8 $x8 $x8 $x8 $x8
  #})

Call accOne() with:

\accOne f

Expected output is:

f8 f8 f8 f8 f8

However, lilypond reports error as follows:

GNU LilyPond 2.24.0 (running Guile 2.2)
Processing `main.ly'
Parsing...
accompanimentfunc.ly:19:6: error: Guile signaled an error for the
expression beginning here
$
 x8 $x8 $x8 $x8 $x8
Unbound variable: x8
accompanimentfunc.ly:19:10: error: Guile signaled an error for the
expression beginning here
$x8 $
 x8 $x8 $x8 $x8
Unbound variable: x8
accompanimentfunc.ly:19:14: error: Guile signaled an error for the
expression beginning here
$x8 $x8 $
 x8 $x8 $x8
Unbound variable: x8
accompanimentfunc.ly:19:18: error: Guile signaled an error for the
expression beginning here
$x8 $x8 $x8 $
 x8 $x8
Unbound variable: x8
accompanimentfunc.ly:19:22: error: Guile signaled an error for the
expression beginning here
$x8 $x8 $x8 $x8 $
 x8
Unbound variable: x8
Interpreting music...

How to tell lilypond to look for variable "x" and make a 1/8 note out of it,
instead of looking for variable "x8"?

Thanks.

Darren Ng



Lilypond in Termux (Android)

2023-01-22 Thread Martin Tarenskeen

Hi,

Recently I discovered that LilyPond is available for Termux, a 
Linux-like terminal app for Android devices.
Unfortunately it crashed my older (32bits) Samsung tablet, but it did 
run on my (64bits) phone. After my bugreport on Github something was 
fixed in the Guile package built for Termux a few days ago and now I am 
able to use LilyPond on Android. Hurray!


If you want to try LilyPond on your Android device: First install 
Termux on your device using F-droid instead of directly from Google 
Play Store. I think Termux is not updated on Google Play anymore.


Just wanted to share this with the Lilypond community.

MT



Re: Override note properties in markup,note or rhythm

2023-01-22 Thread | || | |
Thank you for the really comprehensive answer! You solved a few other 
problems I was struggling with in the process.


I don't get why this kind of diversity with overriding properties would 
have any purpose for a user. I mean, I see there are different sizes of 
notes between general score and tempo, but it's only that.


Cheers!

W dniu 21.01.2023 o 23:57, Jean Abou Samra pisze:

Le 21/01/2023 à 17:26, | || | | a écrit :

Hiya!

I'm trying to find a gentle solution for the problem I encountered.

I overrided flag stencil in general Score, but it turns out that this 
doesn't influence notes in \tempo, \note and \rhythm functions. I 
there a possibility to influence those ones?


I add that I know I could construct note from the beginning inside 
markup and add hidden tempo change for proper tempo export, but it 
seems to be overkill for this kind of problem.



That overrides in the main music do not influence \tempo,
\note or \rhythm is intentional. However, \rhythm has more
flexibility than \note because you can just put overrides
inside it, like

\version "2.24.0"

customFlag = {
  \override Score.Flag.stencil = #ly:text-interface::print
  \override Score.Flag.text = \markup {\raise #-0.2 \beam #1.0 #0.05 
#0.5 }

}

\score {
  \new Staff {
    \overrideTimeSignatureSettings 4/4 1/8 #'() #'()
    \time 4/4
    \customFlag
    \tempo \markup { Mechanical (\fontsize #-1 \rhythm { \customFlag 8 
} \hspace #-0.6 = 92 )}

    c'8 8 8 8 8 8 8 8
    c'8 8 8 8 8 8 8 8
  }
}


It's also possible to do that globally with

\version "2.24.0"

customFlag = {
  \override Score.Flag.stencil = #ly:text-interface::print
  \override Score.Flag.text = \markup {\raise #-0.2 \beam #1.0 #0.05 
#0.5 }

}

\layout {
  \context {
    \Score
    \customFlag
  }
  \context {
    \StandaloneRhythmScore
    \customFlag
  }
}

\score {
  \new Staff {
    \overrideTimeSignatureSettings 4/4 1/8 #'() #'()
    \time 4/4
    \tempo \markup { Mechanical (\fontsize #-1 \rhythm { { 8 } } 
\hspace #-0.6 = 92 )}

    c'8 8 8 8 8 8 8 8
    c'8 8 8 8 8 8 8 8
  }
}


(Note the necessary extra braces in \rhythm { { 8 } }; this quirk has
already been solved, in the unstable version 2.25.0.)

Unfortunately, \tempo internally uses \note, which does not have the
same sort of customizability. You can use tags, though:

\version "2.24.0"

customFlag = {
  \override Score.Flag.stencil = #ly:text-interface::print
  \override Score.Flag.text = \markup {\raise #-0.2 \beam #1.0 #0.05 
#0.5 }

}

\layout {
  \context {
    \Score
    \customFlag
  }
  \context {
    \StandaloneRhythmScore
    \customFlag
  }
}

\tagGroup midi,layout

mus =
\new Staff {
  \overrideTimeSignatureSettings 4/4 1/8 #'() #'()
  \time 4/4
  \tag layout \tempo \markup { Mechanical (\fontsize #-1 \rhythm { { 8 
} } \hspace #-0.6 = 92 )}

  \tag midi \tempo 8 = 92
  c'8 8 8 8 8 8 8 8
  c'8 8 8 8 8 8 8 8
}


\score {
  \keepWithTag layout \mus
  \layout { }
}

\score {
  \keepWithTag midi \mus
  \midi { }
}



Best,
Jean








Re: Slurs not being followed in one vocal part

2023-01-22 Thread Lukas-Fabian Moser

Hi Jon,

Am 22.01.23 um 03:31 schrieb Jon Arnold:
Thanks all! Separating the voices did fix the problem. I used this 
score a long time ago and then updated the layout, so I feel like an 
update several years ago must have changed the behavior, which is 
interesting.


Compare:

\version "2.24"

mel = \relative {
  g''4.( f8 f e) d( c)
  d2 r
}

lyr = \lyricmode { Glo -- ri -- a! }

stuff = {
  \dynamicUp % try commenting this out!
  <>\f\>
  s1
  <>\!
}

\new Staff << \mel \stuff >> \addlyrics \lyr
\new Staff << \stuff \mel >> \addlyrics \lyr
\new Staff << \mel \addlyrics \lyr \stuff >>

But if you remove the \dynamicUp you'll see that LilyPond's behaviour in 
<< \A \B >> \addlyrics { ... } constructions is a bit volatile.


Lukas