[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Chords above staff
From: |
Kieren MacMillan |
Subject: |
Re: Chords above staff |
Date: |
Thu, 8 Aug 2024 12:22:25 -0400 |
Hi Walt,
> Below is a sample of an issue I am having with chords, Voice, and Lyrics. I
> want the chords to be above the voice line. But in this case it printing
> between the voice line and the lyrics. But if I comment out the "intro"
> section then the chords print as expected. I am intentionally leaving chords
> out of the intro section - I want them to come in when the voice starts..
I believe there are perhaps better ways to structure your score code… Below is
one possibility.
Notes:
1. I’ve broken out the global information (measure structure, section labels,
etc.), notes, lyrics, and chords into their own variables.
2. There’s no need (or, in such a simple song, benefit) to break up the Intro
and Verse One content; therefore, it’s contiguous in each variable.
3. I’ve put the breaks into a separate variable which I include in a Devnull
context. [n.b. I almost always use OpenLilyLib’s EditionEngraver to inject line
and page breaks, but it would be overkill for a simple song like this.]
4. It all gets combined (using <<>>) into a single score at the end.
I think this gives you the result you want, and is probably much easier to
modify and maintain as you go forward.
If you haven’t already, I suggest [re-]reading the Learning and Notation
manuals — they’re very good (IMO) at getting you started on the right foot.
Hope this helps!
Kieren.
%%% SNIPPET BEGINS
\version "2.24.2"
global = {
%% Intro
\section \sectionLabel \markup { \box \bold \fontsize #-1 "Intro" }
\partial 2 s2
s1
%% Verse One
\section \sectionLabel \markup { \box \bold \fontsize #-1 "Verse One" }
\partial 2 s2
s1
}
theNotes = \relative c' {
%% Intro
\partial 2 e4 g |
a2. c4 |
%% Verse One
\partial 2 e,4 g |
a2. c4 |
}
theLyrics = \lyricmode {
%% Intro
\repeat unfold 4 { \skip 8 }
%% Verse One
Far o -- ver the
}
chrds = \chordmode {
%% Intro
\partial 2 s2 |
s1
%% Verse One
\partial 2 r2 |
a1:m |
}
breaks = {
%% Intro
\partial 2 s2
s1
%% Verse One
\break
}
\score {
<<
\new Devnull \breaks
\new ChordNames \chrds
\new Staff \new Voice = "One" << \global \theNotes >>
\new Lyrics \lyricsto "One" \theLyrics
>>
}
%%% SNIPPET ENDS
______________________________________________
My work day may look different than your work day. Please do not feel obligated
to read or respond to this email outside of your normal working hours.