How suganth-s-39/nocturne works
Nocturne is a Windows desktop lyrics visualizer. Its main workflow follows Spotify or YouTube Music playback, retrieves and caches lyrics, estimates or uses word timings, then renders the active words in an animated style. The README documents auto-sync, album-art colors, custom backgrounds, the gallery, and floating-window and tray controls, so these appear as distinct branches. The sampled files show frontend stores, timing, rendering, and native bridges; some subsystem connections rely on README descriptions rather than inspected implementation.
Main entry points: director.ts Animation director · mediaStore.ts Media state · autoSync.ts Automatic alignment · service.rs Lyrics service
Components 25
Playback and sync
- Media tracking
src-tauri/src/media/service.rs - Playback clock
src-tauri/src/media/clock.rs - Media state
src/media/mediaStore.ts - Audio capture and features
src-tauri/src/audio - Automatic alignment
src/sync/autoSync.ts - Sync alignment
src/sync/align.ts
Lyrics pipeline
- Lyrics service
src-tauri/src/lyrics/service.rs - LRCLIB
- Lyrics cache and overrides
src-tauri/src/lyrics - Lyrics state
src/lyrics/lyricsStore.ts - Word timing
src/lyrics/timing.ts
Visualization
- Album art and palettes
src-tauri/src/art - Background library
src/backgrounds/library.ts - Animation director
src/engine/director.ts - Ten lyric styles
src/scenes - Lyrics stage
src/ui/Stage.tsx - Style gallery
src/ui/gallery/Gallery.tsx - User backgrounds
src-tauri/src/backgrounds.rs
Desktop experience
- Settings
src/settings/settingsStore.ts - Native shell bridge
src/shell/bridge.ts - Windows shell
src-tauri/src/shell - Controls and panels
src/App.tsx - Floating lyrics window
src/overlay/OverlayApp.tsx - Tray and hotkeys
src-tauri/src/shell
Other components
- Spotify / YouTube Music
Connections 28
- Spotify / YouTube Music → Media tracking: reports playback
README.md - Media tracking → Playback clock: updates position
src-tauri/src/media/service.rs - Media tracking → Media state: sends state
README.md - Playback clock → Media state: provides clock
README.md - Media state → Lyrics service: triggers lookup
src-tauri/src/lyrics/service.rs - Lyrics service → LRCLIB: searches lyrics
src-tauri/src/lyrics/service.rs - Lyrics service → Lyrics cache and overrides: reads and writes
src-tauri/src/lyrics/service.rs - Lyrics service → Lyrics state: publishes lyrics
README.md - Lyrics state → Word timing: builds timed document
src/lyrics/lyricsStore.ts - Media state → Automatic alignment: supplies playback
src/sync/autoSync.ts - Automatic alignment → Audio capture and features: listens for music
README.md - Automatic alignment → Sync alignment: aligns lyrics
src/sync/autoSync.ts - Automatic alignment → Lyrics state: sets offset
README.md - Lyrics state → Animation director: supplies timed lyrics
src/engine/director.ts - Media state → Animation director: supplies playback
src/engine/director.ts - Animation director → Ten lyric styles: creates and feeds scenes
src/engine/director.ts - Animation director → Background library: renders backgrounds
README.md - Ten lyric styles → Lyrics stage: renders lyrics
README.md - Lyrics stage → Animation director: drives animation
README.md - Style gallery → Lyrics stage: selects style
README.md - Album art and palettes → Animation director: provides album colors
README.md - Settings → Native shell bridge: syncs preferences
src/shell/bridge.ts - Native shell bridge → Windows shell: invokes commands
src/shell/bridge.ts - Windows shell → Tray and hotkeys: handles shell actions
README.md - Controls and panels → Lyrics stage: hosts stage
src/App.tsx - Controls and panels → Style gallery: hosts gallery
src/App.tsx - Controls and panels → Floating lyrics window: opens floating view
README.md - User backgrounds → Animation director: offers backgrounds
README.md