You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced LRC is an extension of Simple LRC Format developed for the A2 Media Player. This supports adding an optional timestamp for words, syllables, or otherwise parts of a line. It takes the format: <mm:ss.xx>.
Enhanced LRC support
Add functionality to parse Enhanced LRC
Add additional interfaces and functions
20/4/23
Add options:
enhanced: parse entire input as Simple or Enhanced LRC. default false.
strip: ignore empty lines. default false.
Parser will now support repeating times for Enhanced LRC
Will pre-calculate timing offsets for syllables based on the line's start time.
Added relevant types.
25/4/23
Add functions:
toString: inverse of parse; returns valid lrc for given list of Line objects.
expand: alias for toString(parse(lrc: string))
The use case for this is to 'unroll' or 'expand' lines with repeat-timestamps into separate lines. This is straightforward to implement as parse already does this when building the Lrc list. This is especially useful for Enhanced Lrc as repeating timestamps are not supported by the specification.
Add playground options to reflect the features listed above.
Supporting enhanced format is a good idea, but i think it's usage may be less than simple format and compatibility with enhanced format will be slow down parse function, so adding a new function like parseEnhanced or adding a option like parse(lrc, { enhanced: true }) is a better choice?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhanced LRC support
20/4/23
enhanced: parse entire input as Simple or Enhanced LRC. default false.strip: ignore empty lines. default false.25/4/23
toString: inverse ofparse; returns valid lrc for given list of Line objects.expand: alias fortoString(parse(lrc: string))The use case for this is to 'unroll' or 'expand' lines with repeat-timestamps into separate lines. This is straightforward to implement as
parsealready does this when building the Lrc list. This is especially useful for Enhanced Lrc as repeating timestamps are not supported by the specification.Misc
preparescript to support sideloading from git repos.This should be backwards-compatible with previous versions.
Note: This PR is required before merging Part II.