Stop Tablature from moving up an octave

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Stop Tablature from moving up an octave

Bob Stricklin
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 }
   }
 
   \new TabStaff
   
    {\song}
>>
}

Output numbers only:

                0 0 0 0
                12 12 0 12

                0 0 0 0

I wish there was an ability to:

Select string and fret manually. Something like \3-0.

It would also be helpful to have a command like
\set TabStaff.maximumFret=#5       This would force the automatic code to remain in the first few frets.


Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

David Kastrup
Bob Stricklin <[hidden email]> 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 }
>    }
>  
>    \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.

--
David Kastrup
My replies have a tendency to cause friction.  To help mitigating
damage, feel free to forward problematic posts to me adding a subject
like "timeout 1d" (for a suggested timeout of 1 day) or "offensive".

Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

Pierre-Luc Gauthier
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.

Le sam. 15 févr. 2020 à 09:49, David Kastrup <[hidden email]> a écrit :

>
> Bob Stricklin <[hidden email]> 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 }
> >    }
> >
> >    \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.
>
> --
> David Kastrup
> My replies have a tendency to cause friction.  To help mitigating
> damage, feel free to forward problematic posts to me adding a subject
> like "timeout 1d" (for a suggested timeout of 1 day) or "offensive".
>

--
Pierre-Luc Gauthier

guitarIsTransposing.ly (964 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

Kieren MacMillan
Hi Pierre-Luc,

> \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> |
> }

Yes.

> guitarStaff = \transpose c c' {
>  % Here we transpose

NO! Instead, use a transposing clef:

  guitarStaff = {
    \clef "treble_8"
    \new Voice { \song }
  }

If for some (unknown!) reason you don’t want to see the "8", use \omit ClefModifier.

> For what it's worth, I wish somebody would have told me earlier
> that I should use absolute mode rather than relative.

<Kieren muffles a scream, trying not to point out the multiple list threads over nearly a decade where he’s been campaigning against relative mode, and been shut down by other people on the list>

Cheers,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

Bob Stricklin
Thanks to all for the excellent support an help.

It is clear to me now and I have it working properly.

Bob


Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

Pierre-Luc Gauthier
In reply to this post by Kieren MacMillan
Le sam. 15 févr. 2020 à 10:45, Kieren MacMillan
<[hidden email]> a écrit :

> > guitarStaff = \transpose c c' {
> >  % Here we transpose

> NO! Instead, use a transposing clef:

I guess people (and books) diverge in opinion here.
But I do not write bass parts with \clef "bass_8" neither guitar with
\clef "treble_8".
In my non transposing conductor scores though I explicitely use
"bass_8" for basses and "treble_8" for guitars.

--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: Stop Tablature from moving up an octave

Kieren MacMillan
Hi Pierre-Luc,

>> NO! Instead, use a transposing clef:
>
> I guess people (and books) diverge in opinion here.
> But I do not write bass parts with \clef "bass_8" neither guitar with
> \clef "treble_8".

That’s fine, from a visual perspective — just turn off the ClefModifier.

The problem I see with your code is similar to the [main] problem with relative mode: if you try to reuse your guitarStaff, the notes will be the wrong ones. With my version, the notes are the correct ones.

Cheers,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Transposing instruments

Pierre-Luc Gauthier
Hello again Kieren,

Sort of a pedantic conversation here but anyway, the way I manage
transposition is  :

I write music somewhere :

piccolo = { c'''4 }
clarinet = { c''4 }
violin = { c'' }
guitar = { e, }
bass = { e,, }
\addQuote "x" \x

Then I define the parts :

piccoloPart = \transpose c' c { \tranposition c'' …}
piccoloScore = \clef "treble^8" …
hornPart = \transpose f c' { \transposition f …}
hornScore = \clef alto …

Transposition is an instrument problem. Guitarist and bassist expect a
treble and a bass clef.

If I'm transposing for, say, the clarinet part in A of Bf, why should
I not transpose the bass part?

Le sam. 15 févr. 2020 à 10:56, Kieren MacMillan
<[hidden email]> a écrit :
> if you try to reuse your guitarStaff…

This guitarStaff is made to be displayed to a guitarist expected to
play a guitar. Not to be used anywhere else.

> the notes will be the wrong ones

Transposed notes for a Bf clarinet are not the wrong notes.

I guess my point is : guitar, piccolo and basse are no different to me
than clarinets, horns, english horns, etc.

I now feel a weight have been lifted from my shoulders.
--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

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

David Wright
In reply to this post by Pierre-Luc Gauthier
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 <[hidden email]> a écrit :
> > Bob Stricklin <[hidden email]> 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.