X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Ftranslation-functions.scm;h=49d8768eb40500c9b1a65c1e9625adfb66e43f9e;hb=94dc452301cc0d1e9983f5aeb784884f7fe8c964;hp=665d259743700ae6488b83d6403a7e1a5eb99c2b;hpb=db69afd9c8838e4e6cffb2d2bc18b5f07c512014;p=lilypond.git diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 665d259743..49d8768eb4 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -20,10 +20,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; clefs -(define-public (clef-octavation-markup oct style) - "The octavation sign formatting function. @var{oct} is supposed to be -a string holding the octavation number, @var{style} determines the -way the octavation number is displayed." +(define-public (clef-transposition-markup oct style) + "The transposition sign formatting function. @var{oct} is supposed to be +a string holding the transposition number, @var{style} determines the +way the transposition number is displayed." (let* ((delim (if (symbol? style) (case style ((parenthesized) (cons "(" ")")) @@ -338,24 +338,18 @@ if no fingering is present." (define (close-enough fret) "Decide if @var{fret} is acceptable, given the already used frets." - (if (null? specified-frets) - #t - (reduce - (lambda (x y) - (and x y)) - #t - (map (lambda (specced-fret) - (or (eq? 0 specced-fret) - (eq? 0 fret) - (>= maximum-stretch (abs (- fret specced-fret))))) - specified-frets)))) + (every (lambda (specced-fret) + (or (zero? specced-fret) + (zero? fret) + (>= maximum-stretch (abs (- fret specced-fret))))) + specified-frets)) (define (string-qualifies string pitch) "Can @var{pitch} be played on @var{string}, given already placed notes?" (let* ((fret (calc-fret pitch string tuning))) (and (or (and (not restrain-open-strings) - (eq? fret 0)) + (zero? fret)) (>= fret minimum-fret)) (integer? fret) (close-enough fret)))) @@ -364,7 +358,7 @@ notes?" "Is @var{pitch} and open-string note on @var{string}, given the current tuning?" (let* ((fret (calc-fret pitch string tuning))) - (eq? fret 0))) + (zero? fret))) (define (set-fret! pitch-entry string finger) (let ((this-fret (calc-fret (car pitch-entry) @@ -400,7 +394,7 @@ the current tuning?" (for-each (lambda (pitch-entry string-fret-finger) (let* ((string (list-ref string-fret-finger 0)) - (finger (if (eq? (length string-fret-finger) 3) + (finger (if (= (length string-fret-finger) 3) (list-ref string-fret-finger 2) '())) (pitch (car pitch-entry)) @@ -408,8 +402,8 @@ the current tuning?" #f finger))) (if (or (not (null? string)) - (eq? digit 0)) - (if (eq? digit 0) + (eqv? digit 0)) + (if (eqv? digit 0) ;; here we handle fingers of 0 -- open strings (let ((fit-string (find (lambda (string) @@ -458,7 +452,7 @@ the current tuning?" (let* ((string-fret-finger (list-ref string-fret-fingers (cdr pitch-entry))) (string (list-ref string-fret-finger 0)) - (finger (if (eq? (length string-fret-finger) 3) + (finger (if (= (length string-fret-finger) 3) (list-ref string-fret-finger 2) '())) (pitch (car pitch-entry))