lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\absolute, was Re: Stop Tablature from moving up an octave


From: David Wright
Subject: \absolute, was Re: Stop Tablature from moving up an octave
Date: Mon, 17 Feb 2020 18:58:00 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

Opinions here aren't aimed at P-L G. The example just illustrates
what I see as a problem.

On Sat 15 Feb 2020 at 10:39:57 (-0500), Pierre-Luc Gauthier wrote:
> Guitar (like the bass) is a transposing instrument.
> 
> The Tab part though is not transposing (obviously).
> 
> \version "2.21.0"
> 
> song = {
>   % here you write the music the
>   % way it should sound
>   <e,  g\3  b\2>  <a,\5 g\3 b\2>
>   <d\4 g\3 b\2> <a,\5 g\3 b\2> |
> }
> 
> guitarStaff = \transpose c c' {
>   % Here we transpose because a
>   % guitar is a transposing instrument
>   \new Staff \with {
>     \transposition c
>     % This^ will help with MIDI and
>     % with \cueDuring etc.
>   } \new Voice \with {
>   } \song
> }
> 
> guitarTab = {
>   \new TabStaff \with {
>   } \new TabVoice \with {
>   } \song
> }
> 
> guitarReal = \new Staff \with {
>   \clef bass
> } \new Voice \with {
> } \song
> 
> guitarPart = \new GrandStaff \with {
>   instrumentName = "Guitar"
> } <<
>   \guitarStaff
>   \guitarTab
> >>
> 
> \score {
>   <<
>     \guitarPart
>     \guitarReal
>   >>
> }
> 
> For what it's worth, I wish somebody would have told me earlier that I
> should use absolute mode rather than relative.
> e.g. :  e, is the low e on your guitar.

Ironically, it doesn't appear to me that you *have* used \absolute¹
mode but have, rather, corrected the OP's "misuse"² of \relative.

> Le sam. 15 févr. 2020 à 09:49, David Kastrup <address@hidden> a écrit :
> > Bob Stricklin <address@hidden> writes:
> > > I am new to Lilypond and can not get Tablature for guitar to work like I 
> > > think it should.
> > > The documentation indicates Lilypond will select the lowest fret and open 
> > > strings.
> > > When I run my example below the tablature selects fret position 12 and 
> > > not zero for three of the note groups.
> > > I want it to select zero for all strings played. Is there an easy 
> > > solution to this issue?
> > > Its odd that the code works properly for one of the three note groupings.
> > > This is to represent finger picking a bass note and two other notes with 
> > > fingers.
> > > My Simplified code input using Frescobaldi on Ubuntu 18.04.
> > >
> > > \version "2.18.2"
> > > song = {
> > >     <e,  g'\3  b\2>  <a\5 g'\3 b\2>  <d\4 g\3 b\2> <a\5 g'\3 b\2>
> > > }
> > >
> > >   \score {
> > >   <<
> > > %   \override StringNumber #'transparent = ##t
> > >    \relative c'
> > >      {\song }
> > >    }

Using \relative here, and in this way, is very unwise³. If you want to
use \relative, use it in the definition of song, thus:
    song = \relative c' {
      e,, …
    }
or
    song = \relative e, {
      e …
    }
so that \song yields absolute-pitched music. This will force you to
use the correct constructions (which others demonstrated) because
    \relative c' {\song } }
(which looks like an attempt at transposing \song) is now impotent.

> > >    \new TabStaff
> > >     {\song}
> > >>>
> > > }
> >
> > Looks to me like you are entering everything an octave too high.  From
> > \relative c' the note e, just gives e while the lowest note of a guitar
> > is actually e, .
> >
> > You are aware that guitar notes written in treble clef sound an octave
> > lower than written?  "Correct" guitar notes are written using \clef
> > "treble_8" though a lot of notes abound not bothering spelling out the
> > octavation.
> >
> > But LilyPond does care about the actual pitch.  Check the Midi and
> > compare with your instrument.

¹ IOW,   { c }  ≢  \absolute { c }

  The use of \absolute doesn't seem to be well documented. In the
  2.19.83 versions, I see no occurrences in either NR or LM.
  Absolute and relative are indexed, but \relative is only indexed in
  LM and the command index of NR, and \absolute itself never appears.

² I used scare quotes because there might be sophisticated users
  who are happy to write unanchored notes and use them inside
  different \relative commands.

³ I think that some of the examples in LM may encourage people to use
  constructions that could cause people grief in the future. Look,
  for example, at § 3.2.1 p51 (the first fragment in the section with
  coloured notes). Enclosing such a construction in \relative,
  rather than using a separate \relative for each voice, does not
  scale to a longer piece of music.

Cheers,
David.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]