> On Feb 24, 2017, at 7:47 AM, lilypond-user-requ...@gnu.org wrote: > > Am 24.02.2017 um 02:15 schrieb Joseph Austin: >> This raises another question. I'm working with MIDI files, >> and it's not clear how to encode UTF-8 text in MIDI. >> There must be some convention, but I haven't found an official RP for it. > > Personally, I have no idea. Does Lily not do it right? > Best, Simon
I don't have a program that displays MIDI files with lyrics, so I can't test it. Both Finale and MuseScore accept LilyPond generated midi files but ignore the lyrics. It appears that, when generating a MIDI file, LilyPond currently just puts UTF8 chars in the text fields as if they were ASCII. According the base MIDI spec, this is illegal; only ASCII chars between 0 and 127 are allowed. However, MIDI RP-17 and RP-26 introduce additional encodings for the <text> portion of the lyric meta-event FF 05 <len> <text>. In particular, RP-26 specifies the "language" code {@LATIN} to include 8-bit chars > 127. It seems no code for "UTF8" has been officially defined, but a reasonable proposal might be language code: {@UTF8}. It's my impression that the largest body of MIDI files with lyrics are "Karaoke" files (extension .kar), which may not be of interest to LilyPond. I suppose that interest in using MIDI as a "score" language has waned in favor of MusicXML. So for LilyPond purposes, it would suffice to use a reversible encoding, that is, LilyPond would accept any MIDI file text format that LilyPond generates. The apparently existing UTF-8 default should work for that. But if we are going to use a "private standard", we might as well imitate the "official" standard and insert something like FF 05 07 { @ U T F 8 } And lobby AMEI/MMA to adopt an official UTF8 position. Joe Austin
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user