lilypond-user
[Top][All Lists]
Advanced

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

Re: Create a midi file when .ly don't have any \score tag


From: Jonathan Kulp
Subject: Re: Create a midi file when .ly don't have any \score tag
Date: Sun, 01 Mar 2009 09:08:01 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Sylvain MICHEL wrote:
Good afternoon,

I have a problem. I have generated a .ly file from a musicXML file but I don't
know where to write the \midi { } statement because there isn't any \score { ...
} in the file (it works because I generated pdf and png without errors). I am a
real beginner so I don't know what to do.

The file is the "elite" example from the musicxml website.

What can I do ?

Thank you for your help.

P.S : I join the generated file.



I didn't see your file attached, but try this and see if this helps. I looked at one of my own scores generated from musicXML and found that there's a nearly-complete score block at the bottom like this:

% The score definition
\new PianoStaff <<
    \set PianoStaff.instrumentName = "Piano 1"
    \set PianoStaff.shortInstrumentName = "Pno. 1"
    \context Staff = "1" <<
        \context Voice = "PartPOneVoiceOne" { \PartPOneVoiceOne }
        >> \context Staff = "2" <<
        \context Voice = "PartPOneVoiceTwo" { \PartPOneVoiceTwo }
        >>
    >>


To get midi output and a pdf score, I enclose this whole thing in a \score block, and then place the \midi {} and \layout {} blocks before the \score block's closing curly brace, like so:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\score {
\new PianoStaff <<
    \set PianoStaff.instrumentName = "Piano 1"
    \set PianoStaff.shortInstrumentName = "Pno. 1"
    \context Staff = "1" <<
        \context Voice = "PartPOneVoiceOne" { \PartPOneVoiceOne }
        >> \context Staff = "2" <<
        \context Voice = "PartPOneVoiceTwo" { \PartPOneVoiceTwo }
        >>
    >>
  \layout { }
  \midi { }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

If this doesn't solve your problem, please try again to attach your file. Best,

Jon
--
Jonathan Kulp
http://www.jonathankulp.com




reply via email to

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