1

How to create a simple song sheet containing only lyrics and chords with ABC notation? For example, the result could look as follows:

Am                    G
Hello darkness my old friend
                           Am
I've come to talk with you again.

Is it possible to not display any staff with ABC? I want to be able to render the song in a pdf and want to keep the option to add some lead melody later, that is why I want to stick with tools that are able to render staffs with melody, but for now I need just lyrics aligned to chords.

5
  • There are lots of ways to print music, and I hope someone here can help you find the one that fits your needs. When you say "ABC notation," do you mean using the notes on the staff? Or do you mean just the chords and lyrics, like you quoted?
    – nuggethead
    Oct 3, 2023 at 18:14
  • Hi, thank you for swit response! I mean I want to use tools such as abc.js or similar to render the lyrics and chords without any notes on staff - no staff should be displayed at all. So the tool should be able to align the chords to the lyrics in some way and render it into pdf or html. There is ChordPro that can serve this purpose and it even has some limited support for in-line abc snippets, but so far it is a bit limited. If its somehow possible to specify what I want in abc notation, that would be preferable.
    – JAV
    Oct 3, 2023 at 18:19
  • There seems to be this kind of possibility in Lilypond as outlined in this answer music.stackexchange.com/a/48085/94866. Is something similar possible with abc?
    – JAV
    Oct 3, 2023 at 18:20
  • I don't know abc.js, but if you see my answer below you can create documents like this using the correct font and a simple text editor.
    – nuggethead
    Oct 3, 2023 at 18:21
  • I actually don't like (hate) this form of song representation. There's no knowing how long each chord (and word) lasts. Unless of course you know the song. In which case, the whole thing is somewhat redundant. And here, does 'again' all get the Am? Not in the real song, but shown here it would appear to. So doubly inaccurate.
    – Tim
    Oct 4, 2023 at 7:52

4 Answers 4

2

Abc v2.2 has two scorewriter programs: abcm2ps creates PostScript files, and abc2svg creates Scalable Vector Graphics. Each of these support a number of extensions to standard Abc 2, but they aren't completely compatible with one another.
(see: http://moinejf.free.fr/abcm2ps-doc/index.html)

There are two types of chord grid in abc2svg (but none in abcm2ps). The second type (grid2) is what you are looking for.

From Guido Gnonzato's Making Music with Abc 2, ch 5.2, p. 92:

%%grid2 [n] replaces the notes of a voice with a chord grid. [n] may be any digit; when it's omitted, the chord grid is not typeset;

An example is given on the following page, p. 93:

example code and render of chord grid (%%grid2) for the song "Happy Birthday"

This formatting directive is also explained (using slightly different terms) in the appendix A.5.5, p. 174:

%%grid2 [int]: replaces a voice with a chord grid. When [int] is missing, the grid is disabled. Default: 0; scope: voice; not available in abcm2ps.


Note that you will need to specify a rhythm for the lyrics to align with (using some dummy melody).

For the piece mentioned, you should get something like this:

X:1
T: 
C: 
Q:none
K:none clef=none
M:none
L:1/8
V:1
%%grid2 1
"Am" z8 | z2AA AAAA | "G" A8 | zAAA AAAA | "Am" A8 |
w:Hel-lo dark-ness my old friend, I've come to talk to you a-gain 

From here, you can add the actual melody notes and other details, and turn off (or comment out) grid2.

X:1
T:The Sound of Silence
C:Paul Simon
Q:1/4=108
K:D#min clef=treble-8
M:4/4
L:1/8
V:1
%%grid2 0
"D#m" z8 | z2DD FFAA | "C#" G8 | zCCC EEGG | "D#m" F8 |
w:Hel-lo dark-ness my old friend, I've come to talk to you a-gain
2
  • Awesome! Is there any way to remove the bars beween the chords? (make the grid lines disappear)?
    – JAV
    Oct 5, 2023 at 8:52
  • 1
    @JAV Yeah, just leave the |'s out from the rhythm line, i.e."Am" z8 z2AA AAAA "G" A8 zAAA AAAA "Am" A8 Oct 5, 2023 at 9:16
1

I do not think ABC is really designed with that in mind (although I’m not much of an authority on abc), but this sort of thing is really easy in Lilypond:

<<
  \new ChordNames \chordmode {
    a1:m g g a:m
  }
  \new Lyrics \lyricmode {
    \skip4 Hel8 -- lo dark -- ness, my old
    friend1 \break
    \skip8 I’ve8 come to talk with you a --
    gain1
  }
>>

Then add some stylesheeting to get this to look like we want:

\paper {
  ragged-right = ##t    % Allow lines to no fill the whole line
  indent = 0            % No indent at start
}

\layout {
  \context {            % Some tricks to get better alignment
    \Lyrics
    \override LyricText.self-alignment-X = #LEFT
    \consists Bar_engraver
    \consists Separating_line_group_engraver
    \override BarLine.extra-spacing-width = #'(0.1 . -0.1)
    \hide BarLine

    % reduce distance to chord names
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = #2
  }
  \context {
    \Score
    \remove Bar_number_engraver
  }
}

<<
  \new ChordNames \chordmode {
    a1:m g g a:m
  }
  \new Lyrics \lyricmode {
    \skip4 Hel8 -- lo dark -- ness, my old
    friend1 \break
    \skip8 I’ve8 come to talk with you a --
    gain1
  }
>>

When at some point we decide to add a melody later on this can be done simply like this:

<<
  \new ChordNames \chordmode {
    a1:m g g a:m
  }
  \new Staff \relative {
    r4 a'8 a c c e e |
    d1 |
    r8 g, g g b b d d |
    c1
  }
  \new Lyrics \lyricmode {
    \skip4 Hel8 -- lo dark -- ness, my old
    friend1
    \skip8 I’ve8 come to talk with you a --
    gain1
  }
>>

or let Lilypond derive the rhythm of the lyrics from the notes

<<
  \new ChordNames \chordmode {
    a1:m g g a:m
  }
  \new Staff \relative {
    r4 a'8 a c c e e |
    d1 |
    r8 g, g g b b d d |
    c1
  }
  \addlyrics {
    Hel -- lo dark -- ness, my old
    friend
    I’ve come to talk with you a --
    gain
  }
>>

I do not know if you can somehow get ABC to do this (it is designed for simplicity after all), but I suppose even if it is not ABC this might work for you.

3
  • Thank you this is great! I see there is also lilypond-book tool to convert lilypond script to html page. What are some good editors for lilypond? Its a bit verbose compared to abc, so I tried to avoid it, but perhaps its worth a shot.
    – JAV
    Oct 3, 2023 at 18:38
  • 1
    @JAV Lilypond has indeed more structural boilerplate than abc. abc is a representation standard for simple music, so it is really good at this. But this does also mean that abc is quite limited (and it is hardly possible to finetune stuff). Lilypond on the other hand is designed to be adaptable and hackable, so you can get it to do very specific things it was not even designed for. The typical IDE for Lilypond would be Frescobaldi.
    – Lazy
    Oct 3, 2023 at 18:56
  • Cool, I'll give it a shot. Thanks! If there will be no option for abc approach, I'll accept this option tomorrow.
    – JAV
    Oct 3, 2023 at 19:01
1

You can create sheets using lyrics and chords like the one you quoted using any text editor, such as Word or Google Docs. The most important feature of this is to use a fixed-width font for the text. Otherwise, you'll never be able to get the spacing right (and the spacing is important). Referring to your quote above, the G chord is supposed to start at the same time as the word "friend."

In most programs, the font Courier or Courier New is a fixed-width font. That means that all the letters have exactly the same width. Other fonts, such as Times, have skinnier letters i, l and fatter letters m, w.. This difference makes aligning the chords to the words impossible.

4
  • Thanks! Yes I realize this can be achieved with text editors, but if I want to extend the song with lead melody later, I'll have to use some tool to do so. So my intention is to start making the tunes with the tool I am going to use later, but skip the melody part for now.
    – JAV
    Oct 3, 2023 at 18:24
  • 1
    @JAV Hm… I’ll bet you could have a staff present but hidden, in Lilypad or various editors… But meanwhile the “just type it up” approach is so quick that you lose little effort if you have to start over. Oct 3, 2023 at 18:27
  • @AndyBonner fair point. I'll definitely consider it. yeah some sort of hiding option is what I am probably after.
    – JAV
    Oct 3, 2023 at 18:33
  • 1
    OP specifically included that the editor should be capable of adding staff notation at a later time.
    – Aaron
    Oct 3, 2023 at 19:26
1

ABC does not allow for this...

...because the text alignment mechanism aligns to notes.

But...

W:

There is a W: operator intended for adding lyrics after the end of a score, but there's no allowance for aligning lines of text — that is, the chord symbols could not be directly aligned to the lyrics. There are at least two ways to get around this, but both are ugly.

  1. Make the chord symbols part of the lyrics: W: (Am)Hello darkness, my old (G)friend
  2. Use some character as a spacer:
W:Am ---------------------- G
W:Hello darkness my old friend

There is a %%wordsfont directive that allows the W: font to be specified, but only for output to PostScript/PDF. However, the feature is "volatile" (per the ABC standard) and may not be available in all implementations. In theory, though, this would allow for the use of a fixed-width font like Courier, which in turn would allow for making the use of a spacing character accurate.

w:

The w: operator aligns to notes, but while the staff can be hidden, notes cant. The best one could do would be to hide everything but the notes, then just enter one note per word or syllable.

X: 1
K:none stafflines=0
E E E E E E E
w: Am _____G
w:Hel-lo, dark-ness, my old friend

Output based on above code

The chord symbols could also be attached to the notes themselves, but this will place them either above the notes or below the lyrics.

X: 1
K:none stafflines=0
"_Am"E E E E E E "_G"E
w:Hel-lo, dark-ness, my old friend

Chord symbols below lyrics

4
  • I know it's only an example, but 'friend' is a lot longer than a quaver!
    – Tim
    Oct 4, 2023 at 7:57
  • @Tim It's not an example of how to notate the song. It's a demonstration that lyrics must be tied to notes, and is as close to the OP's goal as ABC allows.
    – Aaron
    Oct 4, 2023 at 8:01
  • Nice, this looks very close. I see the staffs are gone. Is it also possible to hide the notes somehow?
    – JAV
    Oct 5, 2023 at 8:49
  • 1
    @JAV No. ABC doesn't provide for that.
    – Aaron
    Oct 5, 2023 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.