X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fsong.scm;h=410b3c89df99361cd1b9d75f4fdd11b6ab9bab8a;hb=dbad9a5ad3430ec0d7832f8854eb8cbb8195a6d8;hp=c5ecc89da623c3997866922ae7038e3c4a7bdf04;hpb=794dcbdb52faf4292036cd1b0270a956cf4316a3;p=lilypond.git diff --git a/scm/song.scm b/scm/song.scm index c5ecc89da6..410b3c89df 100644 --- a/scm/song.scm +++ b/scm/song.scm @@ -1,24 +1,22 @@ -;;; song.scm --- Festival singing mode output - -;; Copyright (C) 2006, 2007 Brailcom, o.p.s. - -;; Author: Milan Zamazal - -;; COPYRIGHT NOTICE - -;; This program 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 2 of the License, or -;; (at your option) any later version. - -;; This program 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 this program; if not, write to the Free Software -;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +;;;; song.scm --- Festival singing mode output +;;;; +;;;; This file is part of LilyPond, the GNU music typesetter. +;;;; +;;;; Copyright (C) 2006, 2007 Brailcom, o.p.s. +;;;; Author: Milan Zamazal +;;;; +;;;; 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 . (define-module (scm song)) @@ -87,7 +85,7 @@ ((note? object) (let ((pitch (ly:pitch-semitones (note-pitch object)))) (format #f "~a~a~a~a" - (cdr (assoc (modulo pitch 12) pp-pitch-names)) + (assoc-get (modulo pitch 12) pp-pitch-names) (let ((octave (+ (inexact->exact (floor (/ pitch 12))) 1))) (cond ((= octave 0) @@ -277,7 +275,7 @@ joined ; to the next note origin ) - + (defstruct rest duration origin @@ -424,7 +422,7 @@ count ; number of repetitions ) -(defstruct verse ; +(defstruct verse ; text ; separate text element (syllable or word) notelist/rests ; list of note lists (slurs) and rests (unfinished #f) ; whether to be merged with the following verse @@ -643,7 +641,7 @@ (warning (safe-car (if (null? note-list) consumed note-list)) "Unfinished slur: ~a ~a" context consumed)) (values (reverse consumed) note-list)))) - + (define (consume-skip-notes skip note-list context) ;; Returns either note list (skip word defined) or rest instance (no skip word) + new note-list. (assert (skip? skip)) @@ -773,7 +771,7 @@ (insert-lyrics! (get-lyrics (music-context-music music-context) context) score-list context) (debug "Final score list" score-list))) - music-context-list) + music-context-list) (extract-verses score-list))) @@ -786,7 +784,7 @@ (let* ((semitones (ly:pitch-semitones pitch)) (octave (inexact->exact (floor (/ semitones 12)))) (tone (modulo semitones 12))) - (format #f "~a~a" (cadr (assoc tone festival-note-mapping)) + (format #f "~a~a" (car (assoc-get tone festival-note-mapping)) (+ octave *base-octave* *base-octave-shift*)))) (define (write-header port tempo)