X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fpredefined-fretboards-init.ly;h=b6a60c085bbc8df32d78b9bb4991cded273ff264;hb=d9d72186ca281ea763cb2d50446a113ab0a26779;hp=df88ee79bf863665b0b4a7fe9828d6e41c8ce375;hpb=bb91de5b7f8c4f753452730101c2422946067cc3;p=lilypond.git diff --git a/ly/predefined-fretboards-init.ly b/ly/predefined-fretboards-init.ly index df88ee79bf..b6a60c085b 100644 --- a/ly/predefined-fretboards-init.ly +++ b/ly/predefined-fretboards-init.ly @@ -1,8 +1,19 @@ -%%%% predefined-fretboard-init.ly +%%%% This file is part of LilyPond, the GNU music typesetter. %%%% -%%%% source file of the GNU LilyPond music typesetter +%%%% Copyright (C) 2008--2010 Carl D. Sorensen %%%% -%%%% (c) 2008 Carl D. Sorensen +%%%% LilyPond is free software: you can redistribute it and/or modify +%%%% it under the terms of the GNU General Public License as published by +%%%% the Free Software Foundation, either version 3 of the License, or +%%%% (at your option) any later version. +%%%% +%%%% LilyPond is distributed in the hope that it will be useful, +%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%%%% GNU General Public License for more details. +%%%% +%%%% You should have received a copy of the GNU General Public License +%%%% along with LilyPond. If not, see . \version "2.12.0" @@ -21,8 +32,8 @@ addChordShape = #(define-music-function (parser location key-symbol tuning shape-definition) (symbol? pair? string-or-pair?) - "Add chord shape @code{shape-definition} to the @code{chord-shape-table} -hash with the key @code{(cons key-symbol tuning)}." + (_i "Add chord shape @var{shape-definition} to the @var{chord-shape-table} +hash with the key @var{(cons key-symbol tuning)}.") (hash-set! chord-shape-table (cons key-symbol tuning) shape-definition) @@ -35,19 +46,18 @@ hash with the key @code{(cons key-symbol tuning)}." % fretboard-table storePredefinedDiagram = -#(define-music-function (parser location chord tuning diagram-definition) - (ly:music? pair? string-or-pair?) - "Add predefined fret diagram defined by @code{diagram-definition} -for the chord pitches @code{chord} and -the stringTuning @code{tuning}." - (let* ((pitches (event-chord-pitches +#(define-music-function (parser location + fretboard-table chord tuning diagram-definition) + (hash-table? ly:music? pair? string-or-pair?) + (_i "Add predefined fret diagram defined by @var{diagram-definition} + for the chord pitches @var{chord} and the stringTuning @var{tuning}.") + (let* ((pitches (event-chord-pitches (car (extract-named-music chord 'EventChord)))) (hash-key (cons tuning pitches)) (verbose-definition (if (string? diagram-definition) (parse-terse-string diagram-definition) diagram-definition))) - (hash-set! fretboard-table - hash-key - verbose-definition)) - (make-music 'SequentialMusic 'void #t)) - + (hash-set! fretboard-table + hash-key + verbose-definition) + (make-music 'SequentialMusic 'void #t)))