lilypond-user
[Top][All Lists]
Advanced

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

Re: how to display a predefined guitar fretboard inside a \markup block


From: pls
Subject: Re: how to display a predefined guitar fretboard inside a \markup block
Date: Sun, 26 Jan 2014 22:04:24 +0100


On 26.01.2014, at 21:00, Federico Bruni <address@hidden> wrote:

There's a way to display a predefined guitar fretboard inside a \markup block?
See below an example of a simple leadsheet: I want to display the chord fretboards below the title. I'm defining the fretboards with \fret-diagram commands, but I wonder if I can avoid it and use the definitions in predefined-guitar-fretboards.ly
You could use a \score block within a \markup block like so:

GuitarFretBoards = \markup {
  \score { %Begin score for FretBoards 
  %\layout {\indent = 6\cm}
      <<
      \new ChordNames {
        \set chordChanges = ##t
          \chordmode {
            c1
            a1:m
            g1:7
            c1:7
            f1
          
          } %end chordmode
      } %end ChordNames
      
      \new FretBoards {
        %\set chordChanges = ##t
          \chordmode {
            c1
            a,1:m
            g,1:7
            c1:7
            f,1
          } %end chordmode
      } %end FretBoards
      >>
    } %end score for FretBoards
}

hth
patrick

\version "2.18.0"

myChords = \chordmode {
  g2 e:m7
  a:m7 d:7
}

myLyrics = \lyricmode {
  "This is"2 "my song, "
  "sing with" "me"
}

GuitarFretBoards = \markup {
  \column { "G" \fret-diagram-terse #"3;2;o;o;o;3;" }
  \column { "Em7" \fret-diagram-terse #"o;2;2;o;3;o;" }
}

\bookpart {
  \header {
    title = "Title"
  }
  \paper {
    markup-system-spacing = #'((padding . 10))
  }
  \GuitarFretBoards
  \score {
    <<
      \new ChordNames { \myChords }
      \new Lyrics { \myLyrics }
    >>
    \layout {
      indent = 0
      line-width = 110
      ragged-right = ##f
    }
  }
}
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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