Extract lyrics from score

• May 12, 2012 - 19:31

I have a some sheet music for a choir with one staff for each voice. The voice each has their own lyrics (often same, but not always). Either way, is there a way to extract these lyrics? I'd like to somehow extract all the text easily to create a simple lyrics sheet for each voice. Doesn't seem to work to copy the lyrics and pasting into for example notepad, and can't find any function for it either.

Figured it should be able to extract it somehow from either the MuseScore XML format or the MusicXML format using for example XSLT. Hoping that maybe something already exists to do this though....


Comments

Would try to save each voice on its own with the lyrics text - removing the other voices resulting that you have various sheets for the various voices only.

I don't know a way to do this either. Going the other way is possible - pasting from a text file into MuseScore - if you have the lyrics already hyphenated.

In reply to by Marc Sabatella

Hi, what I have done so far after writing the numerous melodies/voices (that is if you have writen each voice on its own staff/barline) is to save the file as (e.g. soprano with lyrics). Then go to create instruments from where on the right hand side you see all instruments/voices where you can delete the others not needed. Do so for each voice from the original sheet (to avoid accidentally deleting the other voices and not having saved the original document - being unable to retrieve the others and having to re-write everything).

Hope that is of help (that is should I have understood your original question right)

In reply to by ChurchOrganist

Indeed it should be a simple job -- has anyone done it yet? If not I was thinking about using the XML libraries (which I am not familiar with) of PHP (which I am) to simply extract the contents of the lyric tags.

I guess:

* There will not normally be anything except the desired text inside the lyric tags (but what about formatting stuff like italics etc?) -- so simple extraction should work

* There will be no hope of disentangling multi-voice lyrics?? (So the workaround would be to extract one voice at a time)

* There will be no line formatting, so the output text will need manual reshaping to "poem shape".

* Hyphens could be removed automatically; but could they be distinguished from genuine hyphens?

Grateful for any informed feedback...

In reply to by Imaginatorium

In MuseScore 1.2, you could export to MusicXML and extract the lyrics from there. Maybe someone did it already.

1/ Italic etc will be out and it will be easier for you.

2/ depends what you mean by voices. If it's staff, then it should be possible

3/ there is no way to enter line break in MuseScore obviously. So indeed it will need post process

4/ MusicXML has something for this.

The major problem I see with lyrics extraction will be the handling of repeats.

Extracting Lyrics from MusicXML has been done already. See for example http://ismir2008.ismir.net/papers/ISMIR2008_217.pdf

A simple way in python.
o = converter.parse('http://static.musescore.com/38386/c905262e56/score.mxl')
>>> lyrics = text.assembleLyrics(o) >>> print lyrics

  1. Install music21
  2. Run

    o = converter.parse('yourscore.mxl')
    lyrics = text.assembleLyrics(o)
    print lyrics

Hi,

whoever might search for a way to extract only the lyrics from your score, in 2.0.3 you can use:

Edit | Tools | Copy Lyrics to Clipboard

You can paste the text in any text editor to make it readable.

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