feat: support word-by-word lyric parsing and highlighting - #736
Conversation
Reviewer's GuideAdds end-to-end support for word-by-word LRC lyrics: parsing multi-timestamp lines into per-word timing structures, exposing them via Presenter, and rendering them in QML with per-word highlighting based on playback position, along with unit tests and a centisecond parsing fix. Sequence diagram for word-by-word lyric parsing and QML highlightingsequenceDiagram
participant Presenter
participant LyricAnalysis
participant LyricPage
participant LyricRect
Presenter->>LyricAnalysis: setFromFile(lrcPath)
LyricAnalysis->>LyricAnalysis: parseLyric(str)
LyricAnalysis-->>Presenter: allLyrics()
Presenter->>LyricAnalysis: hasWordTiming(i)
Presenter->>LyricAnalysis: getWordTiming(i)
LyricAnalysis-->>Presenter: QVector<LyricWord>
Presenter-->>LyricPage: getLyrics()
LyricPage->>LyricPage: metaChange()
LyricPage->>LyricRect: currentPosition, wordLyricsData
LyricPage->>LyricPage: positionChange(position, length)
LyricPage->>LyricRect: currentPosition
LyricRect->>LyricRect: wordSung = modelData.time <= currentPosition
LyricRect->>LyricRect: per-word highlight via Flow/Repeater
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deb6530 to
4a71d9b
Compare
4a71d9b to
0881ace
Compare
|
TAG Bot New tag: 7.0.63 |
|
TAG Bot New tag: 7.0.64 |
0881ace to
e4c12d7
Compare
|
TAG Bot New tag: 7.0.65 |
|
TAG Bot New tag: 7.0.66 |
- Add LyricWord struct for per-word timing data - Parser supports LRC word-by-word format (e.g. [00:27.94]持[00:28.26]有) - Fix centisecond parsing to correctly convert 1/100s to milliseconds - LyricPage/LyricRect add word-by-word rendering with per-word highlight - Presenter passes word timing data to QML layer - Add related unit tests feat: 支持逐字歌词解析与高亮显示 - 新增 LyricWord 结构体,用于存储逐字歌词的时间轴数据 - 解析器支持 LRC 逐字格式(如 [00:27.94]持[00:28.26]有) - 修复厘秒解析,正确将百分之一秒转换为毫秒 - LyricPage/LyricRect 添加逐字歌词渲染逻辑,支持逐字高亮 - Presenter 传递逐字歌词数据到 QML 层 - 添加相关单元测试
e4c12d7 to
f33ca0c
Compare
feat: 支持逐字歌词解析与高亮显示
Summary by Sourcery
Add end-to-end support for parsing and displaying word-timed lyrics with synchronized per-word highlighting.
New Features:
Bug Fixes:
Enhancements:
Tests: