]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/harp-pedals.scm
Issue 5148/1: Various chain-assoc-get -> #:properties
[lilypond.git] / scm / harp-pedals.scm
index ea5db93f181befecdcbe970f3c9432f15b7cd19d..58576a31481e8493aa661143e4f206f184ef9b02 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2008--2012 Reinhold Kainhofer <reinhold@kainhofer.com>
+;;;; Copyright (C) 2008--2015 Reinhold Kainhofer <reinhold@kainhofer.com>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ spacing after the divider).
          (details (begin (harp-pedal-check pedal-list) harp-pedal-details))
          (dy (* size (assoc-get 'box-offset details 0.8))) ; offset of the box center from the line
          (line-width (* (ly:output-def-lookup layout 'line-thickness)
-                        (chain-assoc-get 'thickness props 0.5)))
+                        thickness))
          (box-width (* size (assoc-get 'box-width details 0.4)))
          (box-hheight (* size (/ (assoc-get 'box-height details 1.0) 2))) ; half the box-height, saves some divisions by 2
          (spacebeforedivider (* size (assoc-get 'space-before-divider details 0.8))) ; full space between boxes before the first divider
@@ -132,6 +132,7 @@ spacing after the divider).
            stencils)))
 
 ;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o and #\|
+;; Whitespace is removed from definition string before the procedure applies.
 (define (harp-pedals-parse-string definition-string)
   "Parse a harp pedals diagram string and return a list containing 1, 0, -1, #\\o or #\\|"
   (map (lambda (c)
@@ -141,7 +142,7 @@ spacing after the divider).
            ((#\-) 0)
            ((#\| #\o) c)
            (else c)))
-       (string->list definition-string)))
+       (string->list (remove-whitespace definition-string))))
 
 
 ;; Analyze the pedal-list: Return (pedalcount . (divider positions))