I posted to the usergroup and asked if anyone had a work around... no
replies. I saw in the usergroup mailing archives that Christian Torff
wrote twice regarding this issue:
Mon, 17 Jul 2006 05:19:47 -0700
Thu, 22 Jun 2006 11:41:03 -0700
So, I tried to make it as easy as possible on a developer who might be
able to trace this problem. Let me know what else I can do to help fix it.
I am using v. 2.10.33 and I am getting no midi output when using
LilyPond-book (i.e. \include "lilypond-book-preamble.ly" )
I do not have a development setup for LilyPond, so I cannot compile and
test this. However, I did look a bit in the source...
-------------------------------------------------------------------------------
The change log states:
...
2005-08-21 Han-Wen Nienhuys <[EMAIL PROTECTED]>
...
* lily/paper-book.cc (output): call paper-book-write-midis directly:
always write MIDI, even if no \layout {} block.
-------------------------------------------------------------------------------
Perhaps this is related? The file paper-book.cc has the only call I can
find for paper-book-write-midis
...
Paper_book::output (SCM output_channel)
{
if (scm_is_pair (performances_))
{
SCM proc = ly_lily_module_constant ("paper-book-write-midis");
scm_call_2 (proc, self_scm (), output_channel);
}
...
-------------------------------------------------------------------------------
I put a STDERR command in the scheme file midi.scm
...
(define-public (paper-book-write-midis paper-book basename)
(stderr "Racz: paper-book-write-midis was called ")
(let
loop
((perfs (ly:paper-book-performances paper-book))
(count 0))
...
-------------------------------------------------------------------------------
It seems to be related to the statement:
#(set! toplevel-score-handler print-score-with-defaults)
Found in lilypond-book-preamble.ly
The output of the following two files demonstrates how it breaks.
-------------------------------------------------------------------------------
%Example produces midi but breaks the book layout of the graphics
\version "2.10.33"
%The following statements are equivalent to the book preamble
%\include "lilypond-book-preamble.ly"
% BEGIN book-preamble statements
%#(set! toplevel-score-handler print-score-with-defaults)
#(set! toplevel-music-handler
(lambda (p m)
(if (not (eq? (ly:music-property m 'void) #t))
(print-score-with-defaults
p (scorify-music m p)))))
#(ly:set-option (quote no-point-and-click))
#(define inside-lilypond-book #t)
#(define version-seen #t)
% END book-preamble statements
\score {
\context PianoStaff <<
\new Staff = "treble" << \relative c'' { a b c d e f g a' } >>
>>
\layout { }
\midi { }
}
-------------------------------------------------------------------------------
%Example not producing midi but book layout is fine
\version "2.10.33"
%The following statements are equivalent to the book preamble
%\include "lilypond-book-preamble.ly"
% BEGIN book-preamble statements
#(set! toplevel-score-handler print-score-with-defaults)
#(set! toplevel-music-handler
(lambda (p m)
(if (not (eq? (ly:music-property m 'void) #t))
(print-score-with-defaults
p (scorify-music m p)))))
#(ly:set-option (quote no-point-and-click))
#(define inside-lilypond-book #t)
#(define version-seen #t)
% END book-preamble statements
\score {
\context PianoStaff <<
\new Staff = "treble" << \relative c'' { a b c d e f g a' } >>
>>
\layout { }
\midi { }
}
-------------------------------------------------------------------------------
Is there a fix for this problem, or is it truly a bug (or a "feature")?
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond