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
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user