musescore / musescore/MuseScore

Enhance Lilypond Lyrics to handle MU3 syntax

Open
#17,366 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request plugins
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Your idea

Adding the Lilypond Lyrics plugin to the distribution is great. However, the syntax one needs to use in order to enter lyrics is something that is going to seem extremely unnatural to anyone not actually accustomed to LilyPond. We could try to invent what we think is the ideal syntax, but the syntax used in MU3 is as good as anything, I think. So I propose we support that more directly (in addition to the LilyPond format - see below).

Problem to be solved

We want to make it as easy as possible for people to enter lyrics. The plugins is a great step, but I want to make the syntax easier to use, especially for users accustomed to the MU3 format.

Prior art

MuseScore 3 used a syntax where hyphens were simply typed normally ("Ma-ry had a lit-tle lamb"), with no need to double them up or surround them with spaces. Underscores similarly worked more simply than the LilyPond syntax. The MU3 format is based more on how someone might normally type.

Additional context

While we could modify the main parsing code, we probably don't want to lose the LilyPond compatibility either. Plus I think it supports some things MU3 didn't in terms of embedded spaces, hyphens, or underscores within syllables.

So instead I suggest we leave the main code alone but leverage the existing "Expand" and "Condense" functionality to achieve the MU3 compatibility. These already do the right thing with hyphens; they just don't handle underscores in the way they would need to. So I think a simple change to the expandLyrics() and condenseLyrics() functions would take care of that.

I would also propose we simplify the usage further by making the MU3 (collapsed) format the default. I think that could be accomplished with minimal change by simply calling expandLyrics() automatically on Paste, and collapseLyrics() automatically on Dump.

I'm not quite sure right now what Merge really does, but I assume it would not be difficult to adapt either.

Assuming these changes are OK with the team, I am sure I or others in the community could implement them in short order.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing expandLyrics() and condenseLyrics() functions and the Paste, Dump, and Merge handling they support. Verify how hyphens and underscores behave in MU3 and LilyPond formats; done means MU3-style lyrics work without removing LilyPond compatibility and the proposed default behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.