Need a space option in lyrics paste that doesn't advance to new note

• Jan 25, 2018 - 00:37
Reported version
S5 - Suggestion

In Russian, and perhaps other languages, there are situations where a space occurs within a syllable of text. In particular in Russian, one encounters the letter в (transliterated as v) followed by a space and then a multi-letter syllable, all of which is associated with a single note of music. Example, one can find В мо-лит-вах, where "В мо" is sung as one syllable with one note. If I am entering such text directly into Musescore, I can on a mac enter option-space after В and get the desired result. But if I copy В мо from a text edit file and paste it into Musescore, the option space gets interpreted as a space, and so В and мо will appear under different notes. I would like to see option-space (or some other key combination) interpreted in a paste as it is in direct text entry, namely as a spacer within a syllable. Otherwise it is very painful to paste Russian from an external file as lyrics in Musescore..


Status (old) active closed
Status active closed

This is already possible. On English keyboards pressing ctrl+space will enter a space into the middle of a "syllable." I'm not sure if or how ctrl might be translated on your keyboard.

Status (old) closed active
Status closed active

I have re-opened. I think you mis-understood. On a Mac, I think option+space is the equivalent of your ctrl+space. Indeed it introduces a space into the middle of a syllable WITHIN MUSESCORE -- i.e. if I am typing lyrics in a score. But if I am copying a bunch of lyrics from another file and then using repeated pastes to enter syllables note by note in musescore, option+space is interpreted the same as ordinary space, i.e. I get only what is before the option+space in one paste operation (and under one note); what is after the option+space appears on the next paste, under the next note. I would guess that if you create some text in a word processor with ctrl+space and copy into Musescore you will find the same behavior.

Status (old) active closed
Status active closed

@mike320 is correct. Since MuseScore pastes lyrics one syllable at a time, this is easily accomplished. When pasting lyrics, you can press the left arrow key to go back to the lyric for the previous note. Then press the right arrow key to move the cursor to the end of the text. Then press option+space to insert a space. Then paste the rest of the syllable. Continue to paste the rest of the lyrics as usual.

Thank you @frfancha. I would agree with everything @mattmcclinch said except "easy". The procedure he describes requires -- no matter how carefully the external text editor file is prepared -- that one pays constant attention to the lyrics being pasted as one does the repeated pastes. If it were not for this problem I could prepare an external file which I can copy and mindlessly enter via repeated pastes into my Musescore file (by for example introducing extra hyphens or spaces when there is a syllable or word that is to be sung over several notes).

Another feature I would like to see is the ability to copy lyrics to clipboard including the inter-syllable hyphens and inter-word extra spaces (which could then be pasted into a word processor file). That would facilitate doing bulk operations to lyrics, e.g. changing transliteration schemes from Russian cyrillic, or replacing all occurrences of one word by another. I will submit that as a separate feature request (and may try to write a python script that would do this from a MusicXML file, if I can find the time).

In that case, I would recommend that MuseScore automatically convert the + character to a space when pasting as a lyric. For now, you can use the + character as a non-breaking space in your text edit file, and convert them to spaces by hand after pasting.

In reply to by mattmcclinch

If the pull request just considers '+' as meaning non-breaking space, then we loose the possibility to paste a plus sign itself. Very minor issue probably as plus sign in lyrics is probably rarely used, but still, if it's to make a code change we could try to do it better.
What about using the backslash?
Then we would have:
\ \ => \
\ [a white space] => non-breaking space
\n => new line

Good call, most probably the shortcut Ctrl+Space just inserts a regular space into a lyrics syllable rather than an  , so in the copy/cut the character of that character ;-) is lost already.
Edit: Ctrl+Space is not really a shortcut, not in shortcuts.xml at least.

I updated the pull request to use \ to escape special characters.
Special characters are - _ \ and whitespace.

@jeetee: Ctrl+space adds a regular space, but treats it differently.

Unfortunately, the cut/copy is beyond our control. Unless MuseScore has a text editor for formatting lyrics? If not, maybe it should have one.

If I read the OP correctly, he's actually pasting in from a different text program in which the text was entered with the non-breaking-space. Pasting that into MuseScore somehow treats it as a 'regular' space. That should be considered a bug and has nothing to do with escaping or whatever else has been suggested here.

So multiple issues are at hand:
1. Typing Ctrl-Space in Lyrics entry mode does not insert a non-breaking space [Bug]
2. Typing in [Alt+255] under windows seems to insert a non-breaking space, but it might not be [Possible Bug related to 1]
3. Copy lyrics to clipboard seems to loose the non-breaking space and converts them into normal spaces [Could be a side effect of points 1 and 2 already having done that replacement]
4. Using a text editor (Notepad++ in my case) to write some text with non-breaking spaces and pasting that into MuseScore results in those non-breaking spaces interpreted as normal spaces (and thus advancing the input)

All of the above issues can be solved if we could just support the actual non-breaking space character. As soon as the non-breaking space is no longer treated as a normal space character all of the above should start working as expected; without the need for escaping character hacks.

Status (old) patch (code needs review) fixed
Status fixed

Fixed in branch 2.2, commit 9fe0b0b577

Merge pull request #3426 from mattmcclinch/non-breaking-spaces

fix #268842: Need a space option in lyrics paste that doesn't advance to new note