Skip to content

Allow medley for every song#1356

Draft
dgruss wants to merge 1 commit into
UltraStar-Deluxe:masterfrom
dgruss:unifymedleypaths
Draft

Allow medley for every song#1356
dgruss wants to merge 1 commit into
UltraStar-Deluxe:masterfrom
dgruss:unifymedleypaths

Conversation

@dgruss

@dgruss dgruss commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

I never really understood why medley mode was restricted to only some songs. From a user's perspective, that feels arbitrary: some songs can be selected for medleys, some don't and whether it can be part of a medley should not depend on whether USDX found a repeated refrain, whether the file is relative, whether it is a duet, or whether #CALCMEDLEY happens to be set, but only based on whether the user thinks this is a good choice of song for a medley.

This also came up again in the discussion around #1345: medley availability and medley icons are problematic due to overlaps, now also due to missing analysis state, so the UI on which arbitrary songs can be selected is even less clear (fully unclear maybe).

This PR tries to resolve the problem by focusing on what the user wants: if the user wants a specific song in a medley, they shall have it.

The core is to make all medley paths follow the same unified logic that is more permissive:

  1. any song with notes can get a medley range
  2. explicit #MEDLEYSTARTBEAT / #MEDLEYENDBEAT is preferred (similar to preview start / end, these tags are used if available but they are not necessary to generate a preview)
  3. otherwise we try the existing repeated-section heuristic
  4. if that does not find anything, USDX falls back to any playable range
  5. duets are handled by choosing a range for one of the tracks (as soon as we have the Track variable in the Player, see Duet Highscore #1004, we could allow all players in the medley to sing the same track or maybe randomize which player sings which track - to be decided then I guess)
  6. relative songs are no longer excluded (not sure what the future of relative songs is though?)
  7. #CALCMEDLEY is ignored as a legacy switch
  8. S/D/F medley entry paths now use the same behavior --> two of these keys could be deprecated and later on be used for other purposes (or maybe we should choose a key more intuitively associated with "medley"?)

With this, the medley selection never fails. It might not be the greatest medley, but the players can choose whatever they like and the game will just do what the player wants, best effort.

@dgruss

dgruss commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

i tried this for a few medleys, including duets, but maybe users with more medley experience should see whether this behaves as expected or what should still be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant