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


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: resetting accidentals at word breaks

2020-04-16 Thread Benjamin Bloomfield
Thanks.  I did figure it out, and it ended up being a pretty simple change.
accidental-styles.chant-cautionary =
#`(#t
  (Staff ,(make-accidental-rule 'same-octave 0))
  (Staff ,(make-accidental-rule 'same-octave #t)))

Now I am trying to figure out how to draw the first accidental within a
melisma at the beginning of the group of notes rather than immediately
before the note it modifies.  I'd be interested if anyone has any ideas
where to start on that.  I will consult the documentation and see what I
can come up with.

Thanks,

*Benjamin Bloomfield*

On Wed, Apr 15, 2020 at 10:02 AM Lukas-Fabian Moser  wrote:

> Hi Benjamin,
>
> Now I need to figure out automatically adding cautionary accidentals the
> first time the pitch appears after the accidental has been reset.  I've
> been having trouble finding documentation on defining new accidental
> Styles, but I will continue looking a bit before turning to the forum for
> more help.
>
> I didn't search the archives for a ready-made solution, but I just want to
> point you to the (reasonably well-documented) place where the standard
> accidentalStyles are defined: They are all in scm/music-functions.scm.
>
> In particular, you could look at the definition of the modern style and
> tweak its "laziness", since in the definition of make-accidental-rule, we
> read:
>
> @var{laziness} states over how many bars an accidental should be
> remembered.
> @code{0}@tie{}is the default -- accidental lasts over 0@tie{}bar lines,
> that
> is, to the end of current measure.  A positive integer means that the
> accidental lasts over that many bar lines.  @w{@code{-1}} is `forget
> immediately', that is, only look at key signature.  @code{#t} is
> `forever'."
>
> Maybe this is not compatible with your wish to enforce repetition of
> accidentals after a (invisible) bar line. But since everything is written
> in Scheme, one should be able to hook into check-pitch-against-signature if
> push comes to shove.
>
> Best
> Lukas
>


Re: resetting accidentals at word breaks

2020-04-15 Thread Benjamin Bloomfield
Thanks, this works beautifully, and insertBar also solves a problem that I
had of needing to put empty bars in between syllables to allow line breaks
there, which I had previously been solving by preprocessing the lyrics to
add \bar "" in between all the lyric syllables.

Thanks so much!

Now I need to figure out automatically adding cautionary accidentals the
first time the pitch appears after the accidental has been reset.  I've
been having trouble finding documentation on defining new accidental
Styles, but I will continue looking a bit before turning to the forum for
more help.

*Benjamin Bloomfield*

On Tue, Apr 14, 2020 at 3:02 PM Aaron Hill  wrote:

> On 2020-04-14 9:14 am, Benjamin Bloomfield wrote:
> > However, I am still trying to figure out how engravers and contexts
> > work to
> > be able to know exactly what's going on.
> >
> > Thanks for any help or ideas,
>
> Here is my take that works from events not grobs, plus it allows
> flexibility in what you want to do between words:
>
> 
> \version "2.20.0"
>
> modifyContextPropertyWhereDefined =
> #(define-scheme-function
>(prop value-or-proc) (symbol? scheme?)
>(lambda (context)
>  (ly:context-set-property!
>(ly:context-property-where-defined context prop)
>prop
>(if (procedure? value-or-proc)
>  (value-or-proc (ly:context-property context prop))
>  value-or-proc
>
> incrementBarNumber =
>\modifyContextPropertyWhereDefined
>internalBarNumber #1+
>
> insertBar =
>\modifyContextPropertyWhereDefined
>whichBar \etc
>
> betweenLyrics = #(define-scheme-function
>(proc) (procedure?)
>(lambda (context)
>  (let ((first-lyric? #t) (hyphen? #f))
>(make-engraver
>  (listeners
>((hyphen-event engraver event) (set! hyphen? #t))
>((lyric-event engraver event)
> (if first-lyric?
>   (set! first-lyric? #f)
>   (if (not hyphen?) (proc context)))
> (set! hyphen? #f)))
>
> doBoth = #(define-scheme-function
>(proc1 proc2) (procedure? procedure?)
>(lambda args (apply proc1 args) (apply proc2 args)))
>
> repetitions = #3
> notes = \repeat unfold \repetitions {
>fis'4 4 4 4 4 4 4( 4) 4( 4 4) 4 4 }
> words = \repeat unfold \repetitions \lyricmode {
>a b -- b c -- c -- c d e -- e f }
>
> << \new Staff { \cadenzaOn \new Voice = melody \notes }
> \new Lyrics \with {
>  \consists \betweenLyrics \incrementBarNumber
> } \lyricsto melody \words >>
>
> << \new Staff { \cadenzaOn \new Voice = melody \notes }
> \new Lyrics \with {
>  \consists \betweenLyrics \insertBar "'"
> } \lyricsto melody \words >>
>
> << \new Staff { \cadenzaOn \new Voice = melody \notes }
> \new Lyrics \with {
>  \consists \betweenLyrics \doBoth \insertBar "" \incrementBarNumber
> } \lyricsto melody \words >>
> 
>
>
> -- Aaron Hill


resetting accidentals at word breaks

2020-04-14 Thread Benjamin Bloomfield
Hi,

I am trying to get accidentals to be reset at every word break in a section
of music without meter; I found some code to advance the internalBarNumber,
in order to force the accidentals to be reset:

> resetAccidentals = \applyContext
> #(lambda (x)
>   (begin
>  (ly:context-set-property!
>   (ly:context-property-where-defined x 'internalBarNumber)
>   'internalBarNumber
>   (1+ (ly:context-property x 'internalBarNumber)))
>  ))
>
After this definition, putting in a \resetAccidentals in between words is
working correctly causing the accidentals to get reset.  However, I wanted
something more automatic, but I am not sure exactly how to go about it.  I
remembered an engraver I had seen that collected lyric words by looking at
lyric-hyphen-interface grobs and checking for LyricSpace ones, so I tried
to write something to advance the internalBarNumber whenever a LyricSpace
is encountered, but it isn't working reliably.

This is what I had:

> resetAccidentalsAtNewWordsEngraver =
> #(lambda (context)
>(let ((new-word #f)) ; signal to end word and begin another
>  (make-engraver
>
>   (acknowledgers
>((lyric-hyphen-interface engraver grob source-engraver)
> (let* ((props (ly:grob-basic-properties grob))
>(meta (assoc-get 'meta props))
>(text-items (ly:grob-object grob 'text-items))
>(name (assoc-get 'name meta)))
>   ; reset accidentals by incrementing bar number at every
> LyricSpace
>   (if (eq? name 'LyricSpace) (ly:context-set-property!
> (ly:context-property-where-defined context
> 'internalBarNumber)
> 'internalBarNumber
> (1+ (ly:context-property context
> 'internalBarNumber)
>   
>
>   )


However, I am still trying to figure out how engravers and contexts work to
be able to know exactly what's going on.

Thanks for any help or ideas,

*Benjamin Bloomfield*


Horizontal placement of first LyricText on a system

2020-04-06 Thread Benjamin Bloomfield
I'm having an issue with the first lyric syllable of a line colliding with
the shortVocalName, which I've set to be engraved to the right of the
system start (by using \override InstrumentName.direction = #RIGHT) and I
can't find in the manual how to configure how far to the left the first
lyric syllable is allowed to go, or what the best way would be to prevent
these collisions between the LyricText and the InstrumentName.

Does anyone have any ideas?

Thanks,

*Benjamin Bloomfield*


stanza numbers at the beginning of every system

2020-03-10 Thread Benjamin Bloomfield
I just read through this old thread from 2013
<http://lilypond.1069038.n5.nabble.com/Repeating-stanza-numbers-td56233.html>
about
repeating stanza numbers at the beginning of every system, because there
isn't much more I've been able to find about doing this.  The scheme
engraver given in that thread has some problems with it, and I would like
the stanza numbers lined up more like StanzaNumber than InstrumentName so
there is that problem with using \set shortVocalName.

However, this thread was from 2013, so I am wondering whether anyone knows
of a better way to have stanza numbers repeated at the beginning of each
system.

Help is greatly appreciated.

Thanks,

*Benjamin Bloomfield*


Centering a slur/tie over a syllable

2020-03-04 Thread Benjamin Bloomfield
I am trying to figure out a way to change the way centering a slur or tied
note above a syllable so that if the noteheads all fit within the width of
the syllable that they would be centered above it, and otherwise left
aligned.

I have changed the centering behavior before by putting
\override LyricText #'X-offset = #center-on-word
inside a Lyrics context, and defining center-on-word in scheme so that it
would measure the width of the syllable without any surrounding
punctuation.  However, for what I'm asking about right now, I will need to
also know the location of the final notehead attached to the syllable.  I
don't think there should be any cases of this, but if the final notehead
for the current syllable is on a different system, I would only want to
consider the last notehead on the current system.

Here is what I had for center-on-word:
#(define (center-on-word grob)
  (let* (
  (text (ly:grob-property-data grob 'text))
  (syllable (if (string? text) text ""))
  (word-position (if (integer? (string-skip syllable space-set))
(string-skip syllable space-set) 0))
  (word-end (if (integer? (string-skip-right syllable space-set)) (+
(string-skip-right syllable space-set) 1) (string-length syllable)))
  (preword (substring syllable 0 word-position))
  (word (substring syllable word-position word-end ))
  (preword-width (if (string? text) (width grob preword) 0))
  (word-width (if (string? text) (width grob word) (width grob text)))
  (notehead (ly:grob-parent grob X))
  (refp (ly:grob-common-refpoint notehead grob X))
  (note-extent (ly:grob-extent notehead refp X))
  (note-width (- (cdr note-extent) (car note-extent)))
)
(if (= -1 (ly:grob-property-data grob 'self-alignment-X))
  (- 0 preword-width)
  (- (/ (- note-width word-width) 2) preword-width)
)
  )
)

Any help is greatly appreciated.

Thanks,

*Benjamin Bloomfield*


Re: Removing lyric hyphens

2019-07-29 Thread Benjamin Bloomfield
This is actually perfect.  I already have a script eliminating all but the
first semibreve in a series, so this is exactly what I was looking for.

Thanks so much!

*Benjamin Bloomfield*

On Thu, Jul 25, 2019 at 3:41 AM Alexander Kobel  wrote:

> Hi Benjamin,
>
> the closest we have available to eliminate spurious space between
> syllables is described in the thread culminating in
>
>   https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00389.html
>
> (I'm not the author of the snippet, just the bearer of the full include
> file in this thread. All credits to David, Mike, and Harm.)
>
> Just \include this file, and add
>
> \context {
>   \Lyrics
>   \override LyricWord.after-line-breaking = #(lyric-word-compressor 0.5)
>   \override LyricHyphen #'minimum-distance = #0
>   \override LyricHyphen #'minimum-length = #0
> }
>
> to your layout block (or use the equivalent locally inside the lyrics,
> where necessary).
>
> Alas, I'm afraid it generally won't give pleasant results for the type
> of chant you have in your example (look at "bestower" and "power"):
> There, the text widths dominate the note widths by quite a bit, and what
> you (most likely) actually want is a "seemless" spacing of the lyrics
> and note heads that are centered over the corresponding syllables.
>
> AFAICS this is unsupported for the time being, as Lily tries to space
> out the note heads fairly according to rhythmical concerns, while
> acknowledging lyric widths as constraints; you'd need the other way around.
>
>
> However, that's just the technical state-of-the-art, as far as I am
> aware. From a more practical perspective, and independent of typesetting
> difficulty, I'd prefer to see only *one* breve note head for repetitions
> on the same note in chants, rather than one per syllable (and texts
> left-aligned to those breves); see
>
>
>
> http://lilypond.org/doc/v2.19/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#transcribing-gregorian-chant
>
> Perhaps this is the actual solution to your problem.
>
> And if you insist on automatic linebreaking, try to ... Okay, I see now
> that I wanted to suggest exactly what you described in your second mail.
> Maybe the above solution works after all, in your full context. Good luck!
>
>
> HTH,
> Alex
>
>
> On 25.07.19 04:27, Vaughan McAlley wrote:
> > On Thu, 25 Jul 2019 at 09:29, Benjamin Bloomfield  > <mailto:bhb...@gmail.com>> wrote:
> >
> > No, I should have explained that I have further things going on in
> > my full source code that remove the semibreves unless they are the
> > first one or the first in the system, and the hyphenations are given
> > so that a reasonable point can be chosen for the system breaks even
> > if it's in the middle of a word.  I have everything working nicely
> > except for the slight bit of extra space between syllables.
> >
> > Sorry I forgot to mention why I have the hyphenation points marked,
> > because you're right, the solution you give is the obvious one if I
> > didn't need those hyphenation points for the possible line breaks.
> >
> > Thanks,
> >
> > /Benjamin Bloomfield/
> >
> > On Wed, Jul 24, 2019 at 6:02 PM Brian Barker
> > mailto:b.m.bar...@btinternet.com>>
> wrote:
> >
> > At 15:54 24/07/2019 -0400, you wrote:
> > >I've been trying to totally get rid of the space
> > >where a lyric hyphen might go, in cases where
> > >that space is already very small, but I have not
> > >been able to figure it out. Is there a way to
> > >get rid of these spaces instead of having them
> > >still present as empty space?  I want the
> > >syllables to be as close to each other as if they were a single
> > syllable.
> >
> > If you don't want the space, don't put it in! If
> > you want "Holy", enter "Holy", not "Ho -- ly". If
> > you then want that word to fit one note, use "Holy_". Thus:
> > Draw near, Lord, Holy_ Father,_ almighty__ and e -- ter -- nal
> God,
> > with
> > a'8 c1 c c c c c c \divisioMinima b8 a b \divisioMaior
> >
> > But isn't the way such music is usually set with
> > a single semibreve for all the syllables that are chanted to it?
> > Draw "near, Lord, Holy Father, almighty and e" -- ter -- nal God,
> >

Re: Removing lyric hyphens

2019-07-24 Thread Benjamin Bloomfield
No, I should have explained that I have further things going on in my full
source code that remove the semibreves unless they are the first one or the
first in the system, and the hyphenations are given so that a reasonable
point can be chosen for the system breaks even if it's in the middle of a
word.  I have everything working nicely except for the slight bit of extra
space between syllables.

Sorry I forgot to mention why I have the hyphenation points marked, because
you're right, the solution you give is the obvious one if I didn't need
those hyphenation points for the possible line breaks.

Thanks,

*Benjamin Bloomfield*

On Wed, Jul 24, 2019 at 6:02 PM Brian Barker 
wrote:

> At 15:54 24/07/2019 -0400, you wrote:
> >I've been trying to totally get rid of the space
> >where a lyric hyphen might go, in cases where
> >that space is already very small, but I have not
> >been able to figure it out. Is there a way to
> >get rid of these spaces instead of having them
> >still present as empty space?  I want the
> >syllables to be as close to each other as if they were a single syllable.
>
> If you don't want the space, don't put it in! If
> you want "Holy", enter "Holy", not "Ho -- ly". If
> you then want that word to fit one note, use "Holy_". Thus:
> Draw near, Lord, Holy_ Father,_ almighty__ and e -- ter -- nal God,
> with
> a'8 c1 c c c c c c \divisioMinima b8 a b \divisioMaior
>
> But isn't the way such music is usually set with
> a single semibreve for all the syllables that are chanted to it?
> Draw "near, Lord, Holy Father, almighty and e" -- ter -- nal God,
> a'8 c1 \divisioMinima b8 a b \divisioMaior
>
> Now all you probably have to do is to move the
> semibreve back to over the word "near," ...
>
> I trust this helps.
>
> Brian Barker - privately
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Removing lyric hyphens

2019-07-24 Thread Benjamin Bloomfield
I've been trying to totally get rid of the space where a lyric hyphen might
go, in cases where that space is already very small, but I have not been
able to figure it out.

I have noticed that if I add the lines

> \override LyricHyphen.minimum-length = #0

\override LyricHyphen.padding = #0

in the Lyrics context, then the spacing between the lyrics stays the same,
but it is more clear where the spaces are that I don't want because they
show as just little black dots.

Is there a way to get rid of these spaces instead of having them still
present as empty space?  I want the syllables to be as close to each other
as if they were a single syllable.

Thanks,

*Benjamin Bloomfield*

Here is (a shortened version of) my code:

\include "gregorian.ly"

  antiphonText = \lyricmode {
Draw near, Lord, Ho -- ly Fa -- ther,
al -- might -- y and e -- ter -- nal God,
au -- thor of hu -- man dig -- ni -- ty and be -- stow -- er of all grac --
es,
through whom all things pro -- gress,
through whom eve -- ry -- thing is made firm,
who, by the pow -- er of the Ho -- ly Spir -- it,
in or -- der to form a priest -- ly peo -- ple,
es -- tab -- lish a -- mong them min -- is -- ters of Christ your Son in
var -- i -- ous or -- ders.

  }


  aSop = \transpose c c {
\relative c' {
  \cadenzaOn
a'8 \bar"" c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar"" c
\bar"" \divisioMinima
c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar"" b8 \bar"" a
\bar"" b \bar"" \divisioMaior
a8 \bar"" c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar"" c
\bar"" c \bar"" c \bar"" c \bar"" c \bar"" c \bar"" b8 \bar"" a \bar"" b
\bar"" b \bar"" \divisioMaior
a8 \bar"" c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar""
\divisioMinima
c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar"" b8 \bar"" a
\bar"" b \bar"" \divisioMaior
a8 \bar"" c\breve*1/1024 \bar"" c \bar"" c \bar"" c \bar"" c \bar"" c
\bar"" b8 \bar"" a \bar"" b \bar"" b \bar"" \divisioMaior
b\breve*1/1024 \bar"" b \bar"" b \bar"" b \bar"" b \bar"" b \bar"" a8
\bar"" b \bar"" c \bar"" b \bar"" \divisioMinima \break
b\breve*1/1024 \bar"" b \bar"" b \bar"" b \bar"" b \bar"" b \bar"" b \bar""
b \bar"" b \bar"" b \bar"" b \bar"" b \bar"" b \bar"" b \bar"" g8 \bar"" a
\bar"" b \bar"" a \bar"" a \bar"" \divisioMaxima
  \cadenzaOff
}
  }


\score {
  <<
\new Staff
<<
  \clef "treble"
  \new Voice = "sop" { \voiceOne \aSop }
>>
\new Lyrics \lyricsto sop \antiphonText
  >>
  \layout {
\context { \Lyrics
  \override LyricText #'font-family = #'normal
  \override LyricHyphen #'minimum-distance = #0
%  \override LyricHyphen #'minimum-length = #0.3



 \override LyricHyphen #'minimum-length = #0
 \override LyricHyphen #'padding = #0
}
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Left align first note of every system with its lyric

2018-02-09 Thread Benjamin Bloomfield
I've been trying to figure out a way to force left-alignment
(LyricText.self-alignment-X = -1) on just the lyrics associated with the
first notes of every system, but I haven't been able to get it working.
What I was trying was overriding LyricText.after-line-breaking with a
callback function to set self-alignment-X if it came immediately after a
line break.

However, this isn't working.  Does anyone have some idea of a way to
achieve this?

Thanks,

*Benjamin Bloomfield*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Scheme Help

2017-11-13 Thread Benjamin Bloomfield
Thanks, this looks very helpful.  Yes, I want any note at line-begin to be
visible, but if the note is a breve and not at line-begin I want to check
whether there is a breath mark immediately before it, or whether the note
immediately before it is not a breve, in which case the current breve needs
to be visible.

I think this may be enough for me to go on though.

Thanks very much,

*Benjamin Bloomfield*

On Sun, Nov 12, 2017 at 2:37 PM, Thomas Morley 
wrote:

> 2017-11-11 17:11 GMT+01:00 Benjamin Bloomfield :
> > I am trying to write a scheme to achieve the functionality I was asking
> > about in my earlier message.  I think that I could do it with a simple
> > callback function on the NoteHead.transparent property and make the
> notehead
> > transparent if it is a breve that is preceded by another breve and not
> the
> > first note in its system.
> >
> > It's easy enough to determine whether the NoteHead is a breve in scheme,
> but
> > how do I determine whether it's the first of its system, and how do I
> > reference the NoteHead that comes immediately before it (if any) to
> > determine whether that is also a breve?
> >
> > Thanks!
> >
> > Benjamin Bloomfield
>
> Wouldn't you want any note at line-begin to be visible? So why check
> what's the preceding?
>
> For the other stuff you may find some procedures helpful, which David
> Nalesnik had coded:
>
> %% Thanks to David Nalesnik
> #(define (at-line-end? grob)
>(let* ((col (ly:item-get-column grob))
>   (ln (ly:grob-object col 'right-neighbor))
>   (col-to-check (if (ly:grob? ln) ln col)))
>  (and (eq? #t (ly:grob-property col-to-check 'non-musical))
>   (= -1 (ly:item-break-dir col-to-check)
>
> #(define (at-line-beginning? grob)
>(let* ((col (ly:item-get-column grob))
>   (ln (ly:grob-object col 'left-neighbor))
>   (col-to-check (if (ly:grob? ln) ln col)))
>  (and (eq? #t (ly:grob-property col-to-check 'non-musical))
>   (= 1 (ly:item-break-dir col-to-check)
>
>
> {
>   \override NoteHead.after-line-breaking =
> #(lambda (grob)
>   (ly:grob-set-property! grob 'color
> (cond ((at-line-end? grob) cyan)
>   ((at-line-beginning? grob) red)
>   (else '()
>   \repeat unfold 150 c'1
> }
>
> HTH,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Scheme Help

2017-11-11 Thread Benjamin Bloomfield
I am trying to write a scheme to achieve the functionality I was asking
about in my earlier message
<https://lists.gnu.org/archive/html/lilypond-user/2017-11/msg00147.html>.
I think that I could do it with a simple callback function on the
NoteHead.transparent property and make the notehead transparent if it is a
breve that is preceded by another breve and not the first note in its
system.

It's easy enough to determine whether the NoteHead is a breve in scheme,
but how do I determine whether it's the first of its system, and how do I
reference the NoteHead that comes immediately before it (if any) to
determine whether that is also a breve?

Thanks!

*Benjamin Bloomfield*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: reciting text over line breaks

2017-11-10 Thread Benjamin Bloomfield
Yes, but I want to allow line breaks in the middle of those breves if it
makes sense for line breaks to occur there.  This is actually the way I had
been doing it, but it is a tedious process of trial and error to figure out
that, e.g., the line should break after "and" in "always and everywhere",
and I'd really like to find a way to make this automatic.

Thanks,

*Benjamin Bloomfield*

On Fri, Nov 10, 2017 at 3:17 AM, Michael Gerdau  wrote:

> Hi Benjamin,
>
> assuming you have your music in a varible called e.g. \music you simply
> put your verses like shown below and combine them as with any other
> score. That should give you the desired result.
>
> verse = \lyricmode {
>   It \once \override LyricText.self-alignment-X = #LEFT "is truly right
> and just,"
>   \once \override LyricText.self-alignment-X = #LEFT "our duty and"
>   our sal -- va -- tion,
>   a -- \once \override LyricText.self-alignment-X = #LEFT "ways and"
>   \once \override LyricText.self-alignment-X = #LEFT "everywhere to"
>   give you thanks,
>   Lord, \once \override LyricText.self-alignment-X = #LEFT "holy Father,
> almighty and e" -- ver -- last -- ing
> }
>
> HTH,
> Michael
> --
>  Michael Gerdau   email: m...@qata.de
>  GPG-keys available on request or at public keyserver
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


reciting text over line breaks

2017-11-09 Thread Benjamin Bloomfield
Dear forum, I am trying to figure out the best way to typeset something
similar to the attached image (if the image doesn't work, it is of the
fourth and fifth systems in this PDF
<http://www.icelweb.org/musicfolder/openpdf.php?file=74ChurchBrideTempleD.pdf>).
Basically, the breves indicate a reciting tone, and may be paired with a
rather long text, which may not all fit on the rest of the line, in which
case whatever *will* fit on the line should be placed on that line, and
then a second breve will need to begin the next system, with the rest of
the lyrics.
[image: Inline image 1]

What is the best way to achieve this in Lilypond?  From this page in the
documentation
<http://lilypond.org/doc/v2.18/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#transcribing-gregorian-chant>,
I am using \hide NoteHead to hide the noteheads that should not display,
but is there a way to determine if one of these syllables gets placed as
the first on a new system, and in that case to unhide its notehead?

Thanks so much for any suggestions,

*Benjamin Bloomfield*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: reciting text over line breaks

2017-11-09 Thread Benjamin Bloomfield
Also, I am having difficulty preventing hyphens in the lyrics when using
\hide NoteHead to hide the noteheads after the breves.  Is there a way to
force these lyrics to not use hyphens?

Thanks,

*Benjamin Bloomfield*

On Thu, Nov 9, 2017 at 7:44 PM, Benjamin Bloomfield 
wrote:

> Dear forum, I am trying to figure out the best way to typeset something
> similar to the attached image (if the image doesn't work, it is of the
> fourth and fifth systems in this PDF
> <http://www.icelweb.org/musicfolder/openpdf.php?file=74ChurchBrideTempleD.pdf>).
> Basically, the breves indicate a reciting tone, and may be paired with a
> rather long text, which may not all fit on the rest of the line, in which
> case whatever *will* fit on the line should be placed on that line, and
> then a second breve will need to begin the next system, with the rest of
> the lyrics.
> [image: Inline image 1]
>
> What is the best way to achieve this in Lilypond?  From this page in the
> documentation
> <http://lilypond.org/doc/v2.18/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#transcribing-gregorian-chant>,
> I am using \hide NoteHead to hide the noteheads that should not display,
> but is there a way to determine if one of these syllables gets placed as
> the first on a new system, and in that case to unhide its notehead?
>
> Thanks so much for any suggestions,
>
> *Benjamin Bloomfield*
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: setting ragged-right at a specific forced break

2017-08-11 Thread Benjamin Bloomfield
Perhaps I will have to.  The reason I haven't done it yet, is because this
is part of a bigger project, in which only some verses of some hymns are
laid out this way, and the lyrics and melodies are all pulled from a
database, so it is convenient for the different options within hymns to be
as small as possible.  Perhaps using multiple scores will be the only way
to do it though.

Thanks,

*Benjamin Bloomfield*

On Fri, Aug 11, 2017 at 1:32 PM, Malte Meyn  wrote:

>
>
> Am 11.08.2017 um 18:23 schrieb Benjamin Bloomfield:
>
>> ​So if there is some way of adding as much empty space as will fit on a
>> line before a break, that could work too.  What I basically want is for
>> systems that end with an automatic line break to be justified, but for
>> those that end with my manually specified \break​ to be ragged-right.
>>
>>
> Why don’t you use separate scores?
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


setting ragged-right at a specific forced break

2017-08-11 Thread Benjamin Bloomfield
Hi,

I'm trying to figure out a way so that when I force a line break using
\break, I can have the line that breaks there act as though ragged-right
were set in the layout block.

For a better understanding, I will explain *why*: I am putting line breaks
so that each new verse of a hymn starts on a new system, but I don't want
the last system of each verse stretched out so much.  This is somewhat more
common perhaps in Gregorian chant, and I am using this override so that the
last system's staff extends to the right side of the page, even though
ragged-last is on:

> \override StaffSymbol #'width = #(lambda (grob)
>
> (ly:output-def-lookup (ly:grob-layout grob) 'line-width))
>
>
​So if there is some way of adding as much empty space as will fit on a
line before a break, that could work too.  What I basically want is for
systems that end with an automatic line break to be justified, but for
those that end with my manually specified \break​ to be ragged-right.

Thanks in advance for any advice,

*Benjamin Bloomfield*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: chord names

2017-02-11 Thread Benjamin Bloomfield
Thank you so much; these both work wonderfully.

*Benjamin Bloomfield*

On Fri, Feb 10, 2017 at 7:04 PM, Klaus Blum  wrote:

> Benjamin Bloomfield wrote
> > I'm trying to figure out how to tweak the size of the sharp and flat
> > symbol that displays when the chord name has one in it.  Those symbols
> are
> > slightly taller than the capitals in my font, and I'd like to get them
> > even.
>
> Maybe there's an easier way, but here's a first solution. It's a quick
> modification of
> http://www.lilypondforum.de/index.php?topic=824.0
>
> %
> 
> --
> #(define (note-name->international-markup pitch lowercase?)
>(let* (
>(name (ly:pitch-notename pitch))
>(alt (ly:pitch-alteration pitch))
>(hspace (vector-ref #(0.15 0.15 0.05 0.05 0.15) (+ (* alt 2)
> 2)))
>(raise (vector-ref #(0.6 0.6 0.65 0.8 0.7) (+ (* alt 2) 2)))
>)
>
>  (if (>= alt 0)
>  (make-line-markup
>   (list
>(make-simple-markup
> (if lowercase?
> (vector-ref #("c" "d" "e" "f" "g" "a" "b") name)
> (vector-ref #("C" "D" "E" "F" "G" "A" "B") name)
> )
> )
>(if (= alt 0)
>;; If it's natural and not b, do nothing
>(make-line-markup (list empty-markup))
>;; Else add alteration
>(make-line-markup
> (list
>  (make-hspace-markup hspace)
>  (make-tiny-markup (make-raise-markup raise;
> make-tiny-markup instead of make-smaller-markup
> (make-musicglyph-markup
>  (assoc-get alt
> standard-alteration-glyph-name-alist ""
>  ))
>)))
>  (make-line-markup
>   (list
>(make-simple-markup
> (if lowercase?
> (vector-ref #("c" "d" "e" "f" "g" "a" "b") name)
> (vector-ref #("C" "D" "E" "F" "G" "A" "B") name)
> )
> )
>(if (= alt 0)
>;; If it's natural and not b, do nothing
>(make-line-markup (list empty-markup))
>;; Else add alteration
>(make-line-markup
> (list
>  (make-hspace-markup hspace)
>  (make-tiny-markup (make-raise-markup raise;
> make-tiny-markup instead of make-smaller-markup
> (make-musicglyph-markup
>  (assoc-get alt
> standard-alteration-glyph-name-alist ""
>  ))
>)))
>  )
>  )
>)
>
> internationalChords = {
>   \set Staff.chordRootNamer = #note-name->international-markup
>   % \unset Staff.chordNoteNamer
> }
>
> \new ChordNames \chordmode {
>   as a ais bes b bis
>   \internationalChords
>   as a ais bes b bis
> }
> %
> 
> --
>
> Cheers,
> Klaus
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.
> nabble.com/chord-names-tp199985p10.html
> Sent from the User mailing list archive at Nabble.com.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


chord names

2017-02-10 Thread Benjamin Bloomfield
I'm trying to figure out how to make chord modifiers like "sus4" not be
superscript.  It seems like there should be a simple way to do that, but I
don't see it in the "Customizing Chord Names"

section of the manual.

Also, I'm trying to figure out how to tweak the size of the sharp and flat
symbol that displays when the chord name has one in it.  Those symbols are
slightly taller than the capitals in my font, and I'd like to get them even.

Thanks,

*Ben*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: accidentalStyle

2017-02-02 Thread Benjamin Bloomfield
OK, thanks.  Can you think of any way of automatically setting the measures
based on the lyrics?  How difficult would this be?

Thanks again,

*Benjamin Bloomfield*

On Thu, Feb 2, 2017 at 1:09 PM, Simon Albrecht 
wrote:

> On 02.02.2017 18:59, Benjamin Bloomfield wrote:
>
>> Is there any way to set automatic accidentals to be remembered until the
>> end of the current word (in the same way that the default is to remember
>> them until the end of the current measure)?  This is the custom in
>> Gregorian chant written on a four line staff, and I'd like to be able to do
>> it this way for Gregorian melodies written in modern notation as well.
>>
>
> Technically, it’s not impossible, I guess – almost everything is possible
> in LilyPond :-) –, but it would be very complicated, since it would involve
> a custom engraver.
> So your best bet is to actually use bars and hide the bar lines (and time
> signatures).
>
> HTH, Simon
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


accidentalStyle

2017-02-02 Thread Benjamin Bloomfield
Is there any way to set automatic accidentals to be remembered until the
end of the current word (in the same way that the default is to remember
them until the end of the current measure)?  This is the custom in
Gregorian chant written on a four line staff, and I'd like to be able to do
it this way for Gregorian melodies written in modern notation as well.

None of the different accidentalStyles listed in the manual here
<http://lilypond.org/doc/v2.18/Documentation/notation/displaying-pitches#automatic-accidentals>
seem
to cover this situation, and it's not clear to me how I might achieve this.

Thanks in advance for any help!

*Benjamin Bloomfield*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-20 Thread Benjamin Bloomfield
Yes, with multiple verses the version comparing all LyricText grobs didn't
work, but the original one David had posted comparing the NoteColumns did
work.

I need to get the lines to always be in the same place now horizontally, in
case there are two in the same NoteColumn.  If anyone wants to tackle that,
such that the horizontal line it adds below the syllable will be relative
to the horizontal position of the note, rather than of the syllable, I
would be grateful, but I suspect I will be able to get it eventually
myself, I simply constantly refer to the documentation.

It may also be that the fellow I am working with wants the first syllables
all to line up on the left, with only the longest centered beneath the
note, as in the forum thread that Kieren had referenced earlier.  If this
is the case, the markup code works as is, and it is the X-offsets of the
syllables themselves that will need to change, so I will have to find that
out before I start playing more around with this code.

Again, thanks very much.

*Benjamin Bloomfield*


On Thu, Sep 19, 2013 at 9:00 PM, Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Thomas,
>
> > At least it seems to work.
>
> +1 from here!
>
> Thanks,
> Kieren.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-19 Thread Benjamin Bloomfield
Excellent, Thank you so much!  This works wonderfully.

*Benjamin Bloomfield*


On Thu, Sep 19, 2013 at 12:12 PM, David Nalesnik
wrote:

>
>
>
> On Thu, Sep 19, 2013 at 11:01 AM, David Nalesnik  > wrote:
>
>> Hi Benjamin,
>>
>>
> [...]
>
>
>> This is what I come up with:
>>
>
> [...]
>
> OK, that was unnecessarily roundabout.  Why bother with columns when I
> have access to all grobs, and I can just compare LyricText grobs?
>
> Try this:
>
> (Again, should work on 2.16.1.)
>
> 
>
> \version "2.17.25"
>
> #(define (my-callback grob)
>(let* ((text (ly:grob-property-data grob 'text))
>   (refp (ly:grob-system grob))
>   ; This returns all grobs in a line.
>   (all-grobs (ly:grob-array->list
>   (ly:grob-object refp 'all-elements)))
>   ; We're only interested in LyricText grobs.
>   (just-syllables
> (filter
>   (lambda (x) (grob::has-interface x
> 'lyric-syllable-interface))
>   all-grobs))
>   ; We want the first LyricText grob in the system.  We must
> locate this
>   ; by position, since grobs don't seem to be listed in order in
> the
>   ; 'all-elements grob array.
>   (first-syl
>  (fold
>(lambda (elem prev)
>  (if (< (ly:grob-relative-coordinate elem refp X)
> (ly:grob-relative-coordinate prev refp X))
>  elem
>  prev))
>   (car just-syllables)
>   just-syllables)))
>
>  ; If our LyricText grob is the first on the line, override its
> stencil.
>  (if (eq? grob first-syl)
>  (begin
>(ly:grob-set-property! grob 'text
>  #{ \markup \combine #text \translate #'(1.6 . -0.5)
> \draw-line #'(-4 . 0) #})
>(ly:grob-set-property! grob 'stencil (lyric-text::print
> grob))
>
> melody = \repeat unfold 16 g'4
> lyr = \lyricmode {
>   \repeat unfold 16 sol
> }
> \score {
>   \new Staff <<
> \new Voice = "voice" {
>   \melody
> }
> \new Lyrics \with {
>   \override LyricText #'after-line-breaking = #my-callback
> } \lyricsto "voice" \lyr
>   >>
> }
> \paper {
>   indent = 0
>   line-width = 5.5\cm
> }
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-19 Thread Benjamin Bloomfield
I'm still struggling to figure out how to override the markup of the first
syllable in each system.  I have figured out a callback that can add the
underscore to the syllable, but I need to figure out how to know if the
syllable is the first in its system.  Does anyone know how to do this?

Here's what I have adding the horizontal line to every syllable:

\version "2.16.1"
> #(define (my-callback grob)
>   (let* (
>   (text (ly:grob-property-data grob 'text))
> )
>   (display text) (display "\n")
> ;(ly:grob-set-property! grob 'self-alignment-X '-1)
> ; (ly:grob-set-property! grob 'extra-offset '(-4 . 0))
>  (ly:grob-set-property! grob 'text #{ \markup \combine #text
> \translate #'(1.6 . -0.5) \draw-line #'(-4 . 0) #})
>  (ly:grob-set-property! grob 'stencil (lyric-text::print grob))
>   )
> )
> melody = \repeat unfold 16 g'4
> lyr = \lyricmode {
> \repeat unfold 16 sol
> }
> \score {
> \new Staff <<
> \new Voice = "voice" {
> \melody
> }
> \new Lyrics \with {
> \override LyricText #'after-line-breaking =
> #my-callback
> } \lyricsto "voice" \lyr
> >>
> }
> \paper {
> indent = 0
> line-width = 5.5\cm
> }


Thanks,

*Benjamin Bloomfield*


On Wed, Sep 18, 2013 at 1:22 PM, Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Benjamin,
>
> > I think this is perfect, except that it only appears at the beginning of
> the first system.  Is there any way to get Lilypond to add the same markup
> to the first syllable of each subsequent system?
>
> I'm sure there is!  =)
>
> Maybe something in this thread can help you:
> http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00688.html
>
> Best,
> Kieren.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-18 Thread Benjamin Bloomfield
I think this is perfect, except that it only appears at the beginning of
the first system.  Is there any way to get Lilypond to add the same markup
to the first syllable of each subsequent system?

Thanks again,

*Benjamin Bloomfield*


On Wed, Sep 18, 2013 at 12:19 PM, Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Benjamin,
>
> > My apologies.  I am working with someone else on this, and I thought
> that was what he wanted, but after he saw this, it became clear that what
> he actually wanted was for these lines to only be visible at the beginning
> of each system, just above/below the first word or so.  You can see his
> example image here.
> >
> > Does anyone have any insights or ideas into how I might accomplish this?
>
> That's much easier:
>
> \version "2.16.2"
>
> someMusic = \repeat "unfold" 100 c'4
>
> verseI = \lyricmode {
>   \set stanza = "1."
>   \repeat "unfold" 100 a
> }
>
> verseII = \lyricmode {
>   \set stanza = \markup \combine "2." \translate #'(1.6 . -0.5) \draw-line
> #'(-4 . 0)
>   \repeat "unfold" 100 b
> }
>
> verseIII = \lyricmode {
>   \set stanza = "3."
>   \repeat "unfold" 100 b
> }
>
> \score {
>   <<
> \new Staff \someMusic
> \new Lyrics \verseI
> \new Lyrics \verseII
> \new Lyrics \verseIII
>   >>
> }
>
> Hope this helps!
> Kieren.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-18 Thread Benjamin Bloomfield
My apologies.  I am working with someone else on this, and I *thought* that
was what he wanted, but after he saw this, it became clear that what he
actually wanted was for these lines to only be visible at the beginning of
each system, just above/below the first word or so.  You can see his
example image 
here<https://illuminare-gregoriophp.googlecode.com/issues/attachment?aid=350001&name=2013-09-18+08.11.22.jpg&token=WMczYzAYipcjN2GbddOjiraFDC8%3A1379519013025&inline=1>
.

Does anyone have any insights or ideas into how I might accomplish this?

Thanks,

*Benjamin Bloomfield*


On Tue, Sep 17, 2013 at 11:45 AM, Benjamin Bloomfield wrote:

> Thanks, I think I should be able to make this work.
>
> *Benjamin Bloomfield*
>
>
> On Tue, Sep 17, 2013 at 11:29 AM, Kieren MacMillan <
> kieren_macmil...@sympatico.ca> wrote:
>
>> Hi Benjamin,
>>
>> > Is there a way to put a horizontal line between two stanzas?  I have
>> searched
>> > around on the web, and haven't found anything.  Does anyone know of a
>> way to
>> > do this?
>>
>> There are probably many ways, but here's something I thought of:
>>
>> \version "2.16.2"
>>
>> someMusic = \repeat "unfold" 100 c'4
>>
>> verseI = \lyricmode {
>>   \repeat "unfold" 100 a
>> }
>>
>> verseII = \lyricmode {
>>   \repeat "unfold" 100 b
>> }
>>
>> \layout {
>>   \context {
>> \RhythmicStaff
>> \name "Line"
>> \remove "Bar_engraver"
>> \remove "Time_signature_engraver"
>>   }
>>   \context {
>> \Score
>> \accepts Line
>> \remove "System_start_delimiter_engraver"
>>   }
>> }
>>
>> \score {
>>   <<
>> \new Staff \someMusic
>> \new Lyrics \verseI
>> \new Line \repeat "unfold" 100 s4
>> \new Lyrics \verseII
>>   >>
>> }
>>
>> You'll have to tweak some of the properties of the Line context in order
>> to get it to behave "perfectly".
>>
>> Hope this helps!
>> Kieren.
>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lyric separator

2013-09-17 Thread Benjamin Bloomfield
Thanks, I think I should be able to make this work.

*Benjamin Bloomfield*


On Tue, Sep 17, 2013 at 11:29 AM, Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Benjamin,
>
> > Is there a way to put a horizontal line between two stanzas?  I have
> searched
> > around on the web, and haven't found anything.  Does anyone know of a
> way to
> > do this?
>
> There are probably many ways, but here's something I thought of:
>
> \version "2.16.2"
>
> someMusic = \repeat "unfold" 100 c'4
>
> verseI = \lyricmode {
>   \repeat "unfold" 100 a
> }
>
> verseII = \lyricmode {
>   \repeat "unfold" 100 b
> }
>
> \layout {
>   \context {
> \RhythmicStaff
> \name "Line"
> \remove "Bar_engraver"
> \remove "Time_signature_engraver"
>   }
>   \context {
> \Score
> \accepts Line
> \remove "System_start_delimiter_engraver"
>   }
> }
>
> \score {
>   <<
> \new Staff \someMusic
> \new Lyrics \verseI
> \new Line \repeat "unfold" 100 s4
> \new Lyrics \verseII
>   >>
> }
>
> You'll have to tweak some of the properties of the Line context in order
> to get it to behave "perfectly".
>
> Hope this helps!
> Kieren.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Lyric separator

2013-09-17 Thread Benjamin Bloomfield
Is there a way to put a horizontal line between two stanzas?  I have searched 
around on the web, and haven't found anything.  Does anyone know of a way to 
do this?


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Old style numerals for page numbers

2012-03-13 Thread Benjamin Bloomfield
I am trying to figure out how I can get Old Style numerals to be used for the 
page numbers.  I found some scheme code here (http://www.mrlauer.org/music/) 
that defines a markup command oldStyleNum that will replace any digit with the 
unicode string for the appropriate old style numeral.  However, I don't know 
how 
to make this work with the page number, because when I try to put 
\oldStyleNum\fromproperty #'page:page-number-string the oldStyleNum command 
isn't getting the numeric string to process, but something else, and I don't 
really know scheme at all, and haven't been able to figure this out after 
looking at it for a few hours, and I thought someone else might know.

What follows is sample code that shows old style numerals in the title and 
(unfortunately) regular numerals for the page number.

Thanks,

Ben
-
\version "2.14.2"
% Michael's utilities
%% UTF-8 utilities
#(define (utf-8->list str)
(define (numBytes leader)
(cond ((< leader #x80) 1)
  ((< leader #xc0) (begin (stderr "programming-error: bad utf-
8:~x\n" leader) 1))
  ((< leader #xe0) 2)
  ((< leader #xf0) 3)
  ((< leader #xf8) 4)
  (else (begin (stderr "programming-error: utf-8 too big:~x\n" 
leader) 1
 (define (helper start l n)
 (if (= n 0) start
 (helper (+ (* start #x40) (modulo (car l) #x40)) (cdr l) (- n 
1
 (define (utf-8->int l)
  (let* ((leader (car l))
 (n (- (numBytes leader) 1))
 (fac (/ #x80 (expt 2 n)))
 (rest (cdr l))
 (result (helper (modulo leader fac) rest n)))
result))
 (define (toListHelper lst chars)
 (if (null? lst) (reverse chars)
 (let* ((c (utf-8->int lst))
(n (numBytes (car lst)))
(t (list-tail lst n))
(newC (cons c chars)))
(toListHelper t newC
(toListHelper (map char->integer (string->list str)) '() ))

%These are appropriate for Junicode, and other fonts.  Override as necessary
oldStyleZeroCode = ##xF730
smallCapsACode = ##xF761

%For Linux Libertine
oldStyleZeroCodeLL = ##xE01A
smallCapsACodeLL = ##xE051

#(define (change-char-helper aa test? offset)
(if (string? aa)
(let* ((chars (utf-8->list aa))
   (tosc (map (lambda (c)
   (if (and (<= c 127) (test? (integer->char c)))
   (ly:wide-char->utf-8 (+ c offset))
   (if (and (<= c 255) (>= c 224))
   (ly:wide-char->utf-8 (+ c offset))
   (if (= c #x0153)
   (ly:wide-char->utf-8 #xF6FA)
   (ly:wide-char->utf-8 c) ) ) ) )
   chars))
(newStr (apply string-append tosc)))
 newStr)
 aa)
)

#(define (to-old-style str) (change-char-helper str char-numeric?
(- oldStyleZeroCode (char->integer #\0

#(define (to-small-caps str) (change-char-helper str char-lower-case?
(- smallCapsACode (char->integer #\a

#(define-markup-command (realCaps layout props str) (markup?)
"Real small capitals"
(interpret-markup layout props (to-small-caps str)))

#(define-markup-command (oldStyleNum layout props str) (markup?)
"Old-style numerals"
(interpret-markup layout props (to-old-style str)))

#(define-markup-command (smallCapsOldStyle layout props str) (markup?)
"Real small caps and old-style numerals"
(interpret-markup layout props (to-old-style (to-small-caps str

%%%
#(define-public (bar-number-print grob)
  "Print function for making oldStyle numbers.  Useful for BarNumber, for 
example"
  (let*
  ((text (ly:grob-property grob 'text))
   (layout (ly:grob-layout grob))
   (defs (ly:output-def-lookup layout 'text-font-defaults))
   (props (ly:grob-alist-chain grob defs)))

(ly:text-interface::interpret-markup layout
 props
 (if (string? text)
 (markup #:oldStyleNum text)
 text
\header {
  title = \markup{\oldStyleNum"1234567890" "1234567890"}
}
\paper {
  two-sided = ##t
  print-first-page-number = ##t
  oddHeaderMarkup = \markup\fill-line{
 \combine 
\fill-line{"" \on-the-fly #print-page-number-check-first
\oldStyleNum\fromproperty #'page:page-number-string
}
""
  }
  evenHeaderMarkup = \markup {
 \combine
\on-the-fly #print-page-number-check-first
\oldSt

Old style numerals for page numbers

2012-03-13 Thread Benjamin Bloomfield
I tried sending this earlier, but didn't receive it myself, so I am
trying again.

I am trying to figure out how I can get Old Style numerals to be used
for the page numbers.  I found some lilypond scheme code here
(http://www.mrlauer.org/music/) that defines a markup command
oldStyleNum that will replace any digit with the unicode string for
the appropriate old style numeral.  However, I don't know how to make
this work with the page number, because when I try to put
\oldStyleNum\fromproperty #'page:page-number-string the oldStyleNum
command isn't getting the numeric string to process, but something
else, and I don't really know scheme at all, and haven't been able to
figure this out after looking at it for a few hours, and I thought
maybe someone else would know or have some idea of how this might be
done.

What follows is sample code that shows old style numerals in the title
and (unfortunately) regular numerals for the page number.

Thanks,

Benjamin Bloomfield
-
\version "2.14.2"
% Michael's utilities
%% UTF-8 utilities
#(define (utf-8->list str)
(define (numBytes leader)
(cond ((< leader #x80) 1)
  ((< leader #xc0) (begin (stderr "programming-error:
bad utf-8:~x\n" leader) 1))
  ((< leader #xe0) 2)
  ((< leader #xf0) 3)
  ((< leader #xf8) 4)
  (else (begin (stderr "programming-error: utf-8 too
big:~x\n" leader) 1
 (define (helper start l n)
 (if (= n 0) start
 (helper (+ (* start #x40) (modulo (car l) #x40)) (cdr
l) (- n 1
 (define (utf-8->int l)
  (let* ((leader (car l))
 (n (- (numBytes leader) 1))
 (fac (/ #x80 (expt 2 n)))
 (rest (cdr l))
 (result (helper (modulo leader fac) rest n)))
result))
 (define (toListHelper lst chars)
 (if (null? lst) (reverse chars)
 (let* ((c (utf-8->int lst))
(n (numBytes (car lst)))
(t (list-tail lst n))
(newC (cons c chars)))
(toListHelper t newC
(toListHelper (map char->integer (string->list str)) '() ))

%These are appropriate for Junicode, and other fonts.  Override as necessary
oldStyleZeroCode = ##xF730
smallCapsACode = ##xF761

%For Linux Libertine
oldStyleZeroCodeLL = ##xE01A
smallCapsACodeLL = ##xE051

#(define (change-char-helper aa test? offset)
(if (string? aa)
(let* ((chars (utf-8->list aa))
   (tosc (map (lambda (c)
   (if (and (<= c 127) (test? (integer->char c)))
   (ly:wide-char->utf-8 (+ c offset))
   (if (and (<= c 255) (>= c 224))
   (ly:wide-char->utf-8 (+ c offset))
   (if (= c #x0153)
   (ly:wide-char->utf-8 #xF6FA)
   (ly:wide-char->utf-8 c) ) ) ) )
   chars))
(newStr (apply string-append tosc)))
 newStr)
 aa)
)

#(define (to-old-style str) (change-char-helper str char-numeric?
(- oldStyleZeroCode (char->integer #\0

#(define (to-small-caps str) (change-char-helper str char-lower-case?
(- smallCapsACode (char->integer #\a

#(define-markup-command (realCaps layout props str) (markup?)
"Real small capitals"
(interpret-markup layout props (to-small-caps str)))

#(define-markup-command (oldStyleNum layout props str) (markup?)
"Old-style numerals"
(interpret-markup layout props (to-old-style str)))

#(define-markup-command (smallCapsOldStyle layout props str) (markup?)
"Real small caps and old-style numerals"
(interpret-markup layout props (to-old-style (to-small-caps str

%%%
#(define-public (bar-number-print grob)
  "Print function for making oldStyle numbers.  Useful for BarNumber,
for example"
  (let*
  ((text (ly:grob-property grob 'text))
   (layout (ly:grob-layout grob))
   (defs (ly:output-def-lookup layout 'text-font-defaults))
   (props (ly:grob-alist-chain grob defs)))

(ly:text-interface::interpret-markup layout
 props
 (if (string? text)
 (markup #:oldStyleNum text)
 text
\header {
  title = \markup{\oldStyleNum"1234567890" "1234567890"}
}
\paper {
  two-sided = ##t
  prin