performance header content

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

performance header content

Dan Eble
You're not going to be able to run this because you don't have the after-writing callback that it requires, but I hope that it is unnecessary to run this to answer my question.

What I have seen while testing this is that the header returned by (ly:performance-header performance) contains only the items from the score headers.  For example, it does not contain winkle.  Is that expected, and if so, is there a path I can follow from the performance to find winkle?

Thanks.

Dan

\version "2.21.1"

\header {
  texidoc = "The @code{after-writing} callback ..."
  winkle = "winkle"
  punctA = ", "
}

\midi {
  after-writing = #(lambda (performance filename)
                    (let* ((header (ly:performance-header performance))
                           (pavar (module-variable header 'punctA))
                           (pbvar (module-variable header 'punctB))
                           (wvar (module-variable header 'winkle))
                           (pa (variable-ref pavar))
                           (pb (variable-ref pbvar))
                           (w (variable-ref wvar)))
                     (ly:warning "~a: ~a~a~a~a" filename w pa w pb)))
}

#(ly:set-option 'warning-as-error #t)
#(ly:expect-warning "midi-after-writing.midi: winkle-winkle?")
#(ly:expect-warning "midi-after-writing-1.midi: winkle, winkle!")

\score {
  \header { punctA = "-" punctB = "?" }
  \midi { }
  { c''1 }
}

\score {
  \header { punctB = "!" }
  \midi { }
  { d''1 }
}


Reply | Threaded
Open this post in threaded view
|

Re: performance header content

Dan Eble
On Apr 15, 2020, at 19:41, Dan Eble <[hidden email]> wrote:
>
> What I have seen while testing this is that the header returned by (ly:performance-header performance) contains only the items from the score headers.

https://sourceforge.net/p/testlilyissues/issues/5917/

Dan