Il giorno mer 20 lug 2016 alle 16:14, Mojca Miklavec
<mojca.miklavec.li...@gmail.com> ha scritto:
I wanted to test the conversion from midi to Lilypond. I took a midi
file generated with LilyPond, converted it to LilyPond with
arch -32
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python
/Applications/LilyPond.app/Contents/Resources/bin/midi2ly test.midi
(I didn't find any more intuitive way to do the conversion)
But then lilypond failed to process the generated ly file:
lilypond test-midi.ly
GNU LilyPond 2.19.44
Processing `test-midi.ly'
Parsing...
test-midi.ly:16:32: warning: non-UTF-8 input
\set Staff.instrumentName = "
??a
test-midi.ly:16:33: warning: non-UTF-8 input
\set Staff.instrumentName = "?
?a
test-midi.ly:16:32: error: EOF found inside string
\set Staff.instrumentName = "
??a
test-midi.ly:16:32: error: syntax error, unexpected end of input
\set Staff.instrumentName = "
??a
fatal error: failed files: "test-midi.ly"
This is easy to work around by deleting / manually changing the
instrument name, but it's weird enough that LilyPond cannot process
its own files.
Hi Mojca
It's an issue with your system.
The file format of test-midi.ly is wrong:
$ file tmp/test.ly
tmp/test.ly: ASCII text
$ file tmp/test-midi.ly
tmp/test-midi.ly: data
in particular this line:
\set Staff.instrumentName = "\FE\FFa
\00u\00r\00e\00k"
Find attached my (correct) .ly file generated from the MIDI file.
% Lily was here -- automatically converted by /home/fede/.local/lilypond/usr/bin/midi2ly from test.midi
\version "2.14.0"
\layout {
\context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
\remove "Rest_engraver"
\consists "Completion_rest_engraver"
}
}
trackAchannelA = {
\set Staff.instrumentName = "urek"
% [TEXT_EVENT] creator:
% [TEXT_EVENT] GNU LilyPond 2.19.44
\time 4/4
\tempo 4 = 100
}
trackA = <<
\context Voice = voiceA \trackAchannelA
>>
trackBchannelA = {
\set Staff.instrumentName = "\new:melody"
}
trackBchannelB = \relative c {
c'4 a' c, a'
| % 2
}
trackB = <<
\context Voice = voiceA \trackBchannelA
\context Voice = voiceB \trackBchannelB
>>
\score {
<<
\context Staff=trackB \trackA
\context Staff=trackB \trackB
>>
\layout {}
\midi {}
}
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond