One staff with two sections and two voices
In my piece, I want a single score in order to be able to output a single midi file.
The entire piece is polyphonic with two voices.
The structure should look like this:
chorus in two voices (with lyrics)
verses in two voices (with numbered lyrics)
I put together the structure below, but I don't want a piano staff or choir staff. I just want one staff, but to have the chorus separated from the verses. The chorus has one set of lyrics, the verses have another.
Now, I don't want to add the chorus lyrics to one of the verse lyrics and then use spacers as placeholders - because I am using a macro to number the verses lyrics.
version "2.19.80"
language "english"
%create new lyrics and add numbered lines
%creates: new Lyrics with { instrumentName = "8." shortInstrumentName = "8." }
lyricsWithVerseNumber =
#(define-music-function (parser location number music)(number? ly:music?) #{
new Lyrics with { instrumentName = #(string-append (number->string number) ".") shortInstrumentName = #(string-append (number->string number) ".") }
$music
#})
signature = {
key c minor
}
chorusUpper = relative c'' {
signature
g g g g
}
chorusLower = relative c' {
signature
e e e e
}
versesUpper = relative c'' {
signature
a a a a
}
versesLower = relative c' {
signature
f f f f
}
chorusLyrics = new Lyrics lyricsto "chorus" {
A song has words
}
wordsOne = new Lyrics lyricsWithVerseNumber 1 lyricsto "verses" {
More words for this
}
wordsTwo = new Lyrics lyricsWithVerseNumber 2 lyricsto "verses" {
Some words go here
}
wordsThree = new Lyrics lyricsWithVerseNumber 3 lyricsto "verses" {
Sing a bit more
}
score {
<<
time 4/4
new Voice = "chorus" {voiceOne chorusUpper }
new Voice { voiceTwo chorusLower }
chorusLyrics
new Staff {
new Voice = "verses" {voiceOne versesUpper }
new Voice { voiceTwo versesLower }
}
wordsOne
wordsTwo
wordsThree
>>
layout {
}
%midi { }
}
How can I get the chorus with it's verse to show above the verses with their lyrics in a single score? With this code here it tries to create a choir staff - three staves joined together.
1 Comments
Sorted by latest first Latest Oldest Best
I think this structure will work for your needs:
version "2.19.81"
language "english"
highVoiceChorus = relative c' {
e4. e4. |
e4 f8 g4. |
}
lowVoiceChorus = relative c' {
c4. c4. |
c4 d8 e4. |
}
lyricsChorus = lyricmode {
Row, row, row your boat
}
highVoiceVerses = relative c'' {
c4 c8 c4 c8 |
c4. c4. |
}
lowVoiceVerses = relative c'' {
g4 g8 a4 a8 |
g4. g4. |
}
lyricsVerseOne = lyricmode {
set stanza = "1. "
Hap -- py hap -- py joy joy!
}
lyricsVerseTwo = lyricmode {
set stanza = "2. "
Oh how hap -- py we are!
}
chorus = <<
new Voice = "highChorus" {
voiceOne
highVoiceChorus
}
new Voice = "lowChorus" {
voiceTwo
lowVoiceChorus
}
new Lyrics {
lyricsto "lowChorus" {
lyricsChorus
}
}
>>
verses = <<
new Voice = "highVerse" {
voiceOne
highVoiceVerses
}
new Voice = "lowVerse" {
voiceTwo
lowVoiceVerses
}
new Lyrics {
lyricsto "lowVerse" {
lyricsVerseOne
}
}
new Lyrics {
lyricsto "lowVerse" {
lyricsVerseTwo
}
}
>>
song = {
time 6/8
chorus
break
verses
}
paper {
ragged-right = ##t
}
score {
new Staff song
layout {
indent = 0
}
}
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.