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

List:       lilypond-user
Subject:    Re: Three problems with harmonics (pitch and chords)
From:       Stacy Fatemi <eclecticbass () gmail ! com>
Date:       2020-06-28 20:36:55
Message-ID: CACoCbDF-hz--tL4svuuyPyMRcoyWZNyecFBCDoXfkgzY5n7NEw () mail ! gmail ! com
[Download RAW message or body]

Thank you both so much for these two fixes, now I can finish the rest of
the song!!

On Sat, Jun 27, 2020 at 2:34 AM Pierre Perol-Schneider <
pierre.schneider.paris@gmail.com> wrote:

> Hi Stacy,
> As Lukas said, do you really need the relative mode ?
> I'd do:
>
> \version "2.18.2"
>
> \score {
>   \new TabStaff {
>     \set Staff.stringTunings = \stringTuning <a,,, e,, a,, e, a, cis>
>     \tabFullNotation
>     \transpose c c, {
>       <<
>         { s4
>           \override NoteColumn.ignore-collision = ##t
>           \harmonicByRatio #1/4  <e\3 a\2>2. | }
>       \\
>         { b,2.\5 b,4\5 | }
>       \\
>         { r4
>           \shiftOff
>           \harmonicByFret #7 cis2.\1 | }
>       >>
>     }
>   }
> }
>
> Cheers,
> Pierre
>
> Le sam. 27 juin 2020 à 08:55, Lukas-Fabian Moser <lfm@gmx.de> a écrit :
>
>> Hi Stacy,
>>
>> I'm not familiar with harmonics notation or tabulature, but I think both
>> of your problems can be solved.
>> Am 27.06.20 um 01:05 schrieb Stacy Fatemi:
>>
>> Hey list,
>>
>> I'm notating a piece for 6-string bass with heavy harmonic use, including
>> chords with different fretted harmonics. Attachment 1 (the hand-drawn bar)
>> shows how I want this measure to go: root notes in voice 2, harmonics in
>> voice 1, with a chord composed of a 7th fret harmonic on the 1st string and
>> 5th fret harmonics on the 2nd and 3rd strings. Here are the problems:
>> This presents us with two more problems:
>>
>> 2. The harmonics in the first voice are severely augmenting the fret
>> number in the second voice (it's not a huge issue in this tiny example, but
>> in the full file I'm working on I have a line of 78 commas in a row for the
>> first note of the second file to get it on the right fret), and
>>
>> This is caused by the use of \relative mode.
>>
>> Here's why: In \relative mode, the absolute pitch of each note you enter
>> influences the next entered pitch (insofar as any pitch entered _without_ '
>> oder , is taken to be at most a fourth away from the last entered pitch,
>> and ' and , only add/substract octaves). Now, what you probably did not
>> expect: This does not keep track of parallel independent voices. Instead,
>> your very high note \harmonicByRatio #1/4 <e\3 a\2>2. makes LilyPond
>> assume that the next note encountered in your source file is to be taken
>> relative to that high note.
>>
>> There are verious ways of solving this problem, of adding a bunch of
>> ,,,,,'s to get back to the normal octave is probably not the best. One way
>> would be to start a new \relative environment for your lower voice:
>>
>> \relative c,, { b'2.\5 b4\5 | }
>>
>> But probably it would be best to not use relative mode at all, but
>> instead use fixed mode. To be honest, I spent the last half an hour trying
>> to figure out what happens behind the scene for your first command,
>> \harmonicByRatio #1/4 <e\3 a\2>2. in \relative mode. I'm not sure yet, but
>> I think that \harmonicByRatio is seriously broken when used for chords in
>> \relative mode.
>>
>> (Anybody who wants to try: Compile #(calc-harmonic-pitch #{ c' #} #{
>> \relative <c' f'> #}. The function calc-harmonic-pitch should not do
>> anything when given c' as "harmonic pitch", if I understand the source code
>> in tablatura.scm correctly.)
>>
>> But I admit that I do not yet understand the logic by which the fret
>> numbers for harmonics are calculated. I'm not that familiar with the bass
>> (and so I have to calculate rather a lot), but when I just tried to define
>> stringTunings for the cello (which I'm very familiar with) I could
>> understand usual pitches easily, but could not get my head around the
>> displayed tabs for harmonics. But maybe I will.
>>
>> 3. The harmonics don't form a coherent chord, but rather a staggered
>> display with a collision between the stem from voice 1 and the note from
>> voice 3.
>>
>> This is not a bug but a feature: Normally, you want to be able to
>> distinguish the first and the third voice. But not here.
>>
>> The construction << ... \\ ... \\ >> is a bit involved in that it does
>> _several_ things: It creates independent voices, yes, but it also sets
>> defaults for shifting and stem direction (namely, the first voice gets a
>> \voiceOne, which should be read as "should be layouted as a first voice,
>> e.g. with \stemUp etc."). In more complicated situations, it's often more
>> convenient not to use the \\'s but to create the voices for yourself and
>> setting them up manually:
>>
>> <<
>>   \new Voice { \voiceOne ... }
>>   \new Voice { \voiceThree .... }
>> >>
>>
>> But the easiest remedy in your situation is:
>>
>> \version "2.18.2"
>>
>> \score {
>>   \new TabStaff
>>     {
>>     \set Staff.stringTunings = \stringTuning <a,,, e,, a,, e, a, cis>
>>     \tabFullNotation
>>     \relative c,, {
>>     <<
>>       { r4 \harmonicByRatio #1/4 <e\3 a\2>2. | }
>>     \\
>>       \relative c,, { b'2.\5 b4\5 | }
>>     \\
>>       { s4 \voiceOne \harmonicByFret #7 cis2.\1 | }
>>     >>
>>       }
>>     }
>> }
>>
>> Note that I also changed r4 into s4 - s4 behaves like a rest but does not
>> print anything, and we only need one actual printed rest.
>>
>> Best
>> Lukas
>>
>

[Attachment #3 (text/html)]

<div dir="ltr">Thank you both so much for these two fixes, now I can finish the rest \
of the song!!<br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Sat, Jun 27, 2020 at 2:34 AM Pierre Perol-Schneider &lt;<a \
href="mailto:pierre.schneider.paris@gmail.com">pierre.schneider.paris@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>Hi \
Stacy,</div><div>As Lukas said, do you really need the relative mode \
?</div><div>I&#39;d do:</div><div><br></div><div>\version \
&quot;2.18.2&quot;<br><br>\score {<br>   \new TabStaff {<br>      \set \
Staff.stringTunings = \stringTuning &lt;a,,, e,, a,, e, a, cis&gt;<br>      \
\tabFullNotation <br>      \transpose c c, {<br>         &lt;&lt;<br>            { s4 \
<br>               \override NoteColumn.ignore-collision = ##t <br>               \
\harmonicByRatio #1/4   &lt;e\3 a\2&gt;2. | }<br>         \\<br>            { b,2.\5 \
b,4\5 | }<br>         \\<br>            { r4 <br>               \shiftOff<br>         \
\harmonicByFret #7 cis2.\1 | }<br>         &gt;&gt;<br>      }<br>   \
}<br>}</div><div><br></div><div>Cheers,</div><div>Pierre<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Le  sam. 27 juin 2020 Ã   \
08:55, Lukas-Fabian Moser &lt;<a href="mailto:lfm@gmx.de" \
target="_blank">lfm@gmx.de</a>&gt; a écrit  :<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>
    <p>Hi Stacy,</p>
    <p>I&#39;m not familiar with harmonics notation or tabulature, but I
      think both of your problems can be solved.<br>
    </p>
    <div>Am 27.06.20 um 01:05 schrieb Stacy
      Fatemi:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hey list,</div>
        <div><br>
        </div>
        <div>I&#39;m notating a piece for 6-string bass with heavy harmonic
          use, including chords with different fretted harmonics.
          Attachment 1 (the hand-drawn bar) shows how I want this
          measure to go: root notes in voice 2, harmonics in voice 1,
          with a chord composed of a 7th fret harmonic on the 1st string
          and 5th fret harmonics on the 2nd and 3rd strings. Here are
          the problems:<br>
        </div>
        This presents us with two more problems:
        <div><br>
        </div>
        <div>2. The harmonics in the first voice are severely augmenting
          the fret number in the second voice (it&#39;s not a huge issue in
          this tiny example, but in the full file I&#39;m working on I have
          a line of 78 commas in a row for the first note of the second
          file to get it on the right fret), and</div>
      </div>
    </blockquote>
    <p>This is caused by the use of \relative mode.</p>
    <p>Here&#39;s why: In \relative mode, the absolute pitch of each note
      you enter influences the next entered pitch (insofar as any pitch
      entered _without_ &#39; oder , is taken to be at most a fourth away
      from the last entered pitch, and &#39; and , only add/substract
      octaves). Now, what you probably did not expect: This does not
      keep track of parallel independent voices. Instead, your very high
      note <span style="font-family:monospace">\harmonicByRatio #1/4
        &lt;e\3 a\2&gt;2.</span> makes LilyPond assume that the next
      note encountered in your source file is to be taken relative to
      that high note.</p>
    <p>There are verious ways of solving this problem, of adding a bunch
      of ,,,,,&#39;s to get back to the normal octave is probably not the
      best. One way would be to start a new \relative environment for
      your lower voice:</p>
    <p>\relative c,, { b&#39;2.\5 b4\5 | }</p>
    <p>But probably it would be best to not use relative mode at all,
      but instead use fixed mode. To be honest, I spent the last half an
      hour trying to figure out what happens behind the scene for your
      first command,   \harmonicByRatio #1/4 &lt;e\3 a\2&gt;2. in
      \relative mode. I&#39;m not sure yet, but I think that
      \harmonicByRatio is seriously broken when used for chords in
      \relative mode.</p>
    <p>(Anybody who wants to try: Compile #(calc-harmonic-pitch #{ c&#39; #}
      #{ \relative &lt;c&#39; f&#39;&gt; #}. The function calc-harmonic-pitch
      should not do anything when given c&#39; as &quot;harmonic pitch&quot;, if I
      understand the source code in tablatura.scm correctly.)</p>
    <p>But I admit that I do not yet understand the logic by which the
      fret numbers for harmonics are calculated. I&#39;m not that familiar
      with the bass (and so I have to calculate rather a lot), but when
      I just tried to define stringTunings for the cello (which I&#39;m very
      familiar with) I could understand usual pitches easily, but could
      not get my head around the displayed tabs for harmonics. But maybe
      I will.<br>
    </p>
    <blockquote type="cite">
      <div dir="ltr">
        <div>3. The harmonics don&#39;t form a coherent chord, but rather a
          staggered display with a collision between the stem from voice
          1 and the note from voice 3.</div>
      </div>
    </blockquote>
    <p>This is not a bug but a feature: Normally, you want to be able to
      distinguish the first and the third voice. But not here.<br>
    </p>
    <p>The construction &lt;&lt; ... \\ ... \\ &gt;&gt; is a bit
      involved in that it does _several_ things: It creates independent
      voices, yes, but it also sets defaults for shifting and stem
      direction (namely, the first voice gets a \voiceOne, which should
      be read as &quot;should be layouted as a first voice, e.g. with \stemUp
      etc.&quot;). In more complicated situations, it&#39;s often more convenient
      not to use the \\&#39;s but to create the voices for yourself and
      setting them up manually:</p>
    <p>&lt;&lt;<br>
         \new Voice { \voiceOne ... }<br>
         \new Voice { \voiceThree .... }<br>
      &gt;&gt;</p>
    <p>But the easiest remedy in your situation is:<br>
      <br>
      \version &quot;2.18.2&quot;<br>
      <br>
      \score {<br>
         \new TabStaff<br>
             {<br>
             \set Staff.stringTunings = \stringTuning &lt;a,,, e,, a,, e,
      a, cis&gt;<br>
             \tabFullNotation<br>
             \relative c,, {<br>
             &lt;&lt;<br>
                 { r4 \harmonicByRatio #1/4 &lt;e\3 a\2&gt;2. | }<br>
             \\<br>
                 \relative c,, { b&#39;2.\5 b4\5 | }<br>
             \\<br>
                 { s4 \voiceOne \harmonicByFret #7 cis2.\1 | }<br>
             &gt;&gt;<br>
                 }<br>
             }<br>
      }<br>
      <br>
    </p>
    <p>Note that I also changed r4 into s4 - s4 behaves like a rest but
      does not print anything, and we only need one actual printed rest.</p>
    <p>Best<br>
      Lukas</p>
  </div>

</blockquote></div>
</blockquote></div>



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

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