Skip to content

[Feature Request] Smart Crossfade for LOCAL library: BPM/Key-aware transitions (offline metadata, zero real-time DSP) #1795

@YisusPineapple

Description

@YisusPineapple

👋 Hi! I'm another user who'd love to see this feature. (Echoing the request in #1708 — great idea!)

I've researched how it could integrate with PixelPlayer's current architecture (with AI assistance, as I don't code in Kotlin), and wanted to share some implementation notes that might help:

🗺️ Where it could fit (based on codebase analysis)

  • data/model/Song.kt: Add optional bpm: Float?, keyCamelot: String? fields (nullable, like existing genre, bitrate)
  • data/preferences/UserPreferencesRepository.kt: Add SMART_MIX_MODE preference using the same DataStore pattern as CROSSFADE_DURATION
  • data/service/player/TransitionController.kt: Hook into transition logic to check BPM delta + Camelot compatibility (e.g., 8A → 8A/7A/9A/8B) before falling back to user-set duration
  • tools/ (optional): Lightweight analyze_library.py script for offline metadata generation (like existing migration scripts)

⚡ Low-risk design

✅ Reuses existing DualPlayerEngine — no new audio pipeline
✅ Metadata pre-calculated offline → zero CPU during playback
✅ Graceful fallback: auto-reverts to standard crossfade if metadata missing or device constrained
✅ Fully optional toggle — preserves simplicity for users who prefer manual control

🙋 About me

I'm a daily user on low-end hardware (TECNO Spark 20, Android 13). I don't write Kotlin (in fact, I don't even know how to program), but I'm happy to:

  • Test early builds on my device
  • Provide the Python analysis script or JSON schema if needed

Thanks for considering this — and for building such a polished player! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions