Skip to content

Feature/apple music lyrics viewer - #34

Open
HrishikeshBhandarkar wants to merge 4 commits into
maxrave-dev:multiplatformfrom
HrishikeshBhandarkar:feature/apple-music-lyrics-viewer
Open

HrishikeshBhandarkar wants to merge 4 commits into
maxrave-dev:multiplatformfrom
HrishikeshBhandarkar:feature/apple-music-lyrics-viewer

Conversation

@HrishikeshBhandarkar

Copy link
Copy Markdown

Core: Smooth Lyrics Timeline Clock, Preferences, Romanizer API, and TTML Duet Parsing

What this PR does

Provides domain and service support for the Apple Music lyrics experience in SimpMusic:

  1. Monotonic Clock Interpolation (domain):

    • Adds lastUpdateTimeMs to TimeLine in domain so the UI can compute sub-millisecond dead-reckoning elapsed time between player position updates.
  2. Lyrics Display Preferences (domain):

    • Adds DataStore keys and accessors for lyrics presentation preferences (showLyricsTranslation, showLyricsRomanization, showLyricsOriginal) to DataStoreManager.
  3. Romanizer Script Detection API (lyricsService):

    • Exposes LineScript enum and detectScript() as public APIs.
    • Adds scriptHint parameter support to LyricsRomanizer.romanize() to eliminate redundant script detection passes during per-syllable processing.
  4. TTML Multi-Agent Duet & Background Vocal Parser (lyricsService):

    • Parses TTML timed text markup language from lyrics providers (BetterLyrics / Apple Music).
    • Detects Voice 2 agents (ttm:agent="v2", ttm:agent="v2000", voice2, etc.) and attaches [v2] tag for right-aligned duet rendering.
    • Extracts inline background vocals (ttm:role="x-bg") with balanced nesting scanners and attaches [bg] tag.
    • Formats syllable timing with <MM:SS.cc> timestamps and word-gap pauses.
    • Extracts songwriters metadata from TTML and maps it to domain models.

Commits (4 commits)

  1. b754f04 feat(domain): add lastUpdateTimeMs to TimeLine for smooth lyrics clock interpolation
  2. 32307da feat(domain): add lyrics display preferences to DataStoreManager
  3. 0a68503 feat(lyrics): expose LineScript and detectScript with scriptHint support in LyricsRomanizer
  4. 826e560 feat(lyrics): support TTML multi-agent duet and background vocal parsing

Targeted Branch

  • Base: maxrave-dev/core:multiplatform
  • Head: HrishikeshBhandarkar/core:feature/apple-music-lyrics-viewer

Verification & Testing

  • JVM Tests: :service:lyricsService:jvmTest passed (BUILD SUCCESSFUL), verifying gap timing, background vocal extraction, and multi-agent duet parsing.
  • Cross-module Compilation: :common:compileKotlinJvm, :domain:compileKotlinJvm, and :data:compileKotlinJvm build cleanly with 0 errors.

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