Minimal horizontal space for melismata

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimal horizontal space for melismata

Peter Crighton
Hello all,

I am working on a type of sheet that should only display lyrics and chord symbols. It utilises a voice in a RhythmicStaff, that I’m hiding, to lay out the chords and lyrics accordingly. Voice, lyrics, and chords are all inside of variables that I am also using to create other types of sheets, so directly changing them is not an option as other things depend on them.
I want the lyrics to be absolutely free of melismatic hyphens. How can I make sure of that? I have ensured that the note heads take as little space as they can (to my knowledge), but if it is either a short syllable and/or a long melisma, the note heads still take up too much space, so hyphens appear. See example below.
One solution I could think of would be to write a Scheme function that automatically aggregates all the note lengths of a melisma and returns a single note with the combined length instead. But writing that is way over my current Scheme head.
Anybody able to help me out or with another idea?

Side question: Is there a shorter/nicer way to hide/omit all those things in the RhythmicStaff?

Another side question: Although I omitted the beams, they (or something connected to them) still seem to occupy space. Change the note lengths to quarter notes, and the space between lyrics and note heads disappears, which would be useful for general spacing.


\version "2.20.0"
Chords = \chordmode {
  f16*7 a16*3:m
}
Lyric = \lyricmode {
  Lo -- rem ip -- sum do -- lor sit a -- met.
}
Melody = {
  c16 c c c c c c c( a) a
}
<<
  \new ChordNames \chordmode {
    \Chords
  }
  \new Lyrics
  \new RhythmicStaff {
    \new Voice = "melody" {
      \Melody
    }
  }
  \context Lyrics {
    \lyricsto "melody" {
      \Lyric
    }
  }
>>
\layout {
  \context {
    \Lyrics
    \override LyricText.self-alignment-X = -1
  }
  \context {
    \RhythmicStaff
    % the following line gets uncommented in the end to hide everything
    % \override NoteHead.stencil = #point-stencil
    \override NoteHead.X-extent = #'(0 . 0)
    \omit BarLine
    \omit Beam
    \omit Dots
    \omit Flag
    \omit MultiMeasureRest
    \omit Rest
    \omit Slur
    \override StaffSymbol.line-count = 0
    \omit Stem
    \omit Tie
    \omit TimeSignature
  }
}


Thanks,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
Reply | Threaded
Open this post in threaded view
|

Re: Minimal horizontal space for melismata

Kevin Barry
Hi Peter,

On Tue, 24 Mar 2020 at 15:06, Peter Crighton <[hidden email]> wrote:
>
> Hello all,
>
> I want the lyrics to be absolutely free of melismatic hyphens. How can I make sure of that? I have ensured that the note heads take as little space as they can (to my knowledge), but if it is either a short syllable and/or a long melisma, the note heads still take up too much space, so hyphens appear. See example below.

You could try using underscores instead of hyphens so that the lyrics
are always tied to the first note and won't be split up. E.g., in your
example, use:
%%
Lyric = \lyricmode {
  Lorem _ ipsum _ dolor _ sit amet. _
}
%%
instead of using two hyphens (you need to add an underscore for every
syllable after the first - see the section "Multiple notes to one
syllable" in the docs for the details). If LilyPond ends up adding
trailing hyphens to words with lots of syllables (I couldn't make it
do this while fooling around with your example though) you can always
\omit the LyricHyphen.

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Minimal horizontal space for melismata

Peter Crighton
On Thu, 26 Mar 2020 at 10:14, Kevin Barry <[hidden email]> wrote:
Hi Peter,

On Tue, 24 Mar 2020 at 15:06, Peter Crighton <[hidden email]> wrote:
> I want the lyrics to be absolutely free of melismatic hyphens. How can I make sure of that? I have ensured that the note heads take as little space as they can (to my knowledge), but if it is either a short syllable and/or a long melisma, the note heads still take up too much space, so hyphens appear. See example below.

You could try using underscores instead of hyphens so that the lyrics
are always tied to the first note and won't be split up. E.g., in your
example, use:
%%
Lyric = \lyricmode {
  Lorem _ ipsum _ dolor _ sit amet. _
}
%%
instead of using two hyphens (you need to add an underscore for every
syllable after the first - see the section "Multiple notes to one
syllable" in the docs for the details).

Unfortunately that’s not an option because I need the same \Lyrics variable in another, normal score – with hyphens – and cannot change it for this.
It’s not so much a problem of ‘How do I get rid of the hyphens?’ rather than ‘How do I let the melisma note heads take up less space / the space of a solitary note head?’

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
Reply | Threaded
Open this post in threaded view
|

Re: Minimal horizontal space for melismata

David Wright
On Fri 27 Mar 2020 at 16:04:40 (+0100), Peter Crighton wrote:

> On Thu, 26 Mar 2020 at 10:14, Kevin Barry <[hidden email]> wrote:
> > On Tue, 24 Mar 2020 at 15:06, Peter Crighton <[hidden email]> wrote:
> > > I want the lyrics to be absolutely free of melismatic hyphens. How can I
> > make sure of that? I have ensured that the note heads take as little space
> > as they can (to my knowledge), but if it is either a short syllable and/or
> > a long melisma, the note heads still take up too much space, so hyphens
> > appear. See example below.
> >
> > You could try using underscores instead of hyphens so that the lyrics
> > are always tied to the first note and won't be split up. E.g., in your
> > example, use:
> > %%
> > Lyric = \lyricmode {
> >   Lorem _ ipsum _ dolor _ sit amet. _
> > }
> > %%
> > instead of using two hyphens (you need to add an underscore for every
> > syllable after the first - see the section "Multiple notes to one
> > syllable" in the docs for the details).
>
> Unfortunately that’s not an option because I need the same \Lyrics variable
> in another, normal score – with hyphens – and cannot change it for this.
> It’s not so much a problem of ‘How do I get rid of the hyphens?’ rather
> than ‘How do I let the melisma note heads take up less space / the space of
> a solitary note head?’

[I haven't followed the discussion.]

If you put the lyrics into variables, segregate them into a separate
file which you \include, then it would be straightforward to replace
all the -- hyphenations (and any surrounding whitespace) into a
character of your choice, be it _, NBSP, or whatever, with sed to
create an alternative file that you \include in this situation.
You could run sed automatically in the script that runs LP, and
the file would be trashed after use (so you only maintain one file
of lyrics).

Cheers,
David.

Reply | Threaded
Open this post in threaded view
|

Re: Minimal horizontal space for melismata

Torsten Hämmerle
In reply to this post by Peter Crighton
Peter Crighton wrote
> Side question: Is there a shorter/nicer way to hide/omit all those things
> in the RhythmicStaff?

Hi Peter,

For rhythmic alignment without noteheads, beams, accidentals, etc. consuming
space, the relatively new
*  NullVoice*
has been invented.

This, however, still doesn't quite solve your problem yet as other elements
still take up horizontal space.

I've come to a solution that works with your example, but, I'll have to
admit that if it had been "i -- met" instead of "a -- met", a tiny gap after
the slim letter "i" still couldn't have been avoided that way.


In addition to using NullVoice, I've set proportionalNotationDuration on
Staff level to a high value to achieve narrow spacing.

And I've set ChordName.X-extent to zero.  There's the danger of overlapping
chord names, though.


%%%%%%%%%%%%
\version "2.20.0"

Chords = \chordmode {
  f16*7 a16*3:m
}
Lyric = \lyricmode {
  Lo -- rem ip -- sum do -- lor sit a -- met.
}
Melody = {
  c16 c c c c c c c( a) a
}
<<
  \new ChordNames \chordmode {
    \Chords
  }
  \new Lyrics
  \new RhythmicStaff {
    \new NullVoice = "melody" {
      \Melody
    }
  }
  \context Lyrics {
    \lyricsto "melody" {
      \Lyric
    }
  }
>>
\layout {
  \context {
    \Score
    proportionalNotationDuration = #(ly:make-moment 100)
  }
  \context {
    \ChordNames
    \override ChordName.X-extent = #'(0 . 0)
  }
  \context {
    \Lyrics
    \override LyricText.self-alignment-X = #LEFT
  }
  \context {
    \RhythmicStaff
    \override StaffSymbol.line-count = 0
    \omit TimeSignature
    \omit BarLine
  }
}
%%%%%%%%%%%%

And that's how it looks like:
<http://lilypond.1069038.n5.nabble.com/file/t3887/lorem-ipsum-narrow.png>


It's not perfect, but in rare cases with narrow one-character syllables, you
still might enter specific alternatives using \tag.

HTH,
Torsten

lorem-ipsum-narrow.png
<http://lilypond.1069038.n5.nabble.com/file/t3887/lorem-ipsum-narrow.png>  




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: Minimal horizontal space for melismata

Peter Crighton
On Sat, 28 Mar 2020 at 09:34, Torsten Hämmerle <[hidden email]> wrote:
For rhythmic alignment without noteheads, beams, accidentals, etc. consuming
space, the relatively new
*  NullVoice*
has been invented.  
 
This, however, still doesn't quite solve your problem yet as other elements
still take up horizontal space.

Thanks, I wasn’t aware of NullVoice. This is better than what I had before, but yes, it solves not every case.
 
I've come to a solution that works with your example, but, I'll have to
admit that if it had been "i -- met" instead of "a -- met", a tiny gap after
the slim letter "i" still couldn't have been avoided that way.

In addition, longer melismata and note lengths lead to hyphens/gaps.

Now, I strangely wasn’t able to recreate it in the MWE, but in the real-world score I’m working on including this snippet fixed it, even for the shortest possible syllable “i”: https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00389.html
There is a very minor drawback, in that the snippet adds a barely noticeable space after a multisyllabic word. I opened a different thread about this a few days ago, maybe a fix will be found.
 
--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de