Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Noeck
I should have said that you need to adjust this value to your needs.

>     \override InstrumentName.X-offset = -1

You can move the InstrumentName to the left (-) and to the right (+).
Instrument names are right aligned with the left staff edge by default.
You can change that using either X-offset, padding or extra-offset.

<<
  \new Staff \with { shortInstrumentName = "staff" } { a1 \break b }
  \new Lyrics \with { shortInstrumentName = "lyr" } \lyricmode { a1 b }
>>

Cheers,
Joram



Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Benjamin Bloomfield
Sometimes I need to use this with lyrics centered between two staves, and I
don't want
[image: image.png]
this to happen.

Thanks,

*Benjamin Bloomfield*

On Mon, Apr 20, 2020 at 11:43 AM Noeck  wrote:

> I think I’ve seen solutions for that problem on this list or in the
> snippets. Perhaps someone has a link.
>
> But how about his?
>
> \version "2.20.0"
>
> \score {
>   <<
> \new Staff \new Voice = "sop" {
>   \clef "treble"
>   c'4 \bar "" \break c'
> }
> \new Lyrics  \lyricsto sop {
>   \lyricmode {
> \set stanza = "2. "
> \set shortVocalName = "2. "
> Should Should
>   }
> }
>   >>
> }
>
> \layout {
>   \context {
> \Lyrics
> \override InstrumentName.direction = #RIGHT
> \override InstrumentName.X-offset = -1
> \override InstrumentName.font-series = #'bold
>   }
> }
>
>


!test.ly
Description: Binary data


Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Benjamin Bloomfield
Multiple stanzas work with shortVocalName:

\version "2.20.0"
\score {
  <<
\new Staff
<<
  \clef "treble"
  \new Voice = "sop" { c'4 \bar "" \break c' }
>>

{
<<
  \new Lyrics  \lyricsto sop { \lyricmode {
\set stanza = "1. "
\set shortVocalName = "1. "
Should Should
  }}









*\new Lyrics  \lyricsto sop { \lyricmode {\set stanza = "2. "\set
shortVocalName = "2. "Strange Strange  }}  \new Lyrics  \lyricsto sop {
\lyricmode {\set stanza = "3. "\set shortVocalName = "3. "Wrong
Wrong  }}*
>>
}

  >>
}
\layout {
  \context { \Lyrics
\override InstrumentName.direction = #RIGHT
\override InstrumentName.padding = #1.5

  }
}

Thanks,

*Benjamin Bloomfield*

On Mon, Apr 20, 2020 at 12:02 PM Michael Gerdau  wrote:

> For short pieces I’ll see where Lilypond breaks and insert accordingly. Or
> I tell Lilypond where to break.
>
> Besides:
> What do you do when there are more stanzas?
>
> Just curious,
> Michael
>
> Mobil gesendet
>
> Am 20.04.2020 um 17:16 schrieb Benjamin Bloomfield :
>
> 
> Thanks for the suggestion.  I would do that if I knew where the system
> breaks were going to occur ahead of time.  I put the line break in the
> example code just to simplify it and demonstrate the problem with very
> little code.
>
> *Benjamin Bloomfield*
>
> On Mon, Apr 20, 2020 at 10:23 AM Michael Gerdau  wrote:
>
>> Why don’t you insert another \set stanza = "2." In front of the second
>> "Should" ?
>>
>> Kind regards
>> Michael
>>
>> Mobil gesendet
>>
>> Am 20.04.2020 um 16:14 schrieb Benjamin Bloomfield :
>>
>> 
>> I've been using shortVocalName to engrave stanza numbers at the
>> beginnings of systems, but I'm running into trouble with occasional
>> collisions with the first LyricText:
>> 
>>
>> Here is my lilypond code:
>> \version "2.20.0"
>> \score {
>>   <<
>> \new Staff
>> <<
>>   \clef "treble"
>>   \new Voice = "sop" { c'4 \bar "" \break c' }
>> >>
>>
>> {
>> <<
>>   \new Lyrics  \lyricsto sop { \lyricmode {
>> \set stanza = "2. "
>> \set shortVocalName = "2. "
>> Should Should
>>   }}
>> >>
>> }
>>
>>   >>
>> }
>> \layout {
>>   \context { \Lyrics
>> \override InstrumentName.direction = #RIGHT
>> \override InstrumentName.padding = #1.5
>>   }
>> }
>>
>> I'm not sure how to go about automatically avoiding these collisions, but
>> it seems like there should be a relatively simple way to do so.  Does
>> anyone have any ideas?
>>
>> Thanks,
>>
>> *Benjamin Bloomfield*
>> 
>>
>>


!test.ly
Description: Binary data


Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Michael Gerdau
For short pieces I’ll see where Lilypond breaks and insert accordingly. Or I 
tell Lilypond where to break.

Besides:
What do you do when there are more stanzas?

Just curious,
Michael 

Mobil gesendet

> Am 20.04.2020 um 17:16 schrieb Benjamin Bloomfield :
> 
> 
> Thanks for the suggestion.  I would do that if I knew where the system breaks 
> were going to occur ahead of time.  I put the line break in the example code 
> just to simplify it and demonstrate the problem with very little code.
> 
> Benjamin Bloomfield
> 
>> On Mon, Apr 20, 2020 at 10:23 AM Michael Gerdau  wrote:
>> Why don’t you insert another \set stanza = "2." In front of the second 
>> "Should" ?
>> 
>> Kind regards 
>> Michael 
>> 
>> Mobil gesendet
>> 
 Am 20.04.2020 um 16:14 schrieb Benjamin Bloomfield :
 
>>> 
>>> I've been using shortVocalName to engrave stanza numbers at the beginnings 
>>> of systems, but I'm running into trouble with occasional collisions with 
>>> the first LyricText:
>>> 
>>> 
>>> Here is my lilypond code:
>>> \version "2.20.0"
>>> \score {
>>>   <<
>>> \new Staff
>>> <<
>>>   \clef "treble"
>>>   \new Voice = "sop" { c'4 \bar "" \break c' }
>>> >>
>>> 
>>> {
>>> <<
>>>   \new Lyrics  \lyricsto sop { \lyricmode {
>>> \set stanza = "2. "
>>> \set shortVocalName = "2. "
>>> Should Should
>>>   }}
>>> >>
>>> }
>>> 
>>>   >>
>>> }
>>> \layout {
>>>   \context { \Lyrics
>>> \override InstrumentName.direction = #RIGHT
>>> \override InstrumentName.padding = #1.5
>>>   }
>>> }
>>> 
>>> I'm not sure how to go about automatically avoiding these collisions, but 
>>> it seems like there should be a relatively simple way to do so.  Does 
>>> anyone have any ideas?
>>> 
>>> Thanks,
>>> 
>>> Benjamin Bloomfield
>>> 


Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Noeck
I think I’ve seen solutions for that problem on this list or in the
snippets. Perhaps someone has a link.

But how about his?

\version "2.20.0"

\score {
  <<
\new Staff \new Voice = "sop" {
  \clef "treble"
  c'4 \bar "" \break c'
}
\new Lyrics  \lyricsto sop {
  \lyricmode {
\set stanza = "2. "
\set shortVocalName = "2. "
Should Should
  }
}
  >>
}

\layout {
  \context {
\Lyrics
\override InstrumentName.direction = #RIGHT
\override InstrumentName.X-offset = -1
\override InstrumentName.font-series = #'bold
  }
}



Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Benjamin Bloomfield
Thanks for the suggestion.  I would do that if I knew where the system
breaks were going to occur ahead of time.  I put the line break in the
example code just to simplify it and demonstrate the problem with very
little code.

*Benjamin Bloomfield*

On Mon, Apr 20, 2020 at 10:23 AM Michael Gerdau  wrote:

> Why don’t you insert another \set stanza = "2." In front of the second
> "Should" ?
>
> Kind regards
> Michael
>
> Mobil gesendet
>
> Am 20.04.2020 um 16:14 schrieb Benjamin Bloomfield :
>
> 
> I've been using shortVocalName to engrave stanza numbers at the beginnings
> of systems, but I'm running into trouble with occasional collisions with
> the first LyricText:
> 
>
> Here is my lilypond code:
> \version "2.20.0"
> \score {
>   <<
> \new Staff
> <<
>   \clef "treble"
>   \new Voice = "sop" { c'4 \bar "" \break c' }
> >>
>
> {
> <<
>   \new Lyrics  \lyricsto sop { \lyricmode {
> \set stanza = "2. "
> \set shortVocalName = "2. "
> Should Should
>   }}
> >>
> }
>
>   >>
> }
> \layout {
>   \context { \Lyrics
> \override InstrumentName.direction = #RIGHT
> \override InstrumentName.padding = #1.5
>   }
> }
>
> I'm not sure how to go about automatically avoiding these collisions, but
> it seems like there should be a relatively simple way to do so.  Does
> anyone have any ideas?
>
> Thanks,
>
> *Benjamin Bloomfield*
> 
>
>


Re: Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Michael Gerdau
Why don’t you insert another \set stanza = "2." In front of the second "Should" 
?

Kind regards 
Michael 

Mobil gesendet

> Am 20.04.2020 um 16:14 schrieb Benjamin Bloomfield :
> 
> 
> I've been using shortVocalName to engrave stanza numbers at the beginnings of 
> systems, but I'm running into trouble with occasional collisions with the 
> first LyricText:
> 
> 
> Here is my lilypond code:
> \version "2.20.0"
> \score {
>   <<
> \new Staff
> <<
>   \clef "treble"
>   \new Voice = "sop" { c'4 \bar "" \break c' }
> >>
> 
> {
> <<
>   \new Lyrics  \lyricsto sop { \lyricmode {
> \set stanza = "2. "
> \set shortVocalName = "2. "
> Should Should
>   }}
> >>
> }
> 
>   >>
> }
> \layout {
>   \context { \Lyrics
> \override InstrumentName.direction = #RIGHT
> \override InstrumentName.padding = #1.5
>   }
> }
> 
> I'm not sure how to go about automatically avoiding these collisions, but it 
> seems like there should be a relatively simple way to do so.  Does anyone 
> have any ideas?
> 
> Thanks,
> 
> Benjamin Bloomfield
> 


Using shortVocalName for stanza numbers on every system

2020-04-20 Thread Benjamin Bloomfield
I've been using shortVocalName to engrave stanza numbers at the beginnings
of systems, but I'm running into trouble with occasional collisions with
the first LyricText:
[image: image.png]
Here is my lilypond code:
\version "2.20.0"
\score {
  <<
\new Staff
<<
  \clef "treble"
  \new Voice = "sop" { c'4 \bar "" \break c' }
>>

{
<<
  \new Lyrics  \lyricsto sop { \lyricmode {
\set stanza = "2. "
\set shortVocalName = "2. "
Should Should
  }}
>>
}

  >>
}
\layout {
  \context { \Lyrics
\override InstrumentName.direction = #RIGHT
\override InstrumentName.padding = #1.5
  }
}

I'm not sure how to go about automatically avoiding these collisions, but
it seems like there should be a relatively simple way to do so.  Does
anyone have any ideas?

Thanks,

*Benjamin Bloomfield*


!test.ly
Description: Binary data


Re: Missing link: Rhythms

2020-04-20 Thread Thomas Morley
Am Mo., 20. Apr. 2020 um 13:44 Uhr schrieb Thomas Morley
:
>
> Am Mo., 20. Apr. 2020 um 13:16 Uhr schrieb Bernhard Kleine
> :
> >
> > When in
> > http://lilypond.org/doc/v2.19/Documentation/notation/bars#bar-lines I
> > engage the link "Schnipsel":Rhythms it is not found:
> >
> > http://lilypond.org/doc/v2.19/Documentation/snippets/rhythmus.
>
>
> The german doc points to
> http://lilypond.org/doc/v2.20/Documentation/snippets/rhythmus
>
> català
> http://lilypond.org/doc/v2.20/Documentation/snippets/duracions
>
> french:
> http://lilypond.org/doc/v2.20/Documentation/snippets/rythme
>
> italian
> http://lilypond.org/doc/v2.20/Documentation/snippets/ritmi
>
> 日本語
> http://lilypond.org/doc/v2.20/Documentation/snippets/_30ea_30ba_30e0#g_t_30ea_30ba_30e0
>
>
> None of them exist.
> This happens at least since 2.14.2
>
>
> The english and español docs points correctly to
> http://lilypond.org/doc/v2.20/Documentation/snippets/rhythms

Nope, español is wrong as well, only english is correct

>
> Some automated translation-script went wrong?
>
>
> Cheers,
>   Harm



Re: Missing link: Rhythms

2020-04-20 Thread Thomas Morley
Am Mo., 20. Apr. 2020 um 13:16 Uhr schrieb Bernhard Kleine
:
>
> When in
> http://lilypond.org/doc/v2.19/Documentation/notation/bars#bar-lines I
> engage the link "Schnipsel":Rhythms it is not found:
>
> http://lilypond.org/doc/v2.19/Documentation/snippets/rhythmus.


The german doc points to
http://lilypond.org/doc/v2.20/Documentation/snippets/rhythmus

català
http://lilypond.org/doc/v2.20/Documentation/snippets/duracions

french:
http://lilypond.org/doc/v2.20/Documentation/snippets/rythme

italian
http://lilypond.org/doc/v2.20/Documentation/snippets/ritmi

日本語
http://lilypond.org/doc/v2.20/Documentation/snippets/_30ea_30ba_30e0#g_t_30ea_30ba_30e0


None of them exist.
This happens at least since 2.14.2


The english and español docs points correctly to
http://lilypond.org/doc/v2.20/Documentation/snippets/rhythms


Some automated translation-script went wrong?


Cheers,
  Harm



Missing link: Rhythms

2020-04-20 Thread Bernhard Kleine
When in
http://lilypond.org/doc/v2.19/Documentation/notation/bars#bar-lines I
engage the link "Schnipsel":Rhythms it is not found:

http://lilypond.org/doc/v2.19/Documentation/snippets/rhythmus.

-- 
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


Re: Alignment issues of Time signature above the staff

2020-04-20 Thread Chen Leo
Hi Kevin,

I will have to thank you again for all the help, this now works perfectly in my 
score!

One more minor suggestion will be to add
\override TimeSignature.break-align-symbol = #'staff-bar
in the context of the dynamics, this removes the extra spaces between the 
cautionary time signature at the end of the line.

Please consider uploading this to the lilypond snippet repository as this 
solves a lot of problems for the original version.
( http://lsr.di.unimi.it/LSR/Item?id=272 )

Best,
Leo


Re: Alignment issues of Time signature above the staff

2020-04-20 Thread Kevin Barry
Hi Chen,

1. I was able to mostly solve this - you can now click on the time
signatures (but it doesn't seem to work for all of them - I don't know
why).
2. This should work now
3. This is done using callbacks (it's a hacky solution that brings
back the time signature stencil for just that purpose since that is
the only time we want it to occupy space throughout the score)
4. This might be doable in the engraver, but I'm not sure how (without
making it hard to change), so I implemented it as a callback (that
means combining callbacks if you both want to center over the barline
and create extra space for the time signature at the end of a line - I
have hopefully explained this in the comments so it's clear how to set
it up the way you might want)

File is attached.

Kevin

On Mon, 20 Apr 2020 at 05:08, Leo Chen  wrote:
>
> Hi Kevin,
>
> Thank you so much for all the effort you've put into this!
> I think this has already become useable but I still have a few suggestions:
>
> 1. Due to the nature of text scripts, they can't be clicked on and directed 
> to the code in Frescobaldi, this may make debugging the score a bit more 
> difficult, but it won't affect the outcome once the score is finished, so it 
> shouldn't be a big problem.
>
> 2. Compound time signatures are now automatically formatted into normal time 
> signatures (see attachment) I think this can be fixed relatively easily by 
> reformatting the markup.
>
> 3. It would be great if extra space can be arranged for the time signature 
> before the line break instead of aligning it to the left side of the last bar.
>
> 4. This is not a personal request, however, some people may prefer aligning 
> the time signature to the centre instead of the right side of the barline 
> like the example in the original snippet. 
> http://lsr.di.unimi.it/LSR/Snippet?id=272 I wonder how hard this can be 
> implemented into this custom engraver.
>
> Overall, I think this is a massive improvement from the last version and I 
> greatly appreciate your help.
>
> Best,
> Leo
\version "2.19.0"

#(define (Time_signature_markup_engraver context)
   (let ((time-sig '())
 (time-sig-copy #f)
 (previous-was-grace #f)) ; to avoid printing twice at grace notes
 (make-engraver
  (acknowledgers
   ((time-signature-interface engraver grob source-engraver)
(let* ((current-moment (ly:context-current-moment context))
   (grace-nom (ly:moment-grace-numerator current-moment)))
  (if (not (eqv? 0 grace-nom))
  (begin
   (set! previous-was-grace #t)
   (set! time-sig grob))
  (if (and (eqv? 0 grace-nom) previous-was-grace)
  (begin
   (set! previous-was-grace #f)
   (set! time-sig '()))
  (set! time-sig grob))
  ((process-acknowledged engraver)
   (and (not (null? time-sig))
(let* ((time-sig-copy (ly:engraver-make-grob
   engraver
   'TextScript
   time-sig))
   (copy-prop (lambda (prop)
(ly:grob-set-property!
 time-sig-copy
 prop
 (ly:grob-property time-sig prop
   (timing-context (ly:context-find context 'Timing))
   (timing-time-sig
(ly:context-grob-definition timing-context 'TimeSignature))
   (timing-time-sig-stencil
(ly:assoc-get 'stencil timing-time-sig '()))
   (prop-list '(fraction style font-size cause)))
  (map copy-prop prop-list)
  (ly:grob-set-property! time-sig-copy 'stencil
timing-time-sig-stencil)
  (ly:grob-set-parent! time-sig-copy Y time-sig)
  (ly:grob-set-parent! time-sig-copy X time-sig)
  (set! time-sig '())
  )))
  ((stop-translation-timestep engraver)
   (set! time-sig-copy #f)

#(define (remove-except-at-line-end grob)
   (if (not (equal? (ly:item-break-dir grob) LEFT))
   (ly:grob-set-property! grob 'stencil #f)))

#(define (remove-at-end grob)
   (if (equal? (ly:item-break-dir grob) LEFT)
   (ly:grob-set-property! grob 'stencil #f)))

#(define (center-over-barline grob)
   (if (equal? (ly:item-break-dir grob) 0)
   (let* ((x-extent (ly:grob-property grob 'X-extent))
  (width (interval-length x-extent)))
 (ly:grob-set-property! grob 'X-offset (* -1 (/ width 2))

#(define (center-over-barline-and-remove-at-end grob)
   (begin
(remove-at-end grob)
(center-over-barline grob))) 

#(define (left-align-at-end grob)
   (and (and (ly:item? grob)
 (equal? (ly:item-break-dir grob) LEFT))
(ly:grob-set-property! grob 'self-alignment-X 1)))

timeSignatures = {
  \tempo 4 = 80