[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Trouble hiding NullVoice
From:       Samantha Margerison <samantha.margerison () gmail ! com>
Date:       2022-03-27 13:34:45
Message-ID: CAFb63G1h=rOtX=ya5enN8y-1-yEgYzdDtAHqLuG=jKrKES6e4A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


So ...
I've been keying in melody notes ... you were right to steer me in that
direction.  It is not taking too much time, I'm learning to more easily
read sheet music and I might have a bash at producing a melody staff/tab
for the other band members as some of them do twiddly bits (and others want
to learn)

Thanks again Lukas!

Smanth

[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
 Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
 03/27/22,
02:32:23 PM

On Sun, 27 Mar 2022 at 12:48, Samantha Margerison <
samantha.margerison@gmail.com> wrote:

> 
> Lukas, that is brilliant ... thank you SO much!!
> 
> I'd not come across #(skip-of-length introNotes) before and it will come
> in super useful!
> 
> I did put together a diagram to try to grok how contexts fit together and
> it is slowly sinking in lol
> 
> [image: image.png]
> 
> 
> The clarity of using lyrics without timings is nice (as well as being
> easier to add) though this is only possible with the added work of entering
> the melody notes (and the score I create will only ever be used by me for
> playing bass, the other band members work from a song sheet created in
> chordpro format. In my real .ly file, I include the chords/notes/lyrics
> from other .ly files to cut down the clutter in the main one, I'm going to
> try both approaches in that and see how it goes.
> 
> Thank you once again for your time and knowledge, you've helped me move
> forward on my Lilypond journey!
> 
> Smanth
> 
> 
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> \
> Sender notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&> \
> 03/27/22, 12:46:35 PM
> 
> On Sun, 27 Mar 2022 at 11:47, Lukas-Fabian Moser <lfm@gmx.de> wrote:
> 
> > Hi Samanth,
> > 
> > (Please keep the list in your replies, so future readers can follow the
> > discussion.)
> > 
> > > When I put in the \new Staff, it does indeed prevent the nullVoice
> > > from producing a staff ... however the chords now appear in the wrong
> > > line ... almost as if they are being put above where the NullVoice
> > > score would have been.
> > 
> > It's easier to define the "correct" order of contexts once and for all,
> > so I took the liberty of re-organizing your score a bit.
> > 
> > While doing , I noticed something else that I missed before: If you
> > enter the durations of your Lyrics words explicitly, you do not need a
> > (Null)Voice to align the lyrics to. There are two fundamentally
> > different ways of writing Lyrics in LilyPond:
> > 
> > - with explicit lengths (as you did: "When8. I16" etc.)
> > - without explicit lengths, but aligned to a Voice or NullVoice
> > 
> > So one can reduce to:
> > 
> > % When I'm Sixty Four - Bass Song Sheet
> > \version "2.22.2"
> > \language english
> > 
> > \header {
> > title = "When I'm Sixty Four"
> > subtitle = Bass
> > composer = "McCartney/Lennon"
> > }
> > 
> > % Setup variables for Chords, Notes, Rhythm and Lyrics
> > introChords = \chordmode {
> > c1 c1 f2 g2 |
> > c1 c1 c1 |
> > }
> > 
> > verseChords = \chordmode {
> > c1 c1 c1 g1:7 |
> > }
> > 
> > introNotes = \relative c, {
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > f4 r4 g4 r4 |
> > \break
> > c4 g4 c4 r4 |
> > c4 r4 g4 r8 a16 b16 |
> > c4 r4 g4 r4 |
> > \bar "||"
> > \break
> > }
> > 
> > verseNotes = \relative c, {
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > g4 r4 d'4\3 r4 |
> > \break
> > }
> > 
> > verseOneLyrics = \lyricmode
> > {
> > \set stanza = "1. "
> > When8. I16 get4 old4 -- er4
> > losing4 my4 hair2
> > Many4 years4 from4 now4 "___"1
> > }
> > 
> > <<
> > \new ChordNames {
> > \introChords
> > \verseChords
> > }
> > \new Staff \with {
> > \easyHeadsOn
> > \clef "bass_8"
> > } {
> > \introNotes
> > \verseNotes
> > }
> > \new Lyrics {
> > #(skip-of-length introNotes)
> > \verseOneLyrics
> > }
> > > > 
> > 
> > But it's often easier to actually use a (Null)Voice for this, since that
> > way we don't have to clutter the lyrics with durations. The way I'd
> > personally do it would be (as I often need the actual melody as well, I
> > went ahead and entered it with pitches - but these might also be omitted):
> > 
> > % When I'm Sixty Four - Bass Song Sheet
> > \version "2.22.2"
> > \language english
> > 
> > \header {
> > title = "When I'm Sixty Four"
> > subtitle = Bass
> > composer = "McCartney/Lennon"
> > }
> > 
> > % Setup variables for Chords, Notes, Rhythm and Lyrics
> > introChords = \chordmode {
> > c1 c1 f2 g2 |
> > c1 c1 c1 |
> > }
> > 
> > verseChords = \chordmode {
> > c1 c1 c1 g1:7 |
> > }
> > 
> > introNotes = \relative c, {
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > f4 r4 g4 r4 |
> > \break
> > c4 g4 c4 r4 |
> > c4 r4 g4 r8 a16 b16 |
> > c4 r4 g4 r4 |
> > \bar "||"
> > \break
> > }
> > 
> > verseNotes = \relative c, {
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > c4 r4 g4 r4 |
> > g4 r4 d'4\3 r4 |
> > \break
> > }
> > 
> > melody = \relative {
> > R1*6
> > e'8 ds e8 g4. e4 % If we're not interested in the pitches, we can
> > simply write 8 8 8 4. 4 etc.
> > g8 a g c4. r4
> > c8 e4. c4 a8 d8~
> > d2 r
> > }
> > 
> > verseOneLyrics = \lyricmode
> > {
> > \set stanza = "1. "
> > When I get old -- er
> > lo -- sing my hair
> > Ma -- ny years from now __
> > }
> > 
> > <<
> > \new ChordNames {
> > \introChords
> > \verseChords
> > }
> > \new Staff \with {
> > \easyHeadsOn
> > \clef "bass_8"
> > }
> > <<
> > {
> > \introNotes
> > \verseNotes
> > }
> > \new NullVoice = mel \melody
> > > > 
> > \new Lyrics \lyricsto mel {
> > \verseOneLyrics
> > }
> > > > 
> > 
> > \new StaffGroup <<
> > \new ChordNames {
> > \introChords
> > \verseChords
> > }
> > \new Staff \with { \autoBeamOff }
> > \new Voice = "mel" \melody
> > \new Lyrics \lyricsto mel {
> > \verseOneLyrics
> > }
> > \new Staff \with {
> > \easyHeadsOn
> > \clef "bass_8"
> > }
> > {
> > \introNotes
> > \verseNotes
> > }
> > > > 
> > 
> > As you can see, this way one can generate different versions of the
> > score from the same variables, which is one of the main strengths of
> > LilyPond.
> > 
> > For the construct
> > 
> > \new Voice = someName { ... }
> > \new Lyrics \lyricsTo someName { ... }
> > 
> > there is the shorthand
> > 
> > \new Voice { ... } \addlyrics { ... }
> > 
> > but in my experience this is only really helpful in the simplest of use
> > cases, so I didn't use it here.
> > 
> > Lukas
> > 
> > 


[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">So ...  <div>I&#39;ve been keying in melody notes ... \
you were right to steer me in that direction.   It is not taking too much time, \
I&#39;m learning to more easily read sheet music and I might have a bash at producing \
a melody staff/tab for the other band members as some of them do twiddly bits (and \
others want to learn)</div><div><br></div><div>Thanks again Lukas!</div><div><br \
clear="all"><div><div dir="ltr" class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div \
                dir="ltr">Smanth</div></div></div></div></div><br><div \
                id="mt-signature">
        <table border="0" cellpadding="8" cellspacing="0" style="user-select: none;">
            <tbody><tr>
                <td>
                    <a id="signatureLink-logo" \
href="https://mailtrack.io?utm_source=gmail&amp;utm_medium=signature&amp;utm_campaign=signaturevirality11&amp;" \
                class="" style="text-decoration:none">
                        <img \
src="https://s3.amazonaws.com/mailtrack-signature/sender-notified-72.gif" \
alt="Mailtrack" class="" width="32" height="32">  </a>
                </td>
                <td>
                    <span style="color:#777">Sender notified by</span> <br>
                    <a id="signatureLink-text" \
href="https://mailtrack.io?utm_source=gmail&amp;utm_medium=signature&amp;utm_campaign=signaturevirality11&amp;" \
class="mt-install" style="color:#4374f7">Mailtrack</a>  
    </td><td><span style="color:transparent;font-size:0">03/27/22, 02:32:23 \
PM</span></td>

                
                <td>
                    
                </td>
            </tr>
        </tbody></table>
    </div></div></div><br><img width="0" height="0" class="mailtrack-img" alt="" \
style="display:flex" \
src="https://mailtrack.io/trace/mail/77586763bb5cac71429c3e8a46dd76ffb09b1c29.png?u=4268909"><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 27 Mar 2022 at 12:48, \
Samantha Margerison &lt;<a \
href="mailto:samantha.margerison@gmail.com">samantha.margerison@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
dir="ltr"><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div \
dir="ltr">Lukas, that is brilliant ... thank you SO much!!</div></div><div \
dir="ltr"><br></div><div>I&#39;d not come across #(skip-of-length introNotes) before \
and it will come in super useful!</div><div dir="ltr"><br></div><div>I did put \
together a diagram to try to grok how contexts fit together and it is slowly sinking \
in lol</div><div dir="ltr"><br></div><div dir="ltr"><img src="cid:ii_l197m5ov0" \
alt="image.png" width="472" height="367"><br></div><div \
dir="ltr"><br></div><div><br></div><div>The clarity of using lyrics without timings \
is nice (as well as being easier to add) though this is only possible with the added \
work of entering the melody notes (and the score I create will only ever be used by \
me for playing bass, the other band members work from a song sheet created in \
chordpro format. In my real .ly file, I include the chords/notes/lyrics from other \
.ly files to cut down the clutter in the main one, I&#39;m going to try both \
approaches in that and see how it goes.</div><div><br></div><div>Thank you once again \
for your time and knowledge, you&#39;ve helped me move forward on my Lilypond \
journey!</div><div><br></div><div>Smanth</div><div><br></div></div></div></div><br><div \
id="gmail-m_-2949793324990221512mt-signature">  <table border="0" cellpadding="8" \
cellspacing="0">  <tbody><tr>
                <td>
                    <a id="gmail-m_-2949793324990221512signatureLink-logo" \
href="https://mailtrack.io?utm_source=gmail&amp;utm_medium=signature&amp;utm_campaign=signaturevirality11&amp;" \
                style="text-decoration:none" target="_blank">
                        <img \
src="https://s3.amazonaws.com/mailtrack-signature/sender-notified-72.gif" \
alt="Mailtrack" width="32" height="32">  </a>
                </td>
                <td>
                    <span style="color:rgb(119,119,119)">Sender notified by</span> \
<br>  <a id="gmail-m_-2949793324990221512signatureLink-text" \
href="https://mailtrack.io?utm_source=gmail&amp;utm_medium=signature&amp;utm_campaign=signaturevirality11&amp;" \
style="color:rgb(67,116,247)" target="_blank">Mailtrack</a>  
    </td><td><span style="color:transparent;font-size:0px">03/27/22, 12:46:35 \
PM</span></td>

                
                <td>
                    
                </td>
            </tr>
        </tbody></table>
    </div></div><br><img width="0" height="0" alt="" style="display: flex;" \
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 27 Mar 2022 at 11:47, \
Lukas-Fabian Moser &lt;<a href="mailto:lfm@gmx.de" target="_blank">lfm@gmx.de</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Samanth,<br> <br>
(Please keep the list in your replies, so future readers can follow the <br>
discussion.)<br>
<br>
&gt; When  I put in the \new Staff, it does indeed prevent the nullVoice <br>
&gt; from producing a staff ... however the chords now appear in the wrong <br>
&gt; line ... almost as if they are being put above where the NullVoice <br>
&gt; score would have been.<br>
<br>
It&#39;s easier to define the &quot;correct&quot; order of contexts once and for all, \
<br> so I took the liberty of re-organizing your score a bit.<br>
<br>
While doing , I noticed something else that I missed before: If you <br>
enter the durations of your Lyrics words explicitly, you do not need a <br>
(Null)Voice to align the lyrics to. There are two fundamentally <br>
different ways of writing Lyrics in LilyPond:<br>
<br>
- with explicit lengths (as you did: &quot;When8. I16&quot; etc.)<br>
- without explicit lengths, but aligned to a Voice or NullVoice<br>
<br>
So one can reduce to:<br>
<br>
% When I&#39;m Sixty Four - Bass Song Sheet<br>
\version &quot;2.22.2&quot;<br>
\language english<br>
<br>
\header {<br>
     title = &quot;When I&#39;m Sixty Four&quot;<br>
     subtitle = Bass<br>
     composer = &quot;McCartney/Lennon&quot;<br>
}<br>
<br>
% Setup variables for Chords, Notes, Rhythm and Lyrics<br>
introChords = \chordmode {<br>
     c1 c1 f2 g2 |<br>
     c1 c1 c1 |<br>
}<br>
<br>
verseChords = \chordmode {<br>
     c1 c1 c1 g1:7 |<br>
}<br>
<br>
introNotes = \relative c, {<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     f4 r4 g4 r4 |<br>
     \break<br>
     c4 g4 c4 r4 |<br>
     c4 r4 g4 r8 a16 b16 |<br>
     c4 r4 g4 r4 |<br>
     \bar &quot;||&quot;<br>
     \break<br>
}<br>
<br>
verseNotes = \relative c, {<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     g4 r4 d&#39;4\3 r4 |<br>
     \break<br>
}<br>
<br>
verseOneLyrics = \lyricmode<br>
{<br>
     \set stanza = &quot;1. &quot;<br>
     When8. I16 get4 old4 -- er4<br>
     losing4 my4 hair2<br>
     Many4 years4 from4 now4 &quot;___&quot;1<br>
}<br>
<br>
&lt;&lt;<br>
     \new ChordNames {<br>
         \introChords<br>
         \verseChords<br>
     }<br>
     \new Staff \with {<br>
         \easyHeadsOn<br>
         \clef &quot;bass_8&quot;<br>
     } {<br>
         \introNotes<br>
         \verseNotes<br>
     }<br>
     \new Lyrics {<br>
         #(skip-of-length introNotes)<br>
         \verseOneLyrics<br>
     }<br>
  &gt;&gt;<br>
<br>
But it&#39;s often easier to actually use a (Null)Voice for this, since that <br>
way we don&#39;t have to clutter the lyrics with durations. The way I&#39;d <br>
personally do it would be (as I often need the actual melody as well, I <br>
went ahead and entered it with pitches - but these might also be omitted):<br>
<br>
% When I&#39;m Sixty Four - Bass Song Sheet<br>
\version &quot;2.22.2&quot;<br>
\language english<br>
<br>
\header {<br>
     title = &quot;When I&#39;m Sixty Four&quot;<br>
     subtitle = Bass<br>
     composer = &quot;McCartney/Lennon&quot;<br>
}<br>
<br>
% Setup variables for Chords, Notes, Rhythm and Lyrics<br>
introChords = \chordmode {<br>
     c1 c1 f2 g2 |<br>
     c1 c1 c1 |<br>
}<br>
<br>
verseChords = \chordmode {<br>
     c1 c1 c1 g1:7 |<br>
}<br>
<br>
introNotes = \relative c, {<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     f4 r4 g4 r4 |<br>
     \break<br>
     c4 g4 c4 r4 |<br>
     c4 r4 g4 r8 a16 b16 |<br>
     c4 r4 g4 r4 |<br>
     \bar &quot;||&quot;<br>
     \break<br>
}<br>
<br>
verseNotes = \relative c, {<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     c4 r4 g4 r4 |<br>
     g4 r4 d&#39;4\3 r4 |<br>
     \break<br>
}<br>
<br>
melody = \relative {<br>
     R1*6<br>
     e&#39;8 ds e8 g4. e4 % If we&#39;re not interested in the pitches, we can <br>
simply write 8 8 8 4. 4 etc.<br>
     g8 a g c4. r4<br>
     c8 e4. c4 a8 d8~<br>
     d2 r<br>
}<br>
<br>
verseOneLyrics = \lyricmode<br>
{<br>
     \set stanza = &quot;1. &quot;<br>
     When I get old -- er<br>
     lo -- sing my hair<br>
     Ma -- ny years from now __<br>
}<br>
<br>
&lt;&lt;<br>
     \new ChordNames {<br>
         \introChords<br>
         \verseChords<br>
     }<br>
     \new Staff \with {<br>
         \easyHeadsOn<br>
         \clef &quot;bass_8&quot;<br>
     }<br>
     &lt;&lt;<br>
         {<br>
             \introNotes<br>
             \verseNotes<br>
         }<br>
         \new NullVoice = mel \melody<br>
     &gt;&gt;<br>
     \new Lyrics \lyricsto mel {<br>
         \verseOneLyrics<br>
     }<br>
  &gt;&gt;<br>
<br>
\new StaffGroup &lt;&lt;<br>
     \new ChordNames {<br>
         \introChords<br>
         \verseChords<br>
     }<br>
     \new Staff \with { \autoBeamOff }<br>
     \new Voice = &quot;mel&quot; \melody<br>
     \new Lyrics \lyricsto mel {<br>
         \verseOneLyrics<br>
     }<br>
     \new Staff \with {<br>
         \easyHeadsOn<br>
         \clef &quot;bass_8&quot;<br>
     }<br>
     {<br>
         \introNotes<br>
         \verseNotes<br>
     }<br>
  &gt;&gt;<br>
<br>
As you can see, this way one can generate different versions of the <br>
score from the same variables, which is one of the main strengths of <br>
LilyPond.<br>
<br>
For the construct<br>
<br>
\new Voice = someName { ... }<br>
\new Lyrics \lyricsTo someName { ... }<br>
<br>
there is the shorthand<br>
<br>
\new Voice { ... } \addlyrics { ... }<br>
<br>
but in my experience this is only really helpful in the simplest of use <br>
cases, so I didn&#39;t use it here.<br>
<br>
Lukas<br>
<br>
</blockquote></div><img \
src="https://gs-mailtracker.com/pixel/tKgBojzPAl1hDwXnuAxb?rid=tKgBojzPAl1hDwXnuAxb" \
width="1" height="1" border="0"></div> </blockquote></div><img \
src="https://gs-mailtracker.com/pixel/t8Or3Sr1ML2VGwF6zJQM?rid=t8Or3Sr1ML2VGwF6zJQM" \
width="1" height="1" border="0"></div>


["image.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic