lilypond-user
[Top][All Lists]
Advanced

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

Re: Fretboard consistency


From: Carl D. Sorensen
Subject: Re: Fretboard consistency
Date: Wed, 29 Oct 2008 09:48:49 -0600



On 10/28/08 10:28 PM, "Jesús Guillermo Andrade" <address@hidden>
wrote:

> This is the full code. Please note that the forth, fifth and sixth frets look
> different. Is this a normal behaviour? IMHO this should not happen because of
> the fact that is evident that I have set up global modifications to the
> fingering dots and the style for them.
>
> Why cant they look with the same style and settings? Thanks again for your
> kind help.
>

When I ran this file, I only found 5 fret diagrams.  And the first four
looked the same; it was just the fifth that was different.

The reason the fifth was different was because you told it to be:

>       {<b\4 d\3 g\2 b,\1>     ^\markup \fret-diagram
> #"d:0.45;f:2;4-2-2;2-1-1;"}
>

The "f:2;" entry adjusts where the fingering will be.  Once I removed it, I
got all of the fret diagrams looking the same.

I think that there's a much easier way to code this so that things will be
consistent.  You want to pass the exact same music to each of the contexts
(ChordNames, Staff, FretBoards, and TabStaff).  This will require you to add
a FretBoards context and get rid of the markups, but it will also make it
much easier to typeset this kind of music.

I haven't been able to get the ChordNames context to work the way I'd like
it to yet, so I needed to have two  different sets of music:  one with the
LilyPond chord naming convention for the ChordNames context, and a second
with defined variables for use in the Staff, FretBoards, and TabStaff
context.

I've rewritten your code with these changes below.

I hope this is helpful for you; it was good practice for me to figure out
how to do it.

Carl Sorensen

%%%%%   Begin LilyPond Code

\version "2.11.62"

% add FretBoards for the Cuatro
%   Note: This section could be put into a separate file
%      predefined-cuatro-fretboards.ly
%      and \included into each of your compositions
%   Note:  You will want to create a predifined diagram for all of the
%      chords available on the Cuatro, but you can start with
%      just the chords you use

cuatroTuning = #'(11 18 14 9)

dSix = {<a\4 b\1 d\3 fis\2> }
dMajor = { <a\4 d\1 d\3 fis \2> }
aMajSeven = {<a\4 cis\1 e\3 g\2>}
dMajSeven = {<a\4 c\1 d\3 fis\2>}
gMajor = {<b\4 b\1 d\3 g\2>}

\storePredefinedDiagram \dSix
                        #cuatroTuning
                        #"o;o;o;o;"
\storePredefinedDiagram \dMajor
                        #cuatroTuning
                        #"o;o;o;3-3;"
\storePredefinedDiagram \aMajSeven
                        #cuatroTuning
                        #"o;2-2;1-1;2-3;"
\storePredefinedDiagram \dMajSeven
                        #cuatroTuning
                        #"o;o;o;1-1;"
\storePredefinedDiagram \gMajor
                        #cuatroTuning
                        #"2-2;o;1-1;o;"

% end of potential include file /predefined-cuatro-fretboards.ly


#(set-global-staff-size 16)

\header {
  title = "Acordes para el Cuatro Venezolano"
  opus = "En primera posicion"
  composer = "J.G. Andrade"
}

primerosNames = \chordmode {
  d:6 d a:maj7 d:maj7
  g
}
primeros = {
  \dSix \dMajor \aMajSeven \dMajSeven
  \gMajor
}

\score {
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \primerosNames
    }

    \new Staff {
      \new Voice \with {
        \remove New_fingering_engraver
      }
      \relative c'' {
        \primeros
      }
    }


    \new FretBoards {
      \set stringTunings = #cuatroTuning
      \override FretBoard #'fret-diagram-details
        #'string-count = #'4
      \override FretBoard #'fret-diagram-details
        #'finger-code = #'in-dot
      \primeros
    }

    \new TabStaff \relative c'' {
      \set TabStaff.stringTunings = #cuatroTuning
      \primeros
    }

  >>

  \layout {
    \context {
      \Score
      \override SpacingSpanner
      #'base-shortest-duration = #(ly:make-moment 1 16)
    }

  }
  \midi { }
}

%%%%%% End LilyPond Code





reply via email to

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