Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spec] Should spaces that separate words come at the start or end of the line? #65

Open
DeinAlptraum opened this issue Oct 6, 2024 · 4 comments

Comments

@DeinAlptraum
Copy link

Suggestion

Words are separated via spaces, but within the UltraStar format, the space between two words could generally be placed on the line after the last syllable of the first word, or before the first syllable of the second word.
Example (| marks end of line for visualization purposes):
Before:

0 4 0 Hello|
8 4 0  World|

After:

0 4 0 Hello |
8 4 0 World|

The specification does not currently contain any rules or recommendations on how these should be handled by UltraStar games and tools. We have three options:

§1: Allow both
§2: Allow only spaces before
§3: Allow only spaces after

Main onsiderations

  1. Implementation effort: going with §1 increases implementation complexity for game and tool developers and means higher potential for errors. This is an argument against §1.
  2. Aesthetics: different users have expressed different preferences for spaces before or after words. This is an argument for §1. Some users and developers have argued that spaces after words are more logical, comparing it to apostrophes for omitted characters (e.g. ev’|ry|thing), supporting option §3.
  3. Text file readability: spaces after words hurt readability, since they are not visible by default in typical text editors. The amount of editing still done via raw text editors, rather than tools, is expected to be small. Additionally, virtually everything that is not Notepad has an option to display trailing whitespace. A few users mentioned that they still edit text files directly and that the format should stay readable regardless of text editor and options. This supports §2.

Use case

There has been discussion on the Discord about this multiple times, and games and tools currently support (and sometimes enforce) different standards. A consensus should be reached and recorded in the specs.

Extra info/examples/attachments

Current state of support:

  • USDX supports both.
  • USDB contains both.
  • USDB Syncer strictly enforces spaces after, automatically adapting all downloaded txts.
  • UltraStar Creator outputs only files with spaces after.
  • Yass Reloaded defaults to spaces after, but can be changed to spaces before in the options.
  • Karedi only supports spaces before.
@bohning
Copy link
Collaborator

bohning commented Oct 7, 2024

Thanks for the great summary. I can only add:

  • UltraStar Manager has two cleanup tasks to convert from §2 to §3 and vice versa, ergo §1.
  • Main consideration: lyrics highlighting (lyrics helper bar) and timing are affected (technically, the start beat of the syllable is then for the space before the actual word, not for the first character of the word, if §2 is used).

@Nianna
Copy link

Nianna commented Oct 7, 2024

I assume this lyrics highlighting that you talk about works on character not syllable basis, right? In such case either the real text of the syllable starts too late (if space is at the beginning like in §2) or it ends too soon (if space is at the end like in §3). Either way it does not work like expected. Games/editors should simply ignore trailing & leading whitespaces during character-based highlighting.
IMHO standard should not be affected by such bugs

@Nianna
Copy link

Nianna commented Oct 7, 2024

As to main consideration number 2, can someone please elaborate why spaces after words are more logical?

This seems highly subjective, for me the spaces before are way more logical. Afterall conceptually I treat space more as a character that introduces new word than as a character that ends the previous word.

Not sure how apostrophes are relevant to this topic.

@basisbit
Copy link
Member

basisbit commented Oct 7, 2024

During the year when I was active in USDX development, this topic came up quite often, and each time, there were some people who considered spaces before to be better, some who considered spaces behind to be better, many who are fine with either / want support for either, and even some who tried to push for some magic algorithm / marker instead of manually placed spaces.

Personally, I see spaces as just a part of the lyrics. I don't care if they are in front or after the words, and imho the software should handle this the same way. Avoid automagic to fix / adjust space-placement where possible and instead require the txt file creator to know what they want. Imho all editing tools have to support any position of spaces in the syllables.

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

No branches or pull requests

4 participants