how to avoid font substitution

2022-01-21 Thread Flaming Hakama by Elaine
Now that I am setting up a new environment on a new machine,
I am running into a problem again,
and I don't recall how I solved it last time.

When I compile a pdf locally, it looks fine.

But when I upload it to a site, then download it on an iPad, it shows
different fonts.

Is there a way to either embed fonts in the pdf, or to convert the
characters to outlines?

I tried using --pspdfopt=TeX since that claimed to
"Produce files that are optimized for inclusion in pdfTeX, luatex, or
XeTeX documents.  Using this value is equivalent to setting LilyPond’s
Scheme command
line options -dmusic-font-encodings='#t' and -dgs-never-embedfonts='#f'."

I saw some hope there by reading this as saying "never embed fonts is
false, therefore embed fonts".

But that did not seem to have the desired effect.

Please let me know if you have any clues.


Thanks.


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


On Tue, Jan 18, 2022 at 11:31 AM  wrote:

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org
>
> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
> Today's Topics:
>
>1. ice-9 i18n string-locale-upcase (Simon Albrecht)
>2. Re: ice-9 i18n string-locale-upcase (Jean Abou Samra)
>3. Re: Display Question Mark at center of a measure (Rajesh Baskar)
>4. Re: Display Question Mark at center of a measure (Jean Abou Samra)
>5. Re: optical recognition for input (Valentin Petzel)
>
>
>
> -- Forwarded message --
> From: Simon Albrecht 
> To: lilypond-user 
> Cc:
> Bcc:
> Date: Tue, 18 Jan 2022 18:01:26 +0100
> Subject: ice-9 i18n string-locale-upcase
> Hi everyone,
>
> I wanted to set up some customisable headings using #(string-upcase
> "string"), but it doesn’t work on German umlauts, so I came upon
> string-locale-upcase on this page:
>
>
> https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Character-Case-Mapping.html#Character-Case-Mapping
>
> However, I can’t get it to work. To this example file:
>
> 
> \version "2.23.5"
> #(use-modules (ice-9 i18n))
> \markup \column {
>#(string-upcase "üß")
>#(string-locale-upcase "üß" "de_DE")
> }
> 
>
> Guile says: “no code for module (ice-9 i18n)”.
>
> Why? Can I load the module another way? Will it do what I want? Should I
> use another tool? ;-)
>
> Thanks in advance,
> Simon
>
>
>
>
>
>
> -- Forwarded message --
> From: Jean Abou Samra 
> To: Simon Albrecht , lilypond-user <
> lilypond-user@gnu.org>
> Cc:
> Bcc:
> Date: Tue, 18 Jan 2022 18:52:22 +0100
> Subject: Re: ice-9 i18n string-locale-upcase
> Le 18/01/2022 à 18:01, Simon Albrecht a écrit :
> > Hi everyone,
> >
> > I wanted to set up some customisable headings using #(string-upcase
> > "string"), but it doesn’t work on German umlauts, so I came upon
> > string-locale-upcase on this page:
> >
> >
> https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Character-Case-Mapping.html#Character-Case-Mapping
> >
> >
> > However, I can’t get it to work. To this example file:
> >
> > 
> > \version "2.23.5"
> > #(use-modules (ice-9 i18n))
> > \markup \column {
> >   #(string-upcase "üß")
> >   #(string-locale-upcase "üß" "de_DE")
> > }
> > 
> >
> > Guile says: “no code for module (ice-9 i18n)”.
> >
> > Why? Can I load the module another way? Will it do what I want? Should
> > I use another tool? ;-)
>
>
> Because this is documentation for Guile 2
> and current releases of LilyPond still have
> Guile 1.8. Try Jonas' latest *experimental*
> binaries using Guile 2:
>
> https://lists.gnu.org/archive/html/lilypond-devel/2021-12/msg7.html
> or rather
> https://lists.gnu.org/archive/html/lilypond-devel/2021-12/msg00078.html
> if you are using Windows.
>
> Best,
> Jean
>
>
>
>
>
>
> -- Forwarded message --
> From: Rajesh Baskar 
> To: Lukas-Fabian Moser , lilypond-user@gnu.org
> Cc:
> Bcc:
> Date: Tue, 18 Jan 2022 10:14:23 -0800
> Subject: Re: Display Question Mark at center of a measure
>
> Thanks Lukas and Jean for your help.
>
> There is an issue with the below solution. When adding <<  and >> the
> visual is correct but while playing the score the first measure notes all
> play together. I'm guessing it's because of << >>. Is there a way to fix
> this.
>
> Thanks for all the help.
>
> Raj
> On 1/14/2022 1:39 AM, Lukas-Fabian 

confused about segno sign, Fine and D.S. al Fine and generating correct midi output

2022-01-21 Thread Kenneth Wolcott
Hi;

  I have a piece of music from which I am engraving that confuses me.

  At bar #13 there is the Segno sign.

  At the end of bar #20 there is a "Fine".

  At the end of the piece (bar #37) there is a "D.S. al Fine".

  I'd like to have Lilypond generate midi output that would match this intent.

  Does this mean:
  Play all the way through; then start at the Segno and continue until the Fine?

I think that's what it means.

So I need to have bar #1 to bar #12 in one macro;
bar #13 through bar #20 in a second macro;
and the third macro would contain bars 21-33.

Then I need "M_one", "M_two", "M_three", followed by "M_two" to
implement this in the midi score section.

Is that correct?

Thanks,
Ken Wolcott



Re: Descenders affecting line height calculation for lyrics in columns?

2022-01-21 Thread Lukas-Fabian Moser

Hi Kieren,

In my main include file, I have the following definition:

 strut = \markup \transparent { Tj }

Then, in markups, I use

 \combine $text \strut

to guarantee a consistent height/spacing.


One could do something like this:

\version "2.22"

#(define (squash-stencil-X stil)
   ; creates a placeholder stencil with empty X-extent and stil's Y-extent
   (ly:make-stencil '() empty-interval (ly:stencil-extent stil Y)))

#(define-markup-command (strut layout props) ()
   ; create a vertical strut of zero width
   (squash-stencil-X (interpret-markup layout props "Tj")))

#(define-markup-command (strutify layout props content) (markup?)
   (interpret-markup layout props (markup #:combine content #:strut)))

\markup { Standard behaviour: }

\markup \override #'(baseline-skip . 0) \column {
  aco
  aCo
  ago
  aco
}

\markup { With struts: }

\markup \override #'(baseline-skip . 0) \column \strutify {
  aco
  aCo
  ago
  aco
}

But of course, this is only a sugercoated version of what you're doing 
already.


Lukas




Re: X-offset for breath marks

2022-01-21 Thread Rachel Green
Thanks Valentin!
Rachel

> On Jan 21, 2022, at 10:31 AM, Valentin Petzel  wrote:
> 
> Hello Rachel,
> 
> The reason why offsetting the X-offset value does not work is because it is 
> not 
> used for placing Breathing marks. You can see from the output that the offset 
> command fails, as no offset is calculated in the first place.
> 
> You can still use something like \tweak extra-offset #'(x-offset . 0) (which 
> does not affect spacing) or if you want to add space while also affecting 
> spacing \tweak extra-spacing-width #'(-left-space . Right-space)
> 
> Cheers,
> Valentin
> 
> Am Donnerstag, 20. Jänner 2022, 21:04:09 CET schrieb Rachel Green:
>> Hi,
>> 
>> I am trying to adjust the placement of the first breath mark in this
>> excerpt. The Y-offset command is working as expected, but the X-offset does
>> nothing. I also tried \tweak as mentioned in
>> https://lilypond.org/doc/v2.22/Documentation/notation/the-offset-command.
>> Is there a separate command for the x-axis?
>> 
>> 
>> Best,
>> Rachel
>> 
>> 
>> 
>> 
>> 
>> 
>> \version "2.20.0"
>> 
>> \language "english"
>> #(set-global-staff-size 20)
>> 
>> 
>> VarOneTreble = \relative c'
>>  {
>>  <<
>>  {
>>  R1
>>  }
>>  \\
>>  \relative c''
>>  {
>>  b8_2 a_3 b4_1
>> \offset Y-offset -2
>> \offset X-offset -2
>> \breathe d,_4 \breathe d'_2 \breathe |
>> }
>> 
>>  }
>> 
>> VarOneBass = \relative c
>>  {
>>  \clef bass
>>R1
>>  }
>> 
>> \score {
>>  \new GrandStaff
>>  <<
>>  \new Staff = "treble" { \VarOneTreble }
>> \new Staff = "bass" { \VarOneBass }
>> 
>> }



Re: learning (names of) markup commands in scheme: documentation

2022-01-21 Thread David Kastrup
Jean Abou Samra  writes:

> Le 21/01/2022 à 08:57, Bernhard Fisseni a écrit :
>> Good morning,
>>
>>   Consequence: There is no collision between an auxiliary function
>> CMD and a homonymous markup command \CMD, as they are (CMD ...) and
>> (make-CMD-markup ...), respectively, in scheme.
>
>
> Yes, and not only make-CMD-markup, but more importantly
> CMD-markup

CMD-markup-function

> which is the function into which your definition gets turned into, in
> charge of doing the markup interpretation.

-- 
David Kastrup



Re: Entering Chords using Nashville Number System

2022-01-21 Thread Amelie Protscher
Hi Valentin,

repeats in NNS are specified with standard repeat signs, displayed
inline, and volta brackets above in case of an \alternative {{}{}}.

Repeats of 2nd order are displayed with segno and coda sign.

Short repeats can be achieved with percent style.

Cheers,

Amy



On 21.01.22 18:58, Valentin Petzel wrote:
> Current state after lots of effort last night, now with support for
tuplets and
> bass notes, also with inline key changes.
>
> Starting to look somewhat acceptable (appart from alignment, which is
sill a
> mess), I guess.
>
> Is there some mechanism for specifying something like repeats?
>
> Cheers,
> ValentinOn 21.01.22 18:58, Valentin Petzel wrote:
> Current state after lots of effort last night, now with support for tuplets 
> and 
> bass notes, also with inline key changes.
> 
> Starting to look somewhat acceptable (appart from alignment, which is sill a 
> mess), I guess.
> 
> Is there some mechanism for specifying something like repeats?
> 
> Cheers,
> Valentin


-- 
Dr. Amelie Protscher (a...@amelieprotscher.com)
Pianist, Bassist, Guitarist, Composer, Friedrich-Ebert-Str. 25, 14548
Caputh, Germany
https://www.amelieprotscher.com/
https://www.facebook.com/amyprotscherjazz/
https://www.youtube.com/channel/UCO9A6rVmXjGxAGSsUL9Tt6g/



Re: learning (names of) markup commands in scheme: documentation

2022-01-21 Thread Jean Abou Samra




plans of similar scope, and [I] work on LilyPond as a
hobby in otherwise already LilyPond development
is for me a hobby in already otherwise busy weeks.


Talk about busy weeks...



Re: learning (names of) markup commands in scheme: documentation

2022-01-21 Thread Jean Abou Samra

Le 21/01/2022 à 08:57, Bernhard Fisseni a écrit :

Good morning,

trying to understand the programming a bit better, I managed to 
transform the mixed command definitions to scheme code (see below).


I've learnt the following in the process; should some of it be made 
more explicit in the manual?  (If so, I could try to think of 
suggestions.)


- In my opinion writing the scheme code is much easier than mixing 
Lilypond and Scheme.


- For every markup command and every markup list command \CMD, there 
is a corresponding scheme function make-CMD-markup.



 
uses this implicitly in the last paragraphs, but an explicit remark 
might be helpful.



 
explains the correspondence with one example, but does not mention 
markup list commands; furthermore, the heading and the wording mislead 
me so that I only understood the generality of this paragraph 
afterwards. Maybe "How Markups Work Internally: Lilypond Commands and 
Corresponding Scheme Commands" might be more explicit?


  Consequence: There is no collision between an auxiliary function CMD 
and a homonymous markup command \CMD, as they are (CMD ...) and 
(make-CMD-markup ...), respectively, in scheme.



Yes, and not only make-CMD-markup, but more importantly
CMD-markup which is the function into which your definition
gets turned into, in charge of doing the markup interpretation.
make-CMD-markup is then essentially defined as

(define (make-CMD-markup . args)
  (cons CMD-markup args))

A simplified version of interpret-markup would be:

(define (interpret-markup layout props mkup)
  (apply (car mkup)
 layout
 props
 (cdr mkup)))


  Question: Do similar correspondences exist for music functions and 
event functions? It looks as if they might me make-CMD-music and 
make-CMD-event, but I find no dokumentation for this. (May be my fault.)



No, there is no such thing. A music function is just
a music function, called by its name, which is the same
in the LilyPond namespace and in the Scheme namespace
-- these are actually the same. Try

#(display relative)

So music functions are first-class objects. Same with
other syntax functions (all those you create with
define-{music,event,scheme,void}-function). You can
even call them in Scheme:

$(relative #{ c' #} #{ c'1 d e #})

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

Markups are very special. They are not implemented
as a type of objets, but as mere lists whose car
is a markup command, namely a procedure (the CMD-markup
one) that bears a bunch of object properties
("attributes") like its signature. The \markup syntax
does not look up objects in the namespace normally,
but transforms the names to add "-markup" at the
end.

If you want my opinion, markup internals are not the
best-designed part of LilyPond. I have plans to
change that, but I also have uncountably many
plans of similar scope, and work on LilyPond as a
hobby in otherwise already LilyPond development
is for me a hobby in already otherwise busy weeks.



- A (list ...) of markups is indeed a markup list, and markup lists 
can be treated like just a list (map, length, car, cdr etc.).  
(Actually, I had expected that there were specialised conversions and 
accessor functions.)


  Given that lists are so fundamental, this might be stated somewhere.



Yes, but careful: not every markup list is a list
of markups, even though it is true that a list of
markups constitutes a markup list. The other way to
have a markup list is to apply a markup list command.
For example: \table-of-contents.

#(display #{ \markup \table-of-contents #})

Markup list commands are listed at
https://lilypond.org/doc/v2.23/Documentation/notation/text-markup-list-commands



- There is a point in processing when one has to convert every "line" 
(in my example) to markup, although the interpretation happens 
automatically in other places (see interpret-markup-list in 
apply-last-strut).



I'm not sure what you mean here. Can you clarify?





[snipped]




[Lukas]

Isn't this just

#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup #:combine line #:transparent "Ij")))

? 



Well, we have four ways to create markups in Scheme.

#{ \markup \bold "a" #}
(make-bold-markup "a")
(markup #:bold "a")
(list bold-markup "a")

The fourth one relies on markup internals, and I would
recommend against using it since, as said above, we
could want to move away from this representation at
some point.

Between the three former ones, the choice is
mostly a matter of taste. The markup macro has
the caveats mentioned in the 

Re: Assistance to Create a Recipe for 41-EDO and "Kite Guitar" Tablature

2022-01-21 Thread Devin Ulibarri
Hi,

Unfortunately, I do not really have the skills to put together a recipe
myself from the templates available (emphasis on "I do not have the
skills").

If others who are interested, who have the skills, would like to take
this on, I am happy to advise and introduce to the Kite Guitar team, who
are a great team of artists and leaders of various good causes.

Best,
Devin

Stefan Thomas:
> Dear Devin,
> did You succeed with your research? I would be interested in a file with
> definitions for notenames and accidental glyphs.
> Thanks,
> Stefan
> 
> Am Do., 29. Juli 2021 um 13:24 Uhr schrieb :
> 
> Thank you; I will do some research.
> 
> On 2021-07-28 13:49, Stefan Thomas wrote:
> > Dear Devin,
> > there's also the "society for ekmelic music"  in Salzburg, Austria.
> > They also support mictronal notation with lilypond.
> > Have a look at
> > http://www.ekmelic-music.org/en/extra/ekmelily.htm#Download
> > Maybee this helps You!
> > Best,
> > Stefan
> >
> >> Hi All,
> >>
> >> I need help from users who have some experience with microtonality
> >> (or overrides in general) in Lilypond to create a recipe for
> >> lilypond notation for the Kite Guitar (kiteguitar.com
>  [1]). The Kite
> >> Guitar uses 41 equal divisions of the octave in a clever way, which
> >> balances practicality with playability to get a very close
> >> approximation to 7-limit Just Intonation. I have made some attempts,
> >> but I don't really know Lilypond so well that I can create a handy
> >> recipe such as this. I did some research and found
> >> http://x31eq.com/lilypond/ which is helpful, but I am unable to make
> >> the necessary tweaks with my limited knowledge. (I am happy to send
> >> over what I tried to do, but as my attempts have only failed I do
> >> not want to confuse anyone.)
> >>
> >> The overarching specs are:
> >> 1. 41 Equal Divisions of the Octave
> >>
> >> Tablature-specific:
> >> 2. Frets are spaced two EDO-steps apart (i.e. 2 of the 41)
> >> 3. Strings are tuned 13 EDO-steps apart (i.e. 13 of the 41)
> >>
> >> ^^Lilypond will either need to find the pitch, or allow the user to
> >> override the current calculation as what I am getting is for a
> >> standard guitar.
> >>
> >> Notation-specific:
> >>
> >> 4. There are Sharps and Flats, but there are also upwards "^",
> >> double-upwards "^^", downwards "v", and "double-downwards "vv". (see
> >> https://en.xen.wiki/w/Ups_and_Downs_Notation ) 5. There needs to be
> >> some way to set upwards/downwards in the key signature. ^^ it would
> >> be super-nice if this could be done globally, so that a composer can
> >> focus on the music-making
> >>
> >> Chord-charts:
> >>
> >> 6. Support for chord charts such as
> >>
> >
> 
> https://en.xen.wiki/w/Kite_Guitar_Translations_by_Aaron_Wolf#Auld_Lang_Syne
> >> Any help is appreciated. The growing community of Kite Guitar
> >> players would really appreciate this (many of whom are fellow
> >> software libre supporters/advocates). Also, I can send over some
> >> sample scores created with MuseScore once I receive permission to
> >> share them.
> >>
> >> Thanks in Advance!
> >> Devin
> >
> >
> > Links:
> > --
> > [1] http://kiteguitar.com
> 



Re: X-offset for breath marks

2022-01-21 Thread Valentin Petzel
Hello Rachel,

The reason why offsetting the X-offset value does not work is because it is not 
used for placing Breathing marks. You can see from the output that the offset 
command fails, as no offset is calculated in the first place.

You can still use something like \tweak extra-offset #'(x-offset . 0) (which 
does not affect spacing) or if you want to add space while also affecting 
spacing \tweak extra-spacing-width #'(-left-space . Right-space)

Cheers,
Valentin

Am Donnerstag, 20. Jänner 2022, 21:04:09 CET schrieb Rachel Green:
> Hi,
> 
> I am trying to adjust the placement of the first breath mark in this
> excerpt. The Y-offset command is working as expected, but the X-offset does
> nothing. I also tried \tweak as mentioned in
> https://lilypond.org/doc/v2.22/Documentation/notation/the-offset-command.
> Is there a separate command for the x-axis?
> 
> 
> Best,
> Rachel
> 
> 
> 
> 
> 
> 
> \version "2.20.0"
> 
> \language "english"
> #(set-global-staff-size 20)
> 
> 
> VarOneTreble = \relative c'
>   {
>   <<
>   {
>   R1
>   }
>   \\
>   \relative c''
>   {
>   b8_2 a_3 b4_1
> \offset Y-offset -2
> \offset X-offset -2
> \breathe d,_4 \breathe d'_2 \breathe |
> }
> 
>   }
> 
>  VarOneBass = \relative c
>   {
>   \clef bass
> R1
>   }
> 
> \score {
>   \new GrandStaff
>   <<
>   \new Staff = "treble" { \VarOneTreble }
> \new Staff = "bass" { \VarOneBass }
> 
> }

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


Re: learning (names of) markup commands in scheme: documentation

2022-01-21 Thread Lukas-Fabian Moser



Also note that your function, if called with \strut-line { hello world 
}, actually adds your invisible strut to every word of the line. (Just 
remove the make-transparent-markup in your function to see this, or, 
more easuily, remove the #:transparent in my version). Compare:


\markup \strut-line { hello world }
\markup \strut-line \line { hello world }

This difference (I think) originates in the way LilyPond applies 
markup functions to explicit markups of the form { some word and some 
other }, or put differently: Where the implicit \line is put, and how 
a function expecting a single markup is applied to a list of markups.


But note what changes if you replace the markup? predicate in your 
function definition by markup-list?.


I think that was a bit cryptic :-).

Here's a (hopefully) clearer example:

\version "2.22"

#(define-markup-command (demo-eating-markup layout props stuff) (markup?)
   (format #t "Processing single markup: \"~a\"\n" (markup->string stuff))
   (interpret-markup layout props stuff))

#(define-markup-command (demo-eating-markup-list layout props stuff) 
(markup-list?)

   (format #t "Processing markup list: ~a\n" stuff)
   (interpret-markup layout props (make-column-markup stuff)))

\markup \demo-eating-markup { one two }
\markup \demo-eating-markup \line { eins zwei }
\markup \demo-eating-markup-list { oans zwoa }
\markup \demo-eating-markup-list { \line { un deux } }

The standard use case for make-XXX-markup is explained in: 
http://lilypond.org/doc/v2.23/Documentation/extending/markup-construction-in-scheme.html 
under "Known issues and warnings".


I would agree that the explanations regarding markups vs. markup lists, 
markup vs. stencils, markup in scheme etc. in the Documentation might be 
improved. We always welcome contributions! (And, your probably noticed 
this: The German documentation is in an effectively unmaintained state 
at the moment. But it seems there's hope this might change soonish.


Lukas




Re: learning (names of) markup commands in scheme: documentation

2022-01-21 Thread Lukas-Fabian Moser

Hi Bernhard,

unfortunately I don't have much time at the moment (and there's always 
the chance that Jean or someone else more knowledgeable than me is 
already working on an exhaustive answer), but there's one thing I'd like 
to point out:



#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup
    (make-combine-markup
 (make-line-markup (list line))
 (make-transparent-markup "Ij")


Isn't this just

#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup #:combine line #:transparent "Ij")))

?

Also note that your function, if called with \strut-line { hello world 
}, actually adds your invisible strut to every word of the line. (Just 
remove the make-transparent-markup in your function to see this, or, 
more easuily, remove the #:transparent in my version). Compare:


\markup \strut-line { hello world }
\markup \strut-line \line { hello world }

This difference (I think) originates in the way LilyPond applies markup 
functions to explicit markups of the form { some word and some other }, 
or put differently: Where the implicit \line is put, and how a function 
expecting a single markup is applied to a list of markups.


But note what changes if you replace the markup? predicate in your 
function definition by markup-list?.


Lukas





learning (names of) markup commands in scheme: documentation

2022-01-21 Thread Bernhard Fisseni

Good morning,

trying to understand the programming a bit better, I managed to 
transform the mixed command definitions to scheme code (see below).


I've learnt the following in the process; should some of it be made more 
explicit in the manual?  (If so, I could try to think of suggestions.)


- In my opinion writing the scheme code is much easier than mixing 
Lilypond and Scheme.


- For every markup command and every markup list command \CMD, there is 
a corresponding scheme function make-CMD-markup.



 
uses this implicitly in the last paragraphs, but an explicit remark 
might be helpful.



 
explains the correspondence with one example, but does not mention 
markup list commands; furthermore, the heading and the wording mislead 
me so that I only understood the generality of this paragraph 
afterwards. Maybe "How Markups Work Internally: Lilypond Commands and 
Corresponding Scheme Commands" might be more explicit?


  Consequence: There is no collision between an auxiliary function CMD 
and a homonymous markup command \CMD, as they are (CMD ...) and 
(make-CMD-markup ...), respectively, in scheme.


  Question: Do similar correspondences exist for music functions and 
event functions? It looks as if they might me make-CMD-music and 
make-CMD-event, but I find no dokumentation for this. (May be my fault.)


- A (list ...) of markups is indeed a markup list, and markup lists can 
be treated like just a list (map, length, car, cdr etc.).  (Actually, I 
had expected that there were specialised conversions and accessor 
functions.)


  Given that lists are so fundamental, this might be stated somewhere.

- There is a point in processing when one has to convert every "line" 
(in my example) to markup, although the interpretation happens 
automatically in other places (see interpret-markup-list in 
apply-last-strut).



Sorry if this looks like nitpicking, I am just trying to find my way around.

Best regards,
  Bernhard


For reference, this:



#(define-markup-command
(strut-line layout props line)
(markup?)
(interpret-markup layout props #{
  \markup{
\combine #line \transparent "Ij"
  }
#}))

#(define-markup-command
 (stanza-list layout props stanzas)
 (markup-list?)
   (interpret-markup layout props #{
   \markup
   \column {
 #stanzas
   }
  #}))

#(define-markup-list-command
(apply-very-last-strut layout props stanza-lines)
(markup-list?)
(letrec ((apply-last-strut
  (lambda (stanza-lines)
   (if (null? stanza-lines)
stanza-lines
(if (> (length stanza-lines) 1)
 (cons (interpret-markup layout props #{
\markup {#(car stanza-lines)}
  #})
 (apply-last-strut (cdr stanza-lines)))
 (interpret-markup-list layout props #{
   \markuplist {
 \strut-line #stanza-lines
   }
  #}))
  (apply-last-strut stanza-lines)))

#(define-markup-command
(my-stanza layout props number lines)
(markup? markup-list?)
#:properties ((extra-space 1))
(interpret-markup layout props #{
 \markup {
   \combine \null \vspace #extra-space \line {
 \bold #number
 \column {
   \apply-very-last-strut #lines
 }
   }
 }
#}))


became this:

#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup
(make-combine-markup
 (make-line-markup (list line))
 (make-transparent-markup "Ij")

#(define-markup-command (stanza-list layout props stanzas)
  (markup-list?)
  "make a column of stanzas (just for explicitness' sake)"
  (interpret-markup layout props
   (markup
(make-column-markup stanzas

#(define-markup-list-command
  (apply-last-strut layout props stanza-lines)
  (markup-list?)
  "append a strut to the last of the stanza-lines to ensure proper spacing"
  (letrec ((apply-last-strut
(lambda (stanza-lines)
 (cond
  ((null? stanza-lines) stanza-lines)
  ((> (length stanza-lines) 1)
   (cons (interpret-markup layout props
  (car stanza-lines))
(apply-last-strut (cdr stanza-lines
  (else
(interpret-markup-list
  layout props
  (map make-strut-line-markup stanza-lines)))
(apply-last-strut stanza-lines)))

#(define-markup-command
   (numbered-stanza layout props number lines)
   (markup? markup-list?)
   #:properties ((extra-space 1))
   "make a numbered stanza with the number to the left of the lyrics"
   (interpret-markup
 layout props
 (markup
   

Re: Problems with small staves (Barlines, spanbars, enlarged arpeggios)

2022-01-21 Thread Hans Kenneth Cua
Hello again,

I haven't been able to solve the problem yet, but I did a little bit of
testing. It seems that the issue has something to do with multiple voices;
however, I cannot really pinpoint it.

The issue in my sample code is resolvable by placing more than a few notes
inside parts with multiple voices. Replacing the vOssiaRight staff with

\relative c''' {
  \vGlobal
  << { \ottava #1 f8-!\noBeam \ottava #0 a,,32_( g f e) } \\ { a'8 s } >>
d,,8-!\noBeam \ottava #1 8-! |
  -!\noBeam \ottava #0 d,,32( c b a) g8-! \ottava #1 << { g'''32( f
e d) } \\ { g,8 } >> |
  << { e'8-!\noBeam \ottava #0 g,,32_( f e d) } \\ { g'8 s } >>
c,,8-!\noBeam \ottava #1 e''32( g c e) | \break

fixes the barline.

These two bars and one other bar are the only instances where there is a
single-note multivoice part in either of the ossia staves. However, after
replacing them with this partial workaround, the final barline continues to
be an issue. I wonder what's going on here...

Cheers,
Hans