lilypond-user
[Top][All Lists]
Advanced

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

Re: Chord library


From: Rick Hansen (aka RickH)
Subject: Re: Chord library
Date: Thu, 21 Dec 2006 12:45:52 -0800 (PST)



seb-g wrote:
> 
> Hi there,
> 
> I am working on a guitar chord library for lily [1] based on the
> \fret-diagram command.
> 
> The generator is written in python.
> 
> -- 
> Sebastien Gross
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 


Here is an example of my "non-programmers" approach to forming a chord
library: (note this example can only be run in version 2.11.4 or better due
to a crash issue)

<<<<<<<<<<<<<<<<<<<<< EXAMPLE BEGIN

% NOTE!! this must be run in 2.11.4 or better or it will abend (crash)

\version "2.11.2"
\include "english.ly"

varMyChordLibrary = {
% Major seventh chords
\tag #'Maj7     { \relative { <c e g b> } }
\tag #'Maj7_1   { \relative { <c\5 g' b e> } }
\tag #'Maj7_2   { \relative { <c\6 b' e g> } }
% Minor seventh chords
\tag #'Min7     { \relative { <c ef g bf> } }
\tag #'Min7_1   { \relative { <c\5 g' bf ef g> } }
\tag #'Min7_2   { \relative { <c\6 bf' ef g c> } }
% Dominant seventh chords
\tag #'Dom7     { \relative { <c e g bf> } }
\tag #'Dom7_1   { \relative { <g\6 e' bf' c> } }
% Diminished seventh chords
\tag #'Dim7     { \relative { <c ef gf bff> } }
\tag #'Dim7_1   { \relative { <bff\4 ef gf c> } }
}



\score {

   <<

   \new ChordNames \with {
          chordChanges = ##f
        chordNameSeparator = \markup { \hspace #0.45 }
   }
   {
        s4
        \transpose c a  \keepWithTag #'Maj7 \varMyChordLibrary
        \transpose c b  \keepWithTag #'Maj7 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Min7 \varMyChordLibrary
        \transpose c d  \keepWithTag #'Min7 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Dom7 \varMyChordLibrary
        \transpose c bf \keepWithTag #'Dim7 \varMyChordLibrary
   }

   \new Staff \with {
        \override Stem #'transparent = ##t
   }
   {
        #(set-accidental-style 'forget)
        \key c \major
        s4
        \transpose c a, \keepWithTag #'Maj7_1 \varMyChordLibrary
        \transpose c b, \keepWithTag #'Maj7_2 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Min7_1 \varMyChordLibrary
        \transpose c d  \keepWithTag #'Min7_2 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Dom7_1 \varMyChordLibrary
        \transpose c bf \keepWithTag #'Dim7_1 \varMyChordLibrary
   }

   \new FretBoards { \transpose c c, {
        s4
        \transpose c a, \keepWithTag #'Maj7_1 \varMyChordLibrary
        \transpose c b, \keepWithTag #'Maj7_2 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Min7_1 \varMyChordLibrary
        \transpose c d  \keepWithTag #'Min7_2 \varMyChordLibrary
        \transpose c c  \keepWithTag #'Dom7_1 \varMyChordLibrary
        \transpose c bf \keepWithTag #'Dim7_1 \varMyChordLibrary
        }
   }

   >>  % end music expression

   \layout {
         ragged-right = ##t
         ragged-last = ##t
           ragged-bottom = ##t
           ragged-last-bottom = ##t
                indent = 0.0\in
         \context { \Score
            \remove Bar_number_engraver
         }
         \context { \Staff
            \remove Clef_engraver
            \remove Time_signature_engraver
         }
         \context { \Voice
            \remove New_fingering_engraver
         }
         \context { \FretBoards
            \override FretBoard #'number-type = #'arabic
         }
   } % end layout

} % end score


<<<<<<<<<<<<<<<<<<<<< EXAMPLE END


-- 
View this message in context: 
http://www.nabble.com/Chord-library-tf2866120.html#a8014665
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

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