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

Global lyric-line metadata #359

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

adrianholovaty
Copy link
Contributor

@adrianholovaty adrianholovaty commented Nov 21, 2024

This branch adds a new "lyrics" section to "global". This contains top-level metadata about each lyric line — at the moment, a language and label.

See new docs here:
https://cdn.githubraw.com/w3c/mnx/lyric-line-metadata/docs/mnx-reference/objects/lyrics-global/

And a new example document here:
https://cdn.githubraw.com/w3c/mnx/lyric-line-metadata/docs/mnx-reference/examples/lyric-line-metadata/

As a reminder, in MNX, a "lyric line" is a span of lyrics that should be considered a single unit. Here we have four separate lyric lines:

lyric_metadata

This is encoded as the following in "global":

{
   "lyrics": {
      "lineOrder": ["1", "2", "3", "4"],
      "lineMetadata": {
         "1": {"lang": "en", "label": "English"},
         "2": {"lang": "nl", "label": "Nederlands"},
         "3": {"lang": "uk", "label": "Українська"},
         "4": {"lang": "es", "label": "Español"}
      }
   }
}

The "1", "2", "3" and "4" are the arbitrary lyric line IDs I've chosen. These correspond to the IDs that are used in any "event" that has lyrics. For example, later in the document:

{
   "lyrics": {
      "lines": {
         "1": {"text": "John!"},
         "2": {"text": "Jan!"},
         "3": {"text": "ван!", "type": "end"},
         "4": {"text": "Juan!"}
      }
   }
}

@mscuthbert
Copy link
Contributor

We decided to keep lineOrder separate so that later it could be redefined at a "zone" level (like systems) to omit or reorder different lyrics.

@samuelbradshaw
Copy link

samuelbradshaw commented Nov 21, 2024

Is it intentional that you're escaping non-ASCII characters in the JSON example? JSON should allow Unicode without escaping.

@adrianholovaty
Copy link
Contributor Author

@samuelbradshaw Thanks for bringing that up. I've just improved our docs system not to force ASCII in JSON strings (commit here), and I've updated this pull request accordingly (commit here).

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.

3 participants