bug-lilypond
[Top][All Lists]
Advanced

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

lilypond book - no midi written


From: Clifford Racz
Subject: lilypond book - no midi written
Date: Fri, 21 Dec 2007 13:51:38 -0500
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

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  <address@hidden>
...
* 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")?





reply via email to

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