bell notificationshomepageloginNewPostedit profiledmBox

Hoots : How to set a simple song in lilypond with refrain I am fiddling now a whole day around with trying to set a correct Lilypond notation. While I found with trial and error, that I could display all tones and vocals, I am not - freshhoot.com

10% popularity   0 Reactions

How to set a simple song in lilypond with refrain
I am fiddling now a whole day around with trying to set a correct Lilypond notation. While I found with trial and error, that I could display all tones and vocals, I am not able in getting the correct timings (and tones), so I have a few questions.

How can I get the right bars and times? It seems that Lilypond sets some weird timings for example with 9/8 timing, and, whatever I do I can't get the bars (or the vocals) to the right places
How can I correctly separate the refrain from the main text? The score is without a break and I didn't manage to find the structure for a simple song
Does anyone know, what the right English notation I have to write, for example when I try to display a "h"? I´ve tried it with b but it seems, it displays always one octave deeper.
The timing is weird, for example on bar 5, there is more than 4/4 tact and on bar #7 i can´t figure out, what is happening at all
I try to get a simple framework to convert my songs to Lilypond, therefore I tried to make it as simple as possible, but until now I had no luck.

Here I show what I have found out until now:

version "2.18.2"[![enter image description here][1]][1]
include "predefined-guitar-fretboards.ly"

verseI = lyricmode {
set stanza = #"1."
Ach was
wird denn mei -- ne Mut -- ter
sa -- gen wenn
ich einst kehr zu rück?
}
verseII = lyricmode {
set stanza = #"2."
Und wenn
ich dann ei -- nen Voll -- bart
ha -- be mein
Sohn was bist jetzt Du?
}
theChords = chordmode {
s4 g1 c1 d1 g1
}
staffMelody = relative c' {
key d major
clef treble
time 4/4
override Score.BarNumber.break-visibility = #'#(#t #t #t )
set Score.currentBarNumber = #1
% Permit first bar number to be printed
bar ""
partial 4 a8 d8
fis4 fis8 fis8 fis8 g4 fis8
e4 b2 b'4
f4. f4 f4 f8
fis2 r4 r4
f8
}
theChordsRefrain = chordmode {
a d g1 c1 d1 g1 d g
}
RefrainI = lyricmode {
set stanza = #"2."
Ich bin bar ":|" Po
lier, fi -- de -- ri, fi -- de
ra, sauf nur noch
Bier -- fi -- de -- ri -- fi -- de
ra -- ich bin Po
lier, sauf nur noch
Bier, ich
bin Po
}
staffRefrain = relative c' {
key d major
clef treble
time 4/4
r2 a2 d2 e2
bar ".|:-||"
fis4 fis8 fis8 fis4 fis8 fis8
fis4 fis4 g4 fis4
e4 b8 b8 b4 b8 b8
b b4 b4 b4
b2. b8 % lier sauf
b2. b8 % nur noch
b8 bar ":|." % Bier Ich
b8 b8 b4 % bin Po
}
score {
{
<<
context ChordNames { theChords }
new Staff {
context Voice = "voiceMelody" { staffMelody }
}
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" verseI
}
new Lyrics = "lyricsII" {
lyricsto "voiceMelody" verseII
}
>>
<<
context ChordNames { theChordsRefrain }
%new Staff {
context Voice = "voiceMelody" { staffRefrain }
%} % Dont know
new Lyrics = "RefrainI" {
lyricsto "voiceMelody" RefrainI
}
>>
}
}
layout { }
midi { }

Addendum: with the help of Alephzero, I managed now to display a better notation:

....
score {
<<
context ChordNames { theChords theChordsRefrain }
new Staff {
context Voice = "voiceMelody" { staffMelody staffRefrain }
}
<<
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" lyricmode { verseI RefrainI }
}
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" lyricmode { verseI RefrainII }
}
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" lyricmode { verseI RefrainIII }
}
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" lyricmode { verseI RefrainIV }
}
>>
new Lyrics = "lyricsII" {
lyricsto "voiceMelody" lyricmode { verseII }
}
new Lyrics = "lyricsIII" {
lyricsto "voiceMelody" lyricmode { verseIII }
}
new Lyrics = "lyricsIV" {
lyricsto "voiceMelody" lyricmode { verseIV }
}
>>
}
....

Two questions remain:
1) How to place the chords not only at the boundary of the bars
2) How to write the first lyric only once and, because it is the same, not 4 times
I attached the new progress (It is not fully correct since it is only an example)


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

I think there is a fundamental problem with the way you tried to do this. You defined context Voice = "voiceMelody" inside the first << ... >> but then tried to reference voiceMelody inside the second << ... >>.

In Lilypond version 18 this seems to crash the program, which is (by definition) a bug, because it should be impossible to cause a crash by supplying the wrong input. But even if it didn't crash, I don't think it wouldn't have done what you wanted.

The easiest way is to create one score that contains both the verse and the chorus, something like this:

% Delete the "f8" at the end of staffMelody
% No other changes from the start until...

RefrainI = lyricmode {
set stanza = #"Chorus"
Ich bin Po
lier, fi -- de -- ri, fi -- de
ra, sauf nur noch
Bier -- fi -- de -- ri -- fi -- de
ra -- ich bin Po
lier, sauf nur noch
Bier, ich
bin Po
}
staffRefrain = relative c' {
r2 a2 d2 e2
repeat volta 2 {
fis4 fis8 fis8 fis4 fis8 fis8
fis4 fis4 g4 fis4
e4 b8 b8 b4 b8 b8
b b4 b4 b4
b2. b8 % lier sauf
b2. b8 % nur noch
b8 % Bier Ich
}
b8 b8 b4 % bin Po
}
score {
<<
context ChordNames { theChords theChordsRefrain }
new Staff {
context Voice = "voiceMelody" { staffMelody staffRefrain }
}
new Lyrics = "lyricsI" {
lyricsto "voiceMelody" lyricmode { verseI RefrainI }
}
new Lyrics = "lyricsII" {
lyricsto "voiceMelody" lyricmode { verseII }
}
>>
}

There are several mistakes in the rhythms, but you should be able to fix those. If you write a | character at the end of every bar, Lilypond will give an error message if the length of the notes in the bar don't add up to the correct amount. The reason you got "weird timings" is because Lilypond doesn't care if you write a long note that would continue past the bar line into the next bar - in early music notation (15th and 16th century) music was intentionally written like that, instead of the modern notation using tied notes.

Note, also I changed your attempt at writing a repeat into the standard way to do that, using repeat volta.


Back to top Use Dark theme