lilypond-user
[Top][All Lists]
Advanced

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

Re: Fret diagram position


From: Carl D. Sorensen
Subject: Re: Fret diagram position
Date: Thu, 22 Jan 2009 17:14:28 -0700

Marius,

See my answers below.


On 1/22/09 3:22 PM, "Marius Andersen" <address@hidden> wrote:

> I want to set a piece for guitar with LilyPond version 2.12.1. The score
> should have three staves: sung melody, guitar regular notes, and guitar
> tablature. Here is my basic starting point (my verbose ending point is
> provided in full at the end of this message):
> 
>     \version "2.12.1"


Since the guitar notes (on the staff) and the guitar notes on the tab should
be the same notes, you shouldn't enter them twice.

It would be better to define a variable guitarNotes:

      guitarNotes = relative c {
        g'4\3 g\3 g\3 g\3
      }

This will create two problems:
1.  You don't want to have string numbers show up on your guitar notes
(maybe)
2.  The guitar notes are an octave lower than they're usually written in  a
treble clef

We'll fix both of those problems below.


>  
>     \score {
>       <<
>         \new Voice = "mel" {
>           \relative c' {
>             %% Sung notes go here
>             R1
>           }
>         }
>         \new StaffGroup <<

To eliminate the string numbers, we have two choices:  we can eliminate the
New_fingering_engraver, which creates string numbers and fingering
indications:

          \new Staff \with {remove New_fingering_engraver} {

or we can leave the engraver there, and just turn off the string numbers by
setting the stencil to false:

>           \new Staff {
              \override StringNumber #'stencil = ##f

To fix the problem of the notes appearing in the wrong place on the treble
staff, we change the clef, as shown in the Notation Reference section 2.4.2:

              \clef "treble_8"

Here, we just use guitarNotes:

              \guitarNotes
>           }
>           \new TabStaff {

And we can just use guitarNotes in the TabStaff, too:

              \guitarNotes
>           }
>>> 
>>> 
>     }
> 

> In addition, I want to annotate the piece with fret diagrams, to provide a
> basis for custom strumming/improvisation. If I define
> 

Now that we have predefined fret diagrams, you should plan on *always* using
the FretBoards context.  The only time you should ever use a markup fret
diagram is if you want to use it in a markup for another reason.

So at the top of your file, put the line:

\include "predefined-guitar-fretboards.ly"

Then define a variable that holds the chords to be played:

myChords = \chordmode {
  g1
}

And change your overall structure to

\score {
  <<
    \new FretBoards {
      \myChords
    }
    \new Staff {
      \new Voice {
         *melody goes here
      }
    }
    \new StaffGroup <<
      \new Staff {
        *guitar music goes here
      }
      \new TabStaff {
        *guitar music goes here, too
      }
    >>
  >>
}

This should resolve all of your problems, I think.

HTH,

Carl







reply via email to

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