Discussion:
Generate staff-less chord and lyrics sheet
Annette Kusma
2018-12-06 20:15:43 UTC
Permalink
Hi,

I have a working .ly-file that displays a staff with notes, lyrics and
chordnames, all correctly counted/aligned.

I wonder if there is any command to generate a sheet with only chords
and lyrics, no staves.

The output should look something like this:


C F C
Mary had a little lamb
F G C
Its fleece was white as snow


with the chord names printed nicely above the corresponding syllable
(the .ly-file could calculate the alignment from combining the given
lyrics- and notes-information), but hyphens removed, and linebreaks
at, say every given number of measures.

What would be the term to search for, in case there already is some
ready-to-learn solution?

I could simply write my sheet in some office programme, but it will be
easier to transpose things forth and back and to regenerate sheets
from new and modified files, so I'd really look forward to a solution.

Thanks,
Annette
Andrew Bernard
2018-12-06 23:01:36 UTC
Permalink
Hi Annette,

A minimal working example would be good (MWE).

But can't you simply hide the staff?

See NR for 2.19.82 Section 1.6.2, subsection Hiding Staves. [Works in
earlier lilypond versions as well.]

"Staff lines can be hidden by removing the Staff_symbol_engraver from the
Staff context. As an alternative, \stopStaff may be used. "

Andrew
Post by Annette Kusma
I wonder if there is any command to generate a sheet with only chords
and lyrics, no staves.
Kieren MacMillan
2018-12-06 23:21:47 UTC
Permalink
Hi Annette,
Post by Annette Kusma
I wonder if there is any command to generate a sheet with only chords
and lyrics, no staves.
Here’s one attempt. You should be able to take it from here.

Hope this helps!
Kieren.

%%% SNIPPET BEGINS

\version "2.19.80"

theMelody = {
e'4 d' c' d'
e'4 4 4 4
d'4 4 e' d'
c'2. r4
}

theChords = \chordmode {
c2 f
c1
f2 g
c1
}

theWords = \lyricmode {
Mar4 -- y had a lit -- tle lamb,
Its fleece was white as snow.2
}

\score {
<<
\new ChordNames \theChords
\new Staff \new Voice = "melody" \theMelody
\new Lyrics \lyricsto "melody" \theWords
\layout {
ragged-right = ##f
}
}

\score {
<<
\new Devnull \new NullVoice = "melody" \theMelody
\new ChordNames \theChords
\new Lyrics \lyricsto "melody" \theWords
\layout {
ragged-right = ##f
\context {
\Staff
\omit StaffSymbol
\omit BarLine
\omit Clef
\omit TimeSignature
}
}
}

%%% SNIPPET ENDS
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Kieren MacMillan
2018-12-06 23:23:27 UTC
Permalink
Hi Annette,

Here’s a simpler version that seems to work.

Kieren.

\version "2.19.80"

theMelody = {
e'4 d' c' d'
e'4 4 4 4
d'4 4 e' d'
c'2. r4
}

theChords = \chordmode {
c2 f
c1
f2 g
c1
}

theWords = \lyricmode {
Mar -- y had a lit -- tle lamb,
Its fleece was white as snow.
}

\score {
<<
\new ChordNames \theChords
\new Staff \new Voice = "melody" \theMelody
\new Lyrics \lyricsto "melody" \theWords
\layout {
ragged-right = ##f
}
}

\score {
<<
\new Devnull = "melody" \theMelody
\new ChordNames \theChords
\new Lyrics \lyricsto "melody" \theWords
\layout {
ragged-right = ##f
}
}

Cheers,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Carl Sorensen
2018-12-07 01:41:47 UTC
Permalink
On 12/6/18, 1:15 PM, "Annette Kusma" <***@gmail.com> wrote:

Hi,

I have a working .ly-file that displays a staff with notes, lyrics and
chordnames, all correctly counted/aligned.

I wonder if there is any command to generate a sheet with only chords
and lyrics, no staves.

The output should look something like this:


C F C
Mary had a little lamb
F G C
Its fleece was white as snow


with the chord names printed nicely above the corresponding syllable
(the .ly-file could calculate the alignment from combining the given
lyrics- and notes-information), but hyphens removed, and linebreaks
at, say every given number of measures.

What would be the term to search for, in case there already is some
ready-to-learn solution?

I could simply write my sheet in some office programme, but it will be
easier to transpose things forth and back and to regenerate sheets
from new and modified files, so I'd really look forward to a solution.

I really find Kieren's solution to be interesting. I have made a number of guitar chord/lyrics sheets like this, and I generally don't use LilyPond. Maybe for the benefit of transposing I'll start using LilyPond.

What I've been using is Chordii/ChordPro. It's not as powerful as LilyPond, but also not as complicated.

HTH,

Carl
Carl Sorensen
2018-12-07 01:44:48 UTC
Permalink
On 12/6/18, 6:41 PM, "Carl Sorensen" <***@byu.edu> wrote:



What I've been using is Chordii/ChordPro. It's not as powerful as LilyPond, but also not as complicated.


Oops -- that's my mistake. I haven't been using Chordii, I've been using the gchords package in LaTeX, which is similar.

Thanks,

Carl
Kieren MacMillan
2018-12-07 15:02:54 UTC
Permalink
Hi Carl (et al.),
Post by Carl Sorensen
I really find Kieren's solution to be interesting.
I’m glad!

Below, I’ve done a little custom-context-building, in the hopes we might crowd-source a real solution to this problem (which crops up on the list fairly often). I’ve added a way (using tags) to break lyrics at appropriate spots, independent of breaks in the musical score. I’ve also shown how lyrics could be "centred" on the page (using indents, etc.); of course, this could also be done using margins, but I wanted to see if it could be done on a single page (equiv. in a single bookpart).

Best,
Kieren.

\version "2.19.80"

\paper {
indent = 0
ragged-right = ##t
system-system-spacing = #'((basic-distance . 6) (minimum-distance . 6) (padding . 2.5) (stretchability . 0))
score-system-spacing.padding = #12
}

\layout {
\context {
\ChordNames
\override VerticalAxisGroup.staff-affinity = #DOWN
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 2.5) (minimum-distance . 2.5) (padding . 1.25) (stretchability . 0))
}
\context {
\Lyrics
\override VerticalAxisGroup.staff-affinity = #UP
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 5.5) (minimum-distance . 5.5) (padding . 1.25) (stretchability . 0))
}
\context {
\ChordNames
\name LyricSheetChords
\alias ChordNames
\inherit-acceptability LyricSheetChords ChordNames
\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((basic-distance . 1) (minimum-distance . 1) (padding . 1) (stretchability . 0))
}
\context {
\Lyrics
\name LyricSheetLyrics
\alias Lyrics
\inherit-acceptability LyricSheetLyrics Lyrics
\override VerticalAxisGroup.staff-affinity = #UP
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 3) (minimum-distance . 3) (padding . 2) (stretchability . 0))
\override LyricHyphen.minimum-length = #0
\override LyricHyphen.minimum-distance = #0
\override LyricText.self-alignment-X = #-0.9
}
}

lyricsbreak = \tag #'lyricsheet { \bar "" \break }

theMelody = {
e'4 d' c' d'
e'4 4 4 \lyricsbreak 4
d'4 4 e' d'
c'2. r4
}

theChords = \chordmode {
c2 f
c1
f2:6 g
c1
}

theWords = \lyricmode {
Mar -- y had a lit -- tle lamb,
Its fleece was white as snow.
}

\score {
\removeWithTag #'lyricsheet <<
\new ChordNames \theChords
\new Staff \new Voice = "melody" \theMelody
\new Lyrics \lyricsto "melody" \theWords
\layout {
ragged-right = ##f
}
}

\score {
\keepWithTag #'lyricsheet <<
\new ChordNames \theChords
\new Devnull = "melody" \theMelody
\new LyricSheetLyrics \lyricsto "melody" \theWords
\layout {
line-width = 6\in
indent = 2\in
short-indent = 2\in
\context {
\Score
\remove "Bar_number_engraver"
}
}
}
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Johan Vromans
2018-12-08 09:07:46 UTC
Permalink
Post by Annette Kusma
C F C
Mary had a little lamb
F G C
Its fleece was white as snow
I could simply write my sheet in some office programme,
Instead of trying to abuse office programs, why not take a look at
https://www.chordpro.org ?

Loading...