Re: Footnote is not printed

2021-12-03 Thread Valentin Petzel
I think it would be better to add a \noPageBreak between the markup and the 
score, just in case.

If you do not want loose the automatic formatting of the header you could do
\markup \footnote \null \italic "* By me"
\noPageBreak

Before the score. But thus will give you a little extra spacing (markup-
markup-spacing) before the score.

Cheers,
Valentin

Am Freitag, 3. Dezember 2021, 21:37:11 CET schrieb Jean Abou Samra:
> Le 03/12/2021 à 14:27, Павел a écrit :
> > Hello, I have problem with a footnote: it is not printer in the bottom
> > of page.
> > 
> > \version "2.22.1"
> > \score {
> > \header {
> > piece = "My piece"
> > opus = \markup\concat { "My opus" \footnote "*" \italic "* By
> > me" }
> > }
> > { c' d' e' f' }
> > }
> 
> It's a known issue. Footnotes are only supported in
> music and standalone markup, not in headers. Try
> this instead:
> 
> \version "2.22.1"
> 
> \markup \fill-line {
>"My piece"
>\concat { "My opus" \footnote "*" \italic "* By me" }
> }
> 
> \score {
>{ c' d' e' f' }
> }
> 
> 
> Best,
> Jean

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


Re: [Navigator] Bundesfachagentur Educa: Aufnahme LilyPond in den Navigator

2021-12-03 Thread Jean Abou Samra

Le 01/12/2021 à 16:47, Jan Nieuwenhuizen a écrit :

Hi!

Anyone interested in taking care of this?

Greetings,
Jannke



It might be a good idea to post this on
https://lilypondforum.de/ also.

Cheers,
Jean



Re: Footnote is not printed

2021-12-03 Thread Jean Abou Samra

Le 03/12/2021 à 14:27, Павел a écrit :
Hello, I have problem with a footnote: it is not printer in the bottom 
of page.


\version "2.22.1"
\score {
    \header {
    piece = "My piece"
    opus = \markup\concat { "My opus" \footnote "*" \italic "* By 
me" }

    }
    { c' d' e' f' }
}



It's a known issue. Footnotes are only supported in
music and standalone markup, not in headers. Try
this instead:

\version "2.22.1"

\markup \fill-line {
  "My piece"
  \concat { "My opus" \footnote "*" \italic "* By me" }
}

\score {
  { c' d' e' f' }
}


Best,
Jean




Re: tie from multiple voice?

2021-12-03 Thread Tom Sgouros
Great, I think I understand. Thank you very much.

 -Tom

On Fri, Dec 3, 2021 at 12:48 PM Lukas-Fabian Moser  wrote:

> Hi Tom,
>
> Am 03.12.21 um 16:02 schrieb Tom Sgouros:
> > Thanks, but I'm not sure I completely understand. What you're saying
> > is that if you don't define a voice immediately, you still get one,
> > but its name is nothing ("")? So in my multi-voice segment I can
> > explicitly reference the voice-with-no-name as you are showing with
> > the \voices construct? That makes sense, if that's correct.
>
> Yes, that's basically correct (I'm just not sure if the sentence "its
> name is nothing" is technically correct, but anyway it's what the
> situation amounts to).
>
> If you do \new Staff, then the music you enter is still in a "Voice"
> context that is created implicitly. We could create it explicitly and
> also give it a name:
>
> \new Staff \new Voice = main {
>
>   % bla
>
> }
>
> and then use \voices main,2 << \\ >> for multi-voice music where the
> first voice is a continuation of the "main" voice (and hence can be tied
> to notes outside of << \\ >>).
>
> But notice what Akikazu wrote: If we use \voices with non-number id's,
> LilyPond does not do the \voiceOne / \voiceOne automatically that's
> responsible for stem directions, shifting etc. So we have to add them
> manually, which I forgot to do in my example, unfortunately.
>
> Best
> Lukas
>
>


Re: tie from multiple voice?

2021-12-03 Thread Lukas-Fabian Moser

Hi Tom,

Am 03.12.21 um 16:02 schrieb Tom Sgouros:
Thanks, but I'm not sure I completely understand. What you're saying 
is that if you don't define a voice immediately, you still get one, 
but its name is nothing ("")? So in my multi-voice segment I can 
explicitly reference the voice-with-no-name as you are showing with 
the \voices construct? That makes sense, if that's correct.


Yes, that's basically correct (I'm just not sure if the sentence "its 
name is nothing" is technically correct, but anyway it's what the 
situation amounts to).


If you do \new Staff, then the music you enter is still in a "Voice" 
context that is created implicitly. We could create it explicitly and 
also give it a name:


\new Staff \new Voice = main {

 % bla

}

and then use \voices main,2 << \\ >> for multi-voice music where the 
first voice is a continuation of the "main" voice (and hence can be tied 
to notes outside of << \\ >>).


But notice what Akikazu wrote: If we use \voices with non-number id's, 
LilyPond does not do the \voiceOne / \voiceOne automatically that's 
responsible for stem directions, shifting etc. So we have to add them 
manually, which I forgot to do in my example, unfortunately.


Best
Lukas




Re: tie from multiple voice?

2021-12-03 Thread Lukas-Fabian Moser

Hi Akikazu,

It seems that grob directions are not set implicitly in non-number ID 
context.


Yes, that's true - I forgot to mention that. Thanks for your examples, 
both of which I'd recommend as "good practice".


Lukas




Re: Adding to header using module-define! and alist with markups

2021-12-03 Thread Nate Whetsell
臘‍♂️

That did it, thank you!

> On Dec 3, 2021, at 12:07 PM, Jean Abou Samra  wrote:
> 
> Le 03/12/2021 à 18:04, Nate Whetsell a écrit :
>> Thanks for your help!
>> 
>> Using \justify as
>> 
>> ```
>> \paper {
>>  scoreTitleMarkup = \markup {
>>\column {
>>  \fromproperty #'header:piece
>>  \justify { #'header:instruction }
>>}
>>  }
>> }
>> ```
>> 
>> may be on the right track, but this results in (for all cases):
>> 
>> ```
>> test.ly :7:17: error: not a markup
>>  \justify {
>> #'header:instruction }
>> ```
>> 
>> Hopefully I’m missing something simple.
> 
> \justify { \fromproperty #'header:instruction } ?
> 
> Best,
> Jean
> 




Re: Adding to header using module-define! and alist with markups

2021-12-03 Thread Jean Abou Samra

Le 03/12/2021 à 18:04, Nate Whetsell a écrit :

Thanks for your help!

Using \justify as

```
\paper {
 scoreTitleMarkup = \markup {
   \column {
     \fromproperty #'header:piece
     \justify { #'header:instruction }
   }
 }
}
```

may be on the right track, but this results in (for all cases):

```
test.ly :7:17: error: not a markup
     \justify {
                #'header:instruction }
```

Hopefully I’m missing something simple.


\justify { \fromproperty #'header:instruction } ?

Best,
Jean




Re: Adding to header using module-define! and alist with markups

2021-12-03 Thread Nate Whetsell
Thanks for your help!

Using \justify as

```
\paper {
 scoreTitleMarkup = \markup {
   \column {
 \fromproperty #'header:piece
 \justify { #'header:instruction }
   }
 }
}
```

may be on the right track, but this results in (for all cases):

```
test.ly:7:17: error: not a markup
 \justify { 
#'header:instruction }
```

Hopefully I’m missing something simple.

> On Dec 2, 2021, at 11:35 AM, David Kastrup  wrote:
> 
> Nate Whetsell mailto:nathan.whets...@gmail.com>> 
> writes:
> 
>> Thanks, but unfortunately using a backtick and commas seems to produce the 
>> same output. If it’s helpful, here’s the same example with a backtick and 
>> commas:
>> 
>> ```
>> \version "2.22.0"
>> 
>> \paper {
>> scoreTitleMarkup = \markup {
>>   \column {
>> \fromproperty #'header:piece
>> \justify-field #'header:instruction
>>   }
>> }
>> }
> 
> Well, \justify-field just takes a string, like \justify-string does.
> Maybe it should check for markup lists and pass them through \justify .
> 
> -- 
> David Kastrup



Re: opposite of shortest-duration-space

2021-12-03 Thread Dimitris Marinakis
https://github.com/lilypond/lilypond/blob/817d656cecb0f899ff6e7d1b5e900a5517c31f69/scm/define-grobs.scm
I believe here is the relevant code (Bend Spanner). I can see a padding
setting. If you increase the padding and adjust the extra-offset it may
work.

{
\override Score.SpacingSpanner.shortest-duration-space = #15
\override BendAfter.padding = #0.8
\override BendAfter.extra-offset = #'(-0.3 . 0)
 c'4-\bendAfter #3
 d'4
}


On Fri, Dec 3, 2021 at 5:29 PM Paul Scott  wrote:

> Thank you for your reply.
>
> \bendAfter doesn't require a termination.  I now know an easy solution for
> unterminated glissandos but I see no reason to reinvent the curves already
> built into \bendAfter.
>
> I probably could look at the \bendAfter code and figure out how to get
> what I want.  I just thought I would ask for the possibly direct solution.
>
> Paul
>
>
> On 12/1/21 12:36 PM, Dimitris Marinakis wrote:
>
> I think bendAfter has a lot of issues with spacing and collisions. You can
> easily customise a glissando though to take advantage of its more robust
> functionality.
>
> Here's a basic attempt. Currently it has a fixed path shape but someone
> better in Scheme can help to make this more flexible.
>
> #(define (path-gliss grob)
> (if (ly:stencil? (ly:line-spanner::print grob))
> (let* ((stencil (ly:line-spanner::print grob))
> (X-ext (ly:stencil-extent stencil X))
> (Y-ext (ly:stencil-extent stencil Y))
> (width (interval-length X-ext))
> (len (interval-length Y-ext)))
>
>(ly:stencil-translate
>  (grob-interpret-markup grob
>(markup
>  (#:path 0.2
>(list (list 'moveto 0 0)
>(list 'curveto 0 0 7 0 width len)
>  (cons (interval-start X-ext) (interval-start Y-ext
>   #f))
>
>
> \relative c' {
>\override Score.SpacingSpanner.shortest-duration-space = #8
> \once\override Glissando #'bound-details = #'((right (0 . 0)
> (end-on-accidental . #f) (padding . 2)) (left (0 . 0) (padding . 1.5)))
> \once\override Glissando #'stencil = #path-gliss
>  c2\glissando e f\glissando g'
> }
>
> On Wed, Dec 1, 2021 at 8:13 PM Paul Scott  wrote:
>
>> Oops: 2.23.5
>> On 12/1/21 11:07 AM, Paul Scott wrote:
>>
>> In Notation 1.3.2 Falls and Doits there is:
>>
>>   \override Score.SpacingSpanner.shortest-duration-space = #4.0
>>
>> Is there a way to make the width of \bendAfter less?
>>
>> TIA,
>>
>> Paul
>>
>>
>>


Re: opposite of shortest-duration-space

2021-12-03 Thread Paul Scott

Thank you for your reply.

\bendAfter doesn't require a termination.  I now know an easy solution 
for unterminated glissandos but I see no reason to reinvent the curves 
already built into \bendAfter.


I probably could look at the \bendAfter code and figure out how to get 
what I want.  I just thought I would ask for the possibly direct solution.


Paul


On 12/1/21 12:36 PM, Dimitris Marinakis wrote:
I think bendAfter has a lot of issues with spacing and collisions. You 
can easily customise a glissando though to take advantage of its more 
robust functionality.


Here's a basic attempt. Currently it has a fixed path shape but 
someone better in Scheme can help to make this more flexible.


#(define (path-gliss grob)
        (if (ly:stencil? (ly:line-spanner::print grob))
    (let* ((stencil (ly:line-spanner::print grob))
            (X-ext (ly:stencil-extent stencil X))
            (Y-ext (ly:stencil-extent stencil Y))
            (width (interval-length X-ext))
            (len (interval-length Y-ext)))

       (ly:stencil-translate
         (grob-interpret-markup grob
           (markup
             (#:path 0.2
               (list (list 'moveto 0 0)
               (list 'curveto 0 0 7 0 width len)
         (cons (interval-start X-ext) (interval-start Y-ext
      #f))


\relative c' {
       \override Score.SpacingSpanner.shortest-duration-space = #8
        \once\override Glissando #'bound-details = #'((right (0 . 0) 
(end-on-accidental . #f) (padding . 2)) (left (0 . 0) (padding . 1.5)))

        \once\override Glissando #'stencil = #path-gliss
         c2\glissando e f\glissando g'
}

On Wed, Dec 1, 2021 at 8:13 PM Paul Scott > wrote:


Oops: 2.23.5

On 12/1/21 11:07 AM, Paul Scott wrote:


In Notation 1.3.2 Falls and Doits there is:

   \override Score.SpacingSpanner.shortest-duration-space = #4.0

Is there a way to make the width of \bendAfter less?

TIA,

Paul



Re: tie from multiple voice?

2021-12-03 Thread Tom Sgouros
Thanks, but I'm not sure I completely understand. What you're saying is
that if you don't define a voice immediately, you still get one, but
its name is nothing ("")? So in my multi-voice segment I can explicitly
reference the voice-with-no-name as you are showing with the \voices
construct? That makes sense, if that's correct.

Thank you,

 -Tom

On Fri, Dec 3, 2021 at 2:17 AM Lukas-Fabian Moser  wrote:

> Hi Tom,
>
> > This does not work:   << { d1~ } \\ {g1} >> | d1 |   No tie appears
> > and I don't see anything like an error or warning that I can do
> > anything with. I can rewrite to have an empty second voice in that
> > second measure, but maybe it's feasible to do it some other way?
>
> If the un-named implicit voice already exists (i.e. if you're not right
> at the beginning of a piece, or if you did an explicit \new Voice { ...
> }), then you can do:
>
> \version "2.22"
>
> \new Staff {
>a'1
>\voices "",2 <<
>  d''1~ \\
>  { g'2 g' }
>>>
>d''1
> }
>
> With "\voices" you can define the names of the voices used by the <<  \\
>  >> construct.
>
> Lukas
>
>


Re: Dotted \markup \note - tweaking the dot position

2021-12-03 Thread Leo Correia de Verdier
Hi Adam!

I don’t think you can use \note or \note-by-number any longer when you need 
finer control over the output. This snippet can serve as starting point for 
more advanced notes and music expressions in markup.
https://lsr.di.unimi.it/LSR/Item?id=1029

HTH
/Leo



> 3 dec. 2021 kl. 13:06 skrev Adam M. Griggs :
> 
> I hope you won't mind me bumping this question. It seems to have slipped 
> under radar.
> 
> Thank you!
> 
> On Mon, 22 Nov 2021, 11:37 Adam M. Griggs,  wrote:
> Hello again,
> 
> I'm working with version 2.23.4.
> 
> Looking at the documentation for \note and \note-by-number
> (https://lilypond.org/doc/v2.23/Documentation/notation/music), it
> lists style, flag-style and font-size as overridable if I'm reading it
> correctly.
> 
> In a dotted \markup \note, a dotted minim for example, is it possible
> for me to vertically shift the dot?




Footnote is not printed

2021-12-03 Thread Павел
Hello, I have problem with a footnote: it is not printer in the bottom 
of page.


\version "2.22.1"
\score {
    \header {
    piece = "My piece"
    opus = \markup\concat { "My opus" \footnote "*" \italic "* By me" }
    }
    { c' d' e' f' }
}




Re: lyric-syllable-magnetic-snap stopped working in 2.23.5—meta.classes error

2021-12-03 Thread Jean Abou Samra

Le 03/12/2021 à 13:31, Simon Albrecht a écrit :

Dear list,

I’ve just upgraded to 2.23.5 from 2.23.3 and when I now use the 
attached library file, I get this error message in my log:


Interpreting music... fatal error: meta.classes must be non-empty 
list, found #f Exited with return code 1.


Can someone help with fixing it?

Thanks in advance and best regards Simon




This is caused by a change in the internals
of grob definitions. They are not user-exposed
yet, precisely for the reason that they are
not fully fleshed out yet. In the meanwhile,
it's unfortunately sort of expected that
snippets like this can break with upgrades.

Please find attached an updated version.

Best,
Jean

\version "2.23.5"

%% CHANGE-LOG harm ()
%%
%% line 52:
%% map becomes for-each
%%
%% line 133:
%% typo in comment
%%
%% lines 234 ff, 260:
%% exclude line-starting LyricHyphen

\header {
  snippet-title = "Magnetic snapping lyric syllables"
  snippet-author = "David Nalesnik, Mike Solomon, harm"
  % snippet-source = 
"http://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00489.html;
  snippet-source = "see 
https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00388.html;
  snippet-description = \markup {
This snippet handles lyric syllables that belong to one word together
and ensures that there are no irritating gaps between them (solves issue 
2458).
  }
  % add comma-separated tags to make searching more effective:
  tags = "lyrics, syllable, gap, hyphen"
  % is this snippet ready?  See meta/status-values.md
  status = "undecided"
}

%%
% here goes the snippet: %
%%

% ADD NEW GROB INTERFACE %%

#(ly:add-interface
  'lyric-word-interface
  "A word of lyrics. Includes syllables and hyphens."
  '(text-items))

%%%

% CREATE NEW GROB PROPERTY 

#(define (define-grob-property symbol type? description)
   (if (not (equal? (object-property symbol 'backend-doc) #f))
   (ly:error (_ "symbol ~S redefined") symbol))

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

%% harm:
#(for-each
  (lambda (x)
(apply define-grob-property x))

  `(
 (text-items ,list? "Syllables and hyphens of a word of lyrics")))

%%%

 ADD DEFINITION OF GROB %%%

#(define (add-grob-definition grob-name grob-entry)
   (set! all-grob-descriptions
 (cons ((@@ (lily) completize-grob-entry)
(cons grob-name grob-entry))
   all-grob-descriptions)))

#(add-grob-definition
  'LyricWord
  `(;(stencil . ,ly:lyric-word::print)
 (meta . ((class . Spanner)
  (interfaces . (lyric-hyphen-interface
 lyric-word-interface
 text-interface))

%%%

%%%

#(define (add-bound-item spanner item)
   (if (null? (ly:spanner-bound spanner LEFT))
   (ly:spanner-set-bound! spanner LEFT item)
   (ly:spanner-set-bound! spanner RIGHT item)))

%%%

 ENGRAVER %
collectlyricwordEngraver =
% Collect lyric syllables and hyphens into words. (LyricExtender?)
% The bounds of a LyricWord should be LyricText grobs, when available.
% When a LyricWord consists of a single syllable, the left and right bounds
% should be the same grob.
% When a spanner is broken, the ends not attached to LyricText grobs should
% attach to NonMusicalPaperColumn, as with any spanner.
#(lambda (context)
   (let ((word-bits '()) ; holds syllables and hyphens
  (word '()) ; LyricWord grob we're building
  (collect #f)) ; signal to end word and begin another
 (make-engraver

  (acknowledgers
   ((lyric-syllable-interface engraver grob source-engraver)
(set! collect #t)
(set! word-bits (append word-bits (list grob)))
(if (ly:grob? word)
(add-bound-item word grob)))
   ((lyric-hyphen-interface engraver grob source-engraver)
(let* ((props (ly:grob-basic-properties grob))
   (meta (assoc-get 'meta props))
   (name (assoc-get 'name meta)))
  ; don't collect LyricSpace
  ;; harm:
  ; use it as our signal to end or word/start a new one
  (if (eq? name 'LyricSpace)
  (set! collect #f)
  (set! word-bits (append word-bits (list grob)))

  ((process-music trans)
   (if (and collect (pair? word-bits))
 

Re: (Re-post) Printing page numbers from a given page

2021-12-03 Thread Valentin Petzel
Hello Paolo,

Yes, I’m using that when I add uncounted pages to the front (using negative 
page numbers).

If you look into the definition of the paper variables oddHeaderMarkup and 
evenHeaderMarkup (as definined in titling-init).

There is a line 
\if \should-print-page-number \fromproperty #page:page-number-string

(or something different in earlier versions).

You can then easily define your own functions, like
#(define (print-positive-page-number layout props arg)
 (if (> (chain-assoc-get 'page:page-number props -1) 1)
(create-page-number-stencil layout props arg)
empty-stencil))

Cheers,
Valentin

Am Freitag, 3. Dezember 2021, 01:55:56 CET schrieb Paolo Prete:
> Hello,
> 
> I re-post this because I noted later that the answer I obtained does not
> fit what I asked.
> I wonder if is there a way to start printing page numbers of a score from a
> given page.
> 
> For example: if I want to start printing page numbers from page 3, page
> numbers 1 and 2, on first and second page, have to be omitted.
> 
> (note that this is not the property:  first-page-number = 3; it is instead
> somewhat similar to print-first-page-number = ##f, but extended to multiple
> pages)
> 
> Thanks!
> 
> P

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


lyric-syllable-magnetic-snap stopped working in 2.23.5—meta.classes error

2021-12-03 Thread Simon Albrecht

Dear list,

I’ve just upgraded to 2.23.5 from 2.23.3 and when I now use the attached 
library file, I get this error message in my log:


Interpreting music... fatal error: meta.classes must be non-empty list, 
found #f Exited with return code 1.


Can someone help with fixing it?

Thanks in advance and best regards Simon

\version "2.19.82"

%% CHANGE-LOG harm ()
%%
%% line 52:
%% map becomes for-each
%%
%% line 133:
%% typo in comment
%%
%% lines 234 ff, 260:
%% exclude line-starting LyricHyphen

\header {
  snippet-title = "Magnetic snapping lyric syllables"
  snippet-author = "David Nalesnik, Mike Solomon, harm"
  % snippet-source = 
"http://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00489.html;
  snippet-source = "see 
https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00388.html;
  snippet-description = \markup {
This snippet handles lyric syllables that belong to one word together
and ensures that there are no irritating gaps between them (solves issue 
2458).
  }
  % add comma-separated tags to make searching more effective:
  tags = "lyrics, syllable, gap, hyphen"
  % is this snippet ready?  See meta/status-values.md
  status = "undecided"
}

%%
% here goes the snippet: %
%%

% ADD NEW GROB INTERFACE %%

#(ly:add-interface
  'lyric-word-interface
  "A word of lyrics. Includes syllables and hyphens."
  '(text-items))

%%%

% CREATE NEW GROB PROPERTY 

#(define (define-grob-property symbol type? description)
   (if (not (equal? (object-property symbol 'backend-doc) #f))
   (ly:error (_ "symbol ~S redefined") symbol))

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

%% harm:
#(for-each
  (lambda (x)
(apply define-grob-property x))

  `(
 (text-items ,list? "Syllables and hyphens of a word of lyrics")))

%%%

 ADD DEFINITION OF GROB %%%

#(define (add-grob-definition grob-name grob-entry)
   (let* ((meta-entry   (assoc-get 'meta grob-entry))
  (class(assoc-get 'class meta-entry))
  (ifaces-entry (assoc-get 'interfaces meta-entry)))
 (set-object-property! grob-name 'translation-type? ly:grob-properties?)
 (set-object-property! grob-name 'is-grob? #t)
 (set! ifaces-entry (append (case class
  ((Item) '(item-interface))
  ((Spanner) '(spanner-interface))
  ((Paper_column) '((item-interface
 paper-column-interface)))
  ((System) '((system-interface
   spanner-interface)))
  (else '(unknown-interface)))
  ifaces-entry))
 (set! ifaces-entry (uniq-list (sort ifaces-entry symbol (interval-length hyphen-ex) threshold)
 '() ; no compression--DO NOTHING!

 (let*
  ((syl-a-text (ly:grob-property syl-a 'text))
   (syl-a-text (if (markup? syl-a-text) syl-a-text (markup syl-a-text)))
   (syl-b-text (ly:grob-property syl-b 'text))
   (syl-b-text (if (markup? syl-b-text) syl-b-text (markup syl-b-text)))
   (full-text (make-concat-markup (list syl-a-text syl-b-text

  (set! (ly:grob-property syl-a 'text) full-text)
  (set! (ly:grob-property syl-b 'text) empty-markup)
  (set! (ly:grob-property syl-a 'stencil) lyric-text::print)
  (set! (ly:grob-property syl-b 'stencil) lyric-text::print)
  (set! (ly:grob-property hyphen 'stencil) empty-stencil)

#(define (lyric-word-compressor threshold)
   (lambda (grob) ; LyricWord
 (let* ((items (ly:grob-object grob 'text-items))
(item-list (ly:grob-array->list items)))
   (if (> (length item-list) 1) ; do nothing to monosyllabic words
   (let* ((text-grobs
   (filter
(lambda (item)
  (grob::has-interface item 'lyric-syllable-interface))
item-list))
  (hyphen-grobs
   (filter
(lambda (item)
  (grob::has-interface item 'lyric-hyphen-interface))
item-list)))

 (define (helper seed tx-list hy-list)
   (if (and (pair? (cdr tx-list))
(pair? hy-list))
   (let ((next-syl (cadr tx-list))
 (hyphen (car hy-list)))
 (compress-pair seed hyphen next-syl threshold)
 (if (equal? empty-markup 

Re: tie from multiple voice?

2021-12-03 Thread Masaki, Akikazu

Hi Lukas,

It seems that grob directions are not set implicitly in non-number ID context.
See:
%%
\new Staff {
  a'1
  \voices "",2 <<
{ d''4 e'' d''2~ } \\
{ g'2 g' }
  >>
  d''2 c''
}
%%

In that case, the direction of Voice "" should be specified, and restored with 
\oneVoice.
%%
\new Staff {
  a'1
  \voices "",2 <<
{ \voiceOne d''4 e'' d''2~ } \\
{ g'2 g' }
  >>
  \oneVoice d''2 c''
}
%%

I often make an explicit new context without \\, and specify each direction.
This is verbose a little but clear.
%%
\new Staff \new Voice = "main" {
  a'1
  <<
{ \voiceOne d''4 e'' d''2~ } % succession of "main"
\new Voice = "temporary" { \voiceTwo g'2 g' }
  >>
  \oneVoice d''2 c''
}
%%

Akikazu


On 2021/12/03 16:17, Lukas-Fabian Moser wrote:

Hi Tom,


This does not work:   << { d1~ } \\ {g1} >> | d1 |   No tie appears and I don't 
see anything like an error or warning that I can do anything with. I can rewrite to have an 
empty second voice in that second measure, but maybe it's feasible to do it some other way?


If the un-named implicit voice already exists (i.e. if you're not right at the 
beginning of a piece, or if you did an explicit \new Voice { ... }), then you 
can do:

\version "2.22"

\new Staff {
   a'1
   \voices "",2 <<
     d''1~ \\
     { g'2 g' }
   >>
   d''1
}

With "\voices" you can define the names of the voices used by the <<  \\ >> 
construct.

Lukas






Re: Dotted \markup \note - tweaking the dot position

2021-12-03 Thread Adam M. Griggs
I hope you won't mind me bumping this question. It seems to have slipped
under radar.

Thank you!

On Mon, 22 Nov 2021, 11:37 Adam M. Griggs,  wrote:

> Hello again,
>
> I'm working with version 2.23.4.
>
> Looking at the documentation for \note and \note-by-number
> (https://lilypond.org/doc/v2.23/Documentation/notation/music), it
> lists style, flag-style and font-size as overridable if I'm reading it
> correctly.
>
> In a dotted \markup \note, a dotted minim for example, is it possible
> for me to vertically shift the dot?
>


Re: (Re-post) Printing page numbers from a given page

2021-12-03 Thread Paolo Prete
Thanks Aaron, this is precious!!

On Fri, Dec 3, 2021 at 2:44 AM Aaron Hill  wrote:

> On 2021-12-02 4:55 pm, Paolo Prete wrote:
> > I re-post this because I noted later that the answer I obtained does
> > not
> > fit what I asked.
> > I wonder if is there a way to start printing page numbers of a score
> > from a
> > given page.
> >
> > For example: if I want to start printing page numbers from page 3, page
> > numbers 1 and 2, on first and second page, have to be omitted.
> >
> > (note that this is not the property:  first-page-number = 3; it is
> > instead
> > somewhat similar to print-first-page-number = ##f, but extended to
> > multiple
> > pages)
>
> Customize the header:
>
> 
> \version "2.22.0"
>
> #(define ((page-number-on-or-after num) layout props arg)
>(if (< (chain-assoc-get 'page:page-number props -1) num)
> empty-stencil (interpret-markup layout props arg)))
>
> \paper {
>#(set-paper-size "a7landscape")
>
>oddHeaderMarkup =
>\markup \fontsize #12 \fill-line {
>  \null
>  \on-the-fly #(page-number-on-or-after 3)
>\fromproperty #'page:page-number-string
>}
>evenHeaderMarkup = ##f
>
>page-count = #5
> }
>
> { \repeat unfold 68 { b'4 4 2 } \bar "|." }
> 
>
>
> -- Aaron Hill
>