Conversion from MSCX files to LRC files with stylesheet

• Aug 9, 2011 - 22:13

MuseScore is great to enter notes and export it to wav files, that I can convert to mp3 by using e. g. RazorLame.
Additionally I save the files in the mscx format and control the version with subversion - it is a joy that it is a XML format.

I analyzed the MSCX format an wrote a XSL file, that translates the file to a LRC file for the karaoke like lyrics on some LRC capable mp3 players like e. g. Sony NWZ-E453 and some Android Apps.

But I faced some problems to write a XSL, that works always due to this points:

  • How to get the right seconds per tick factor?
  • How to detect tempo changes in the middle of the song?
  • How to detect syllables and connect them without space gap?
  • How to find good rules to start a new LRC line? Detect new measure? Breaks?
  • Lyrics are written as html-data, so how to get the lyric text, no matter how deep it is nested with html tags?

      To answer these questions I would need the documentation, how the MSCX is built in detail.
      Some previously mentionned tasks seem to be so complex, that it will be easier to write code than XSL.


      So there are my questions:
      Do you plan to export LRC files?
      Is there a detailed documentation of the XML file format for mscx files?
      Is it planned to export lyrics into midi files as well?

      PS: I wrote a program, that can extract lyrics in a spartanic way out of a simple midi file.
      MuseScore can even export midi files, unfortunately lyrics are lost at this export.

      Here my current XSL:

      <?xml version="1.0" encoding="Windows-1252" ?>

      line 1 word 1 line 1 word 2 ... line 1 last word
      [mm:ss.xx] line 2 word 1 line 2 word 2 ... line 2 last word

      todo: use relTime for songs, whose bpm has been changed in the MuseScore play control area.

      there can be found other hints and tricks like [COLOUR] 0xFF33FF at the beginning,
      [mm:ss] only etc.
      [mm:ss.zzz]
      [mm:ss:zz] works well on a Sony mp3 player

      -->

      <
      >

      <
      >

      <
      >

      <
      >

      :

      .


    Comments

    Do you still have an unanswered question? Please log in first to post your question.