Re: Positioning of a tiny voice

2020-02-07 Thread David Kastrup
Kieren MacMillan  writes:

> Hi Joram,
>
>> the following works for me:
>> \new Staff <<
>>  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>
>
> Glad you found a solution!
>
>> Why did you use \voices 1,2 in your example?
>
> Bad coding… Here’s a better snippet (including your \oneVoice fix):
>
> %%%
> \version "2.19.83"
>
> upper = \relative {
>  \tiny
>   s4 b''
> }
>
> music = \relative {
>  \key e \minor
>  \time 2/4
>  b'8 16 c' 8 16 b'
> }
>
> \new Staff { \voices 1,3 << { \oneVoice \music } \\ { \shiftOff \upper } >> }
> %%%
>
>> And I’d like to understand why it does not work without the \\.
>> I thought that this was just a shorthand for \voiceOne and …Two
>
> No… << >> takes whatever’s inside and combines it into a single voice.

Not really.  << >> takes all items inside and interprets them in
parallel at the _current_ context level.  So with \new Staff << \upper
\music >>, the <<>> occurs at Staff level.  The first note event in
either sequence triggers the creation of a Voice context, but those
sequences trigger their own, separate Voices.

If we had \new Voice << ... >> your description would have been
correct.  Actually, I'd have used something like

\new Voice = "main" { \voices 1,"main" << \upper \\ \music >> }

myself here (that keeps \music in the main voice) but that's not really
sufficient since you'd want to switch off NoteColumn.ignore-collision
also.  So see my separate proposal.

-- 
David Kastrup



Re: Positioning of a tiny voice

2020-02-07 Thread David Kastrup
Noeck  writes:

> Hi,
>
> I would like to add small notes into an already populated staff.
> It is the right hand of a piano staff and I don’t want real voices with
> their shifts. The tiny font size distinguishes the "upper" voice
> already. It should have the least impact possible on the "music" voice.
>
> Here is one example measure:
>
>
> \version "2.19.84"
>
> upper = \relative {
>   \tiny
>   \stemUp
>   s4 b''
> }
>
> music = \relative {
>   \key e \minor
>   \time 2/4
>   b'8 16 c' 8 16 b'
> }
>
> \new Staff << \upper \music >>
>
>
> How to move the b'' exactly on top of the chord below?
> What to do about this warning?
>
> warning: this Voice needs a \voiceXx or \shiftXx setting
>   b'8 16 c' <
>  b, e g b>8 16 b'

You could try

\version "2.19.84"

upper = \relative {
  \tiny
  \stemUp
  s4 b''
}

music = \relative {
  \key e \minor
  \time 2/4
  b'8 16 c' 8 16 b'
}

\new Staff << \new Voice \with { \override NoteColumn.ignore-collision = ##t } \upper
	  \new Voice \music >>


-- 
David Kastrup


Re: Positioning of a tiny voice

2020-02-07 Thread Kieren MacMillan
Hi Joram,

> the following works for me:
> \new Staff <<
>  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>

Glad you found a solution!

> Why did you use \voices 1,2 in your example?

Bad coding… Here’s a better snippet (including your \oneVoice fix):

%%%
\version "2.19.83"

upper = \relative {
 \tiny
  s4 b''
}

music = \relative {
 \key e \minor
 \time 2/4
 b'8 16 c' 8 16 b'
}

\new Staff { \voices 1,3 << { \oneVoice \music } \\ { \shiftOff \upper } >> }
%%%

> And I’d like to understand why it does not work without the \\.
> I thought that this was just a shorthand for \voiceOne and …Two

No… << >> takes whatever’s inside and combines it into a single voice.

Hope that helps!
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




Re: Positioning of a tiny voice

2020-02-07 Thread Noeck
> Does this workaround/hack suit your needs?

Hi Kieren,

unfortunately not, because the "music" voice should behave like a
\oneVoice. But the following works for me:

\new Staff <<
  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>


Why did you use \voices 1,2 in your example?
And I’d like to understand why it does not work without the \\. I
thought that this was just a shorthand for \voiceOne and …Two
respectively. Thank you!

Best,
Joram



Re: Positioning of a tiny voice

2020-02-07 Thread Kieren MacMillan
Hi Joram,

> How to move the b'' exactly on top of the chord below?
> What to do about this warning?

Does this workaround/hack suit your needs?

%%%
\version "2.19.83"

upper = \relative {
 \tiny
 \stemUp
  s4 b''
}

music = \relative {
 \key e \minor
 \time 2/4
 b'8 16 c' 8 16 b'
}

\new Staff { \voices 1,2 << \music \\ { \voiceThree \shiftOff \upper } >> }
%%%

Hope it helps!
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




Positioning of a tiny voice

2020-02-07 Thread Noeck
Hi,

I would like to add small notes into an already populated staff.
It is the right hand of a piano staff and I don’t want real voices with
their shifts. The tiny font size distinguishes the "upper" voice
already. It should have the least impact possible on the "music" voice.

Here is one example measure:


\version "2.19.84"

upper = \relative {
  \tiny
  \stemUp
  s4 b''
}

music = \relative {
  \key e \minor
  \time 2/4
  b'8 16 c' 8 16 b'
}

\new Staff << \upper \music >>


How to move the b'' exactly on top of the chord below?
What to do about this warning?

warning: this Voice needs a \voiceXx or \shiftXx setting
  b'8 16 c' <
 b, e g b>8 16 b'


Cheers,
Joram



Re: Page numbers with text

2020-02-07 Thread Noeck
… and if you want this footer on every page, you can have it shorter:


  oddFooterMarkup = \markup \fill-line {
\line {
  \fromproperty #'page:page-number-string
  "–"
  \fromproperty #'header:title
}
  }

Best,
Joram



Re: Page numbers with text

2020-02-07 Thread Noeck
Dear Marco,

is this close to what you want?

%%
\version "2.19.84"

\paper {
  print-first-page-number = ##t
  oddHeaderMarkup = \markup \null
  evenHeaderMarkup = \markup \null
  oddFooterMarkup = \markup \fill-line {
\line {
  \on-the-fly \print-page-number-check-first
  \fromproperty #'page:page-number-string
  "–"
  \on-the-fly \print-page-number-check-first
  \fromproperty #'header:title
}
  }
  evenFooterMarkup = \oddFooterMarkup
}

\header {
  title = "First Title"
}

\score {
  \new Staff { a'1 \break g'1 \pageBreak f'1 }
}
%%

I am not sure why I need the \print-page-number-check-first and if the
\fill-line { \line { … } } is the cleanest solution. But I guess the
rest of it comes close.

Best,
Joram




Re: Page numbers with text

2020-02-07 Thread Kevin Barry
On Fri, Feb 07, 2020 at 09:06:19PM +0100, Marco Bagolin wrote:
> My knowledge of lilypond is not good enough...
> I tried to understand the examples in the guide of lilypond but the chapter
> is not clear enough for me.
> I am in difficult...

Hi Marco,

If you add the code below to your score, does that do what you want?

\paper {
  %print-first-page-number = ##t
  oddHeaderMarkup = ##f
  evenHeaderMarkup = ##f
  oddFooterMarkup = \markup {
  \on-the-fly \print-page-number-check-first \fromproperty 
#'page:page-number-string
  \on-the-fly \print-page-number-check-first "- My Song"
  }
  evenFooterMarkup = \oddFooterMarkup
}

(Uncomment the print-first-page-number line if you want the number on the first
page as well)

Kevin



Re: Page numbers with text

2020-02-07 Thread Marco Bagolin
My knowledge of lilypond is not good enough...
I tried to understand the examples in the guide of lilypond but the chapter
is not clear enough for me.
I am in difficult...

Please someone can help me? 

Thank you all

Il giorno ven 7 feb 2020 alle 07:11 Aaron Hill 
ha scritto:

> On 2020-02-06 10:02 pm, Marco Bagolin wrote:
> > Hello all,
> > I don’t know how to personalize the page numbers of a score.
> >
> > I would like to see at the left bottom of every score page the number
> > in
> > the following format:
> >
> > n - Title of score
> >
> > Example:
> > 1 - My Song
> > 2 - My song
> > ...
>
> You will need to set oddFooterMarkup [1].
>
> [1]:
>
> lilypond.org/doc/v2.19/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-headers-and-footers
>
>
>
> -- Aaron Hill
>
>


Re: can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

2020-02-07 Thread Thomas Morley
Am Fr., 7. Feb. 2020 um 14:46 Uhr schrieb Kieren MacMillan
:
>
> Hi all,
>
> Here’s the brainstorm I’ve currently got going:
>
> Issue #34, a.k.a. the grace note bug, is one of Lilypond’s longest-standing 
> and most newbie-unfriendly issues. It doesn’t appear in single-staff scores, 
> obviously — only in multi-staff scores where one staff has a grace note [in 
> the note code] and one or more other staves don’t.
>
> So…
>
> Can Someone™ write a Scheme engraver that listens for grace events and 
> automagically adds grace skips of equal duration at the same moment in all 
> other staves of a given score? *Intuitively*, \consist-ing that engraver into 
> a score sounds to me like the perfect (Band-Aid™?) solution, modulo what is 
> apparently a very difficult and/or time-consuming recoding of some deep 
> fundamentals in Lilypond’s timing codebase.
>
> Let me know if I’m just talking nonsense.
> If not, let me know how I can help make this "fix" a reality.
>
> Thanks,
> Kieren.
> 
>
> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
>
>

Hi Kieren,

although I did not try, I can't imagine an engraver could work.

Though, maybe checkout the link given here
https://sourceforge.net/p/testlilyissues/issues/34/?page=1=25#2eca

Cheers,
  Harm



Re: can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

2020-02-07 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
> Here’s the brainstorm I’ve currently got going:
>
> Issue #34, a.k.a. the grace note bug, is one of Lilypond’s
> longest-standing and most newbie-unfriendly issues. It doesn’t appear
> in single-staff scores, obviously — only in multi-staff scores where
> one staff has a grace note [in the note code] and one or more other
> staves don’t.
>
> So…
>
> Can Someone™ write a Scheme engraver that listens for grace events and
> automagically adds grace skips of equal duration at the same moment in
> all other staves of a given score? *Intuitively*, \consist-ing that
> engraver into a score sounds to me like the perfect (Band-Aid™?)
> solution, modulo what is apparently a very difficult and/or
> time-consuming recoding of some deep fundamentals in Lilypond’s timing
> codebase.
>
> Let me know if I’m just talking nonsense.
> If not, let me know how I can help make this "fix" a reality.

Well, the problem is that there is no "grace event" but a grace iterator.
Now this this characterization is not entirely true any more since

commit 99a85ca39f3a7a6f717ba06a48ef0ba70f842177
Author: David Kastrup 
Date:   Wed Oct 1 19:39:08 2014 +0200

Issue 630/4: Let Grace_engraver react mostly to GraceChange events

When GraceChange events are not available, this reverts to grace processing
at initialization or at the engraver's process_music call.

which is used for the fine-grained synchronisation required for having

\override ... \grace { \override ...

decide in which order to execute overrides that have different
consequences in the \grace construct in spite of being executed at the
same "musical time" as the overrides outside.  However, those
GraceChange events are not likely amenable for fixing issue 34, in
particular since the case alluded to in the commit message where they
are not yet operative is _exactly_ the issue 34 case.

Basically what I think is needed is the Sequential_iterator having a
means of conveying information about its grace_fixup structures to the
Simultaneous_iterator.  The various approaches I have experimented with
occasionally over the years have not worked for that, sometimes without
me able to understand why.

-- 
David Kastrup



can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

2020-02-07 Thread Kieren MacMillan
Hi all,

Here’s the brainstorm I’ve currently got going:

Issue #34, a.k.a. the grace note bug, is one of Lilypond’s longest-standing and 
most newbie-unfriendly issues. It doesn’t appear in single-staff scores, 
obviously — only in multi-staff scores where one staff has a grace note [in the 
note code] and one or more other staves don’t.

So…

Can Someone™ write a Scheme engraver that listens for grace events and 
automagically adds grace skips of equal duration at the same moment in all 
other staves of a given score? *Intuitively*, \consist-ing that engraver into a 
score sounds to me like the perfect (Band-Aid™?) solution, modulo what is 
apparently a very difficult and/or time-consuming recoding of some deep 
fundamentals in Lilypond’s timing codebase.

Let me know if I’m just talking nonsense.
If not, let me know how I can help make this "fix" a reality.

Thanks,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




Re: Typing error in the 2.19.84 documentation

2020-02-07 Thread David Kastrup
Bernhard Kleine  writes:

> I noted on the page
> http://lilypond.org/doc/v2.19/Documentation/notation/paper-size-and-automatic-scaling#index-Papierformat
>
>> \paper {
>>   #(set-paper-size "tabliod")
>> }
> Should that not be "tabloid"?
>

Fixed in master already.  Looks like I need to do one last scan of
recent cherry-pickable trivial material before releasing 2.20.

-- 
David Kastrup



Re: Spacing grobs with an invisible object between them (hack)

2020-02-07 Thread Paolo Prete
On Fri, Feb 7, 2020 at 4:28 AM Aaron Hill  wrote:



> I have applied this logic to your code and made some changes [1].
>
> [1]: http://lilybin.com/bt0t2d/11
>
>
That's great, Aaron!

Now we have a very robust method for *easy* spacing *complex* vertical
layouts.
I would not even consider this a "hack", because placing a barrier between
objects is something logical and natural
in many situations. And giving a position to the objects is something
logical and natural too, for complex layouts.
Now, it would be great if this fully works for SVG too.
As you can see, the OttavaBracket creates collisions in the SVG output when
an outside-staff-priority is assigned.
Then, this spacing method works fine for PDF output, but has a bug for the
SVG one.
A request has already be sent to the bug ML, but I suspect that the
development of the SVG layer is not active anymore.

https://lists.gnu.org/archive/html/bug-lilypond/2020-02/msg00015.html

Honestly, I don't know where to start investigating in the Lilypond src
(framework-svg.scm?  output-svg.scm?)

Thanks again for your patience!


Typing error in the 2.19.84 documentation

2020-02-07 Thread Bernhard Kleine
I noted on the page
http://lilypond.org/doc/v2.19/Documentation/notation/paper-size-and-automatic-scaling#index-Papierformat

> \paper {
>   #(set-paper-size "tabliod")
> }
Should that not be "tabloid"?

Kind regards

Bernhard

-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



signature.asc
Description: OpenPGP digital signature


Set up label in add-toc-item!

2020-02-07 Thread Robert Kubosz

Hello!

I have a question that bothers me. Can I put a label in a markup 
function/add-toc-item! ? I'll explain:
I have scores, that obviously use a \header {} block. I use a custom 
scoreTitleMarkup, that obviously manages each piece's title markup and 
also calls add-toc-item! that puts an item in toc-items list. I want the 
add-toc-item! to put the piece label also to the 'label-page-table, so 
there would be no need for an extra toplevel "\label 'someSymbol" command.


Below is a snippet that compiles, but it clearly does not work as I want 
it to do. I would be very grateful if somebody would help me with this 
or give proper guidance where to find a solution.



\version "2.19.83"

#(let ((toc-item-list (list)))
 (set! add-toc-item!
   (lambda (label markup-symbol text . rest)
       (set! toc-item-list
         (cons (append! (list label markup-symbol text) rest)
           toc-item-list))
    (make-music 'EventChord
   'page-marker #t
   'page-label label
   'elements (list (make-music 'LabelEvent
   'page-label label)
 (set! toc-items (lambda ()

         (reverse toc-item-list


#(define-markup-command (mymarkupfunction layout props) ()

 (let ((title (chain-assoc-get 'header:piece props))
   ;; (label (gensym "piece"))
   (label 'piece1 ))
     (display (toc-items))
     (display "<-should be empty \n")
     (add-toc-item! label 'tocPieceMarkup title "123") ;;"123" is a 
piece number, take it here as placeholder

     (display (toc-items))
     (display "<-one toc item \n")
     (let ((table (ly:output-def-lookup layout 'label-page-table)))
         (display table)
         (display "<-here should be at least one item, but isn't!\n"))
     (interpret-markup layout props (markup title


\paper {
    scoreTitleMarkup = \markup \mymarkupfunction
}


\score {
    \header {
        piece = "foo"
    }
    {c' c' c' c'}
}

\markup { There should be a working page reference \page-ref #'piece1 
"0" "?" }