X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fparser-clef.scm;h=2f17701d4672f6d492885368207f3bf8fd716cd2;hb=223ad8f5799657a5b628d862dd927f4197486b02;hp=ede242b4aa9cb29056bb61198b960745563ee75b;hpb=ec538f9d8b43800a6529afee25819d8476d5a08a;p=lilypond.git diff --git a/scm/parser-clef.scm b/scm/parser-clef.scm index ede242b4aa..2f17701d46 100644 --- a/scm/parser-clef.scm +++ b/scm/parser-clef.scm @@ -1,8 +1,19 @@ -;;;; clef.scm -- Clef settings +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter +;;;; Copyright (C) 2004--2010 Han-Wen Nienhuys ;;;; -;;;; (c) 2004--2007 Han-Wen Nienhuys +;;;; 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 . ;; (name . (glyph clef-position octavation)) @@ -109,15 +120,15 @@ (set! oct (* (if (equal? (match:substring match 2) "^") -1 1) (- (string->number (match:substring match 3)) 1))))) - (set! e (assoc clef-name supported-clefs)) - (if (pair? e) + (set! e (assoc-get clef-name supported-clefs)) + (if e (let* ((musics (map make-prop-set - `(((symbol . clefGlyph) (value . ,(cadr e))) + `(((symbol . clefGlyph) (value . ,(car e))) ((symbol . middleCClefPosition) (value . ,(+ oct - (caddr e) - (cdr (assoc (cadr e) c0-pitch-alist))))) - ((symbol . clefPosition) (value . ,(caddr e))) + (cadr e) + (assoc-get (car e) c0-pitch-alist)))) + ((symbol . clefPosition) (value . ,(cadr e))) ((symbol . clefOctavation) (value . ,(- oct)))))) (recalc-mid-C (make-music 'ApplyContext)) (seq (make-music 'SequentialMusic @@ -132,3 +143,10 @@ (sort (map car supported-clefs) string