[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lilypond book - no midi written
From: |
Graham Percival |
Subject: |
Re: lilypond book - no midi written |
Date: |
Sat, 22 Dec 2007 01:59:32 -0800 |
I'm not certain that I understand -- this example works fine for
me, albeit in 2.11.36. Could you check with that version?
----
\documentclass[]{article}
\begin{document}
Normal LaTeX text.
\begin{lilypond}
\score{
\relative c'' {
a4 b c d
}
\layout{}
\midi{}
}
\end{lilypond}
More LaTeX text.
\end{lilypond}
\end{document}
----
tsubasa:~/tmp gperciva$ lilypond-book foo.lytex
...
tsubasa:~/tmp gperciva$ ls *.midi
lily-87d1476353.midi
Cheers,
- Graham
On Fri, 21 Dec 2007 13:51:38 -0500
Clifford Racz <address@hidden> wrote:
> 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")?
>
>
>
> _______________________________________________
> bug-lilypond mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-lilypond