%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/setting-up-predefined-fretboards-for-other-instruments.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.25.3"

\header {
%% Translation of GIT committish: c043783aac6c35926d633aa2daf60ed4f2e7ca7a
  texidocfr = "
La liste des diagrammes standards prédéfinis pour la guitare peut être
augmentée d'autres définitions spécifiques à d'autres instruments. Voici
comment définir un nouvel accordage ainsi que quelques diagrammes
prédéfinis pour le « cuatro vénézuélien ».

Cet exemple illustre aussi la manière d'ajouter des doigtés aux
accords ; ils serviront de référence pour la boucle d'accord et seront
indiqués dans les diagrammes et le @code{TabStaff}, mais pas dans la
musique.

Ces diagrammes ne peuvent pas être transposés, dans la mesure où ils
contiennent des informations sur les cordes. Ceci est amené à évoluer.
"

  doctitlefr = "Création de diagrammes de fret prédéfinis pour d'autres instruments"

  categories = "Fretted strings"

  texidoc = "
Predefined fret diagrams can be added for new instruments in addition
to the standard diagrams used for guitar. This file shows how this is
done by defining a new string tuning and a few predefined fretboards
for the Venezuelan @emph{cuatro}.

This file also shows how fingerings can be included in the chords used
as reference points for the chord lookup, and displayed in the fret
diagram and the @code{TabStaff}, but not the music.

These fretboards are not transposable because they contain string
information. This is planned to be corrected in the future.
"

  doctitle = "Setting up predefined fretboards for other instruments"
} % begin verbatim


% Add fretboards for the cuatro.
%
%   Note: This section could be put into a separate file
%         `predefined-cuatro-fretboards.ly`
%         and be \included into each of your compositions.

cuatroTuning = #`(,(ly:make-pitch 0 6 0)
                  ,(ly:make-pitch 1 3 SHARP)
                  ,(ly:make-pitch 1 1 0)
                  ,(ly:make-pitch 0 5 0))

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 #default-fret-table \dSix
                        #cuatroTuning
                        "o;o;o;o;"
\storePredefinedDiagram #default-fret-table \dMajor
                        #cuatroTuning
                        "o;o;o;3-3;"
\storePredefinedDiagram #default-fret-table \aMajSeven
                        #cuatroTuning
                        "o;2-2;1-1;2-3;"
\storePredefinedDiagram #default-fret-table \dMajSeven
                        #cuatroTuning
                        "o;o;o;1-1;"
\storePredefinedDiagram #default-fret-table \gMajor
                        #cuatroTuning
                        "2-2;o;1-1;o;"

% End of potential include file `predefined-cuatro-fretboards.ly`.


#(set-global-staff-size 16)

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 Staff.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 =
        \musicLength 16
    }
  }
  \midi { }
}



% ****************************************************************
% end ly snippet
% ****************************************************************
