X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fchord-entry.scm;h=d8587dcf839cefc843f734c9abf97ed6af6b993c;hb=278124fbbfbf99756bcdc9274838034e11cf43e4;hp=17735e6aca75057bb0b6b89eb8733c2ea7fa3977;hpb=5351678f4821374c9cbaf55b92cd35436d786c1d;p=lilypond.git diff --git a/scm/chord-entry.scm b/scm/chord-entry.scm index 17735e6aca..d8587dcf83 100644 --- a/scm/chord-entry.scm +++ b/scm/chord-entry.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2004--2010 Han-Wen Nienhuys +;;;; Copyright (C) 2004--2012 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 @@ -15,14 +15,16 @@ ;;;; You should have received a copy of the GNU General Public License ;;;; along with LilyPond. If not, see . +; for define-safe-public when byte-compiling using Guile V2 +(use-modules (scm safe-utility-defs)) + (define-public (construct-chord-elements root duration modifications) - " Build a chord on root using modifiers in MODIFICATIONS. NoteEvents -have duration DURATION. + "Build a chord on root using modifiers in @var{modifications}. +@code{NoteEvents} have duration @var{duration}. -Notes: natural 11 is left from chord if not explicitly specified. +Notes: Natural 11 is left from chord if not explicitly specified. -Entry point for the parser. -" +Entry point for the parser." (let* ((flat-mods (flatten-list modifications)) (base-chord (stack-thirds (ly:make-pitch 0 4 0) the-canonical-chord)) (complete-chord '()) @@ -33,7 +35,7 @@ Entry point for the parser. (start-additions #t)) (define (interpret-inversion chord mods) - "Read /FOO part. Side effect: INVERSION is set." + "Read /FOO part. Side effect: INVERSION is set." (if (and (> (length mods) 1) (eq? (car mods) 'chord-slash)) (begin (set! inversion (cadr mods)) @@ -41,7 +43,7 @@ Entry point for the parser. (interpret-bass chord mods)) (define (interpret-bass chord mods) - "Read /+FOO part. Side effect: BASS is set." + "Read /+FOO part. Side effect: BASS is set." (if (and (> (length mods) 1) (eq? (car mods) 'chord-bass)) (begin (set! bass (cadr mods)) @@ -61,7 +63,7 @@ Entry point for the parser. (interpret-inversion chord mods))) (define (interpret-additions chord mods) - "Interpret additions. TODO: should restrict modifier use?" + "Interpret additions. TODO: should restrict modifier use?" (cond ((null? mods) chord) ((ly:pitch? (car mods)) (if (= (pitch-step (car mods)) 11) @@ -236,7 +238,7 @@ DURATION, and INVERSION." '(1 3 5 7 9 11 13))) (define (stack-thirds upper-step base) - "Stack thirds listed in BASE until we reach UPPER-STEP. Add + "Stack thirds listed in BASE until we reach UPPER-STEP. Add UPPER-STEP separately." (cond ((null? base) '()) ((> (ly:pitch-steps upper-step) (ly:pitch-steps (car base)))