lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parser diagnostics - failing to recognise \on-the-fly arguments as proce


From: Ian Hulin
Subject: Parser diagnostics - failing to recognise \on-the-fly arguments as procedure type.
Date: Fri, 04 Jan 2013 20:37:26 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi all
Firstly apologies if I've not done too much investigation into this but
I'm currently working off my netbook from hospital.

I've been using Mark Wilmer's LyUtil package which looks really useful,
but I want to see whether the coe has uncovered something that gets the
parser confused.

LyUtil kicks off with a music function entry point with this inerface
definition

#(define* (ly-score:process prefix scorehead parthead
  movements instruments
  #:key transpose? include-parts? include-score? include-midi?
   (score-size 12) (part-size 24)                                  (score-paper 
#{ \paper
{} #})
(part-paper #{ \paper {} #})
(score-layout #{ \layout {} #}) (part-layout #{ \layout {} #})
(part-overrides '())
(frontmatter #{ \markuplist {} #}))

   (set-paper-staff-size score-paper score-size)
   (set-paper-staff-size part-paper part-size)
   (if include-score?
       (with-fluids ((ignore-cues? #t))
         (let ((score-book
           #{ \book { \paper { $score-paper }
                \markuplist { $frontmatter } } #}))
           (for-each
            (lambda (el)
              (ly:book-add-score!
               score-book
               (ly-score:make-score (car el) (cadr el)
                 instruments #t transpose? score-layout include-midi?)))
            movements)
           (ly:book-set-header! score-book (ly-score:alist->module scorehead))
           (ly:book-process score-book score-paper score-layout prefix))))
   (if include-parts?
       (ly-score:process-part prefix parthead movements instruments
part-layout part-paper part-overrides)))

i
However, if I code the #:score-paper parameter with is sort of thing:

 #:score-paper
    #{
      \paper {
        #(set-paper-size "a3")
        oddFooterMarkup =  \markup{
           \fill-line{ \fromproperty #'header:title
              \center-column {
                \on-the-fly #first-page
                  \fromproperty #'header:publisher
                  \on-the-fly #last-page
                   \fromproperty #'header:copyright
                   \fromproperty #'header:tagline
                    }
            \bold \fontsize #3 %\on-the-fly #not-first-page
            \fromproperty #'page:page-number-string
        }
     }
  #}

Gives these diagnosics:

Processing
`/home/ian/Dropbox/MusicScoresDevelopment/ZadokThePriest/Coronation
Anthem 1.ly'
Parsing...
/home/ian/Dropbox/MusicScoresDevelopment/ZadokThePriest/Coronation
Anthem 1.ly:236:39: error: GUILE signaled an error for the expression
beginning here
                          \on-the-fly #
                                       first-page
/home/ian/Dropbox/MusicScoresDevelopment/ZadokThePriest/Coronation
Anthem 1.ly:236:38: error: wrong type for argument 1.  Expecting
procedure, found #<unspecified>
                          \on-the-fly
                                      #first-page
/home/ian/Dropbox/MusicScoresDevelopment/ZadokThePriest/Coronation
Anthem 1.ly:79:1: error: GUILE signaled an error for the expression
beginning here
#
 (ly-score:process
Unbound variable: first-page
Wrong type argument in position 1: (#<unspecified> . #f)
fatal error: failed files:
"/home/ian/Dropbox/MusicScoresDevelopment/ZadokThePriest/Coronation
Anthem 1.ly"
Exited with return code 1.

I suspect this could be a LilyPond bug rather than LyUtils.  Would
anyone with better access to resources have an opportunity to investigate.

Cheers and a Happy New Year to all 'Ponders
Ian Hulin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]