RaagaX
Music playback, engineered beyond the surface.
An independent Android music experience built around immersive playback, high-quality audio, synchronized lyrics, offline listening, real-time listening sessions, and cross-device control.
Explore the Engineering Architecture
Real Device Capture
1.5K AMOLED • 1220×2712
Try RaagaX
Download the latest Android build and experience the application yourself. Engineered with hardware-accelerated shaders, gapless playback, and native audio analysis.
Installation Note: Android may ask you to allow installation from your browser or file manager when installing an APK outside Google Play. The APK is cryptographically signed with the official project release key.
Not just another music player.
RaagaX was built as a complete playback experience — from audio delivery and media controls to synchronized lyrics, offline storage, real-time sessions, and device handoff.


Now Playing
Immersive mesh gradient backdrop with custom controls
Playback is the product.
Built around Android Media3 with a playback architecture designed to remain reliable beyond the foreground UI. Background execution operates within a first-class Android foreground service, integrating with system media controls, Bluetooth audio sinks, and system audio managers.
Resonance of Infinity
Astrionix Masterworks • Session ID: #9042
ExoPlayer 1.4.1 • AudioSink: DirectTrack
* Note: Quality metrics reflect active source resolution. Fallbacks dynamically negotiate to 320kbps AAC/Opus when FLAC is unavailable.
Built for serious listening.
RaagaX supports pluggable sources capable of delivering lossless audio streams (FLAC / ALAC) with YouTube Music as an automatic fallback. An integrated 32-bit float DSP chain handles volume leveling, dynamic range control, and equalizer filtering before passing directly to the hardware AudioSink.
Truthful Audio Metrics: Displays actual decoded bit depth and sample rates rather than arbitrary marketing promises.
Per-Network Quality Governor: Configurable bit-rate ceilings for Wi-Fi vs. Mobile data to conserve bandwidth.
Every word has a moment.
RaagaX supports synchronized lyrics with word/syllable-level highlighting from multiple sources. The lyric engine resolves across LRCLIB, Musixmatch, Kugou, and Genius, anchoring timings directly to the playback clock.
* Note: Word-level highlighting is rendered when syllable-level timing metadata is supplied by providers.
Live Word-Level Sync Demonstration

Neon Odyssey
Astral Drift
The interface listens to the artwork.
When a track begins playing, RaagaX extracts dominant harmonic colors from the album cover and recalculates the ambient backdrop in real time. Using hardware-accelerated shaders, the entire screen breathes with the tone of the music.
Your library, even offline.
RaagaX provides an offline storage pipeline with full metadata preservation. Songs, album art, synchronized lyrics, and ID3 tags are persisted to device storage for instant, zero-latency local playback.

Listening together is a distributed systems problem.
Instead of telling every device to “play now”, RaagaX synchronizes playback using a shared server-time anchor. Network delays can vary by hundreds of milliseconds across cellular towers — but a time-anchored playhead converges authoritatively.
Listen Together Mesh Topology
Go WebSocket Hub • Single-port Render Cluster • In-Memory Party State
Host Controller
Android Client (Phone A)
Go Party Hub
WebSocket /ws/parties/{code}
Member Renderers
Up to 4 additional joined clients
How every client converges without polling
Each client calculates where playback should be right now instead of waiting for another network packet to arrive. Even if a packet is delayed, the server-time anchor guarantees deterministic playhead alignment.
anchorMs = 1757630001234; // Server timestamp
isPlaying = true;
playhead = positionMs + max(0, serverNow - anchorMs);
Network Latency Drift Simulator
Test packet delay impact on audio playhead
NTP-Style Clock Synchronization
Device clocks are never assumed to be identical. Each client measures its exact offset: serverMs - (t0 + t1) / 2. Error is bounded by half the round-trip time, retaining the sample with the smallest RTT over cellular.
5-Second Authoritative Heartbeat
Lost packets, OS power-save doze cycles, or Wi-Fi to cellular handovers do not announce themselves. Every 5 seconds (JAM_STATE_HEARTBEAT_MS), the Go party server unprompted re-states the authoritative truth to all members.
Lightweight Queue Mutation Sync
Delta mutations (Move, Remove, Append) over wire instead of transferring full 500-track arrays
Move the music, not the session.
A comprehensive architectural specification and 30-scenario test harness governing multi-device session discovery, remote control, and atomic playback handoff without audio stutter or duplicate playback.
The 4-Phase Atomic Handoff Transaction
Zero audio interruption • Fallback rollback timeout: 8s
Google Pixel 9 Pro
Playing: Ethereal Echoes
MacBook Pro M-Series
Status: Ready to acquire lease
Cross-Device Acceptance Test Matrix
Phone plays, Laptop opens
Laptop displays 'Playing on Phone' in paused state. Zero audio plays on laptop (Zero Autoplay Rule).
Phone plays, Laptop taps 'Play Here'
Laptop prepares audio, acquires lease, begins playback at current position. Phone relinquishes and pauses.
Laptop playing, Phone taps Pause
Remote PAUSE command dispatched → Laptop pauses → ACK broadcast → Phone UI updates synchronously.
Target device buffering fails
8-second timeout triggers rollback coordinator → Phone retains lease and audio continues uninterrupted.
Simultaneous 'Play Here' on 2 devices
Server serializes requests via atomic lease revision; exactly one lease committed; zero dual-playback.
Bluetooth disconnect on active renderer
Audio safely halts on active renderer; session pause state propagated across observer devices.
Under the interface.
RaagaX is structured as a layered system where UI components remain completely isolated from playback state, cloud network failures never interrupt local audio, and native C++ handles high-throughput audio computation.
Playback & Audio Engine
Android Media3 • ExoPlayer • MediaSession
Low-latency playback architecture decoupling audio decoding from UI lifecycles through a persistent Android foreground media session service.
Where Kotlin meets native audio.
For computationally heavy audio analysis tasks such as beat tracking, spectral extraction, and tempo discovery, RaagaX bypasses JVM garbage collection overheads by compiling optimized C++ routines directly through CMake and Android NDK.
6-Stage Native C++ Audio Analysis Pipeline
Compiled via Android NDK 27.2.12479018 • CMake 3.22.1
Short-Time Fourier Transform (STFT) with Hanning windowing generating frequency bin energy tensors.
Small backend. Serious synchronization.
The party server is written in Go: one WebSocket per device, in-memory room state, zero database overhead, and sub-millisecond execution. Deployed as a single high-throughput service designed to keep up to five signed-in devices in perfect lockstep.
Instant monotonic server clock reading providing mobile clients a bootstrap time anchor before upgrading to a WebSocket.
HTTP/1.1 200 OK
Content-Type: application/json
{
"serverMs": 1757630042120,
"monotonicNanoseconds": 9482018402120
}Decisions behind the experience.
Every layer in RaagaX was deliberately chosen to solve a concrete engineering problem — prioritizing deterministic playback, cellular efficiency, and real-world audio fidelity.
Why server-time anchors?
Broadcasting 'play now' creates audible drift across heterogeneous mobile networks.
If a server commands five phones to 'play now', a packet arriving 40ms late on Wi-Fi and 300ms late on mobile data causes them to start a quarter-second apart. Re-sending packets only compounds drift. By transmitting a fixed position anchored to an authoritative server timestamp, every device calculates playhead = positionMs + (serverNow - anchorMs) locally and converges autonomously.
Why separate queue state?
Queue mutations are low-frequency events that must not bloat recurring heartbeats.
Playback position and active playback state must be refreshed frequently (every 5 seconds) to heal packet drops and clock drift. However, playlist queues can contain hundreds of tracks. Sending the entire track array with every heartbeat would consume substantial cellular data. Decoupling queue state into delta mutations (Append, Remove, Move) preserves network bandwidth.
Why WebSockets over HTTP polling?
Real-time party sessions require continuous sub-50ms bidirectional interactivity.
HTTP polling introduces connection handshake overheads, HTTP header tax, and unpredictable polling latency. A single persistent WebSocket connection per device enables instantaneous host command dispatch (seek, pause, skip) and deterministic NTP-style ping/pong round-trip time sampling.
Why Android Media3 / ExoPlayer?
First-class integration with Android OS media sessions and hardware audio sinks.
Media3 provides seamless background audio execution within a proper foreground service, lockscreen transport controls, Android Auto compatibility, and hardware volume key interception. Its customizable AudioSink architecture enables zero-gap crossfades and 32-bit floating-point DSP chaining directly before DAC output.
Why native C++ for audio analysis?
Intensive Fourier transforms require deterministic memory and SIMD vectorization.
Computing Short-Time Fourier Transforms (STFT), 128-band Mel spectrograms, and autocorrelation tempo detection across thousands of PCM audio frames generates intense heap allocation pressure in the JVM. Compiling optimized C++ algorithms via CMake and NDK executes within pre-allocated scratch buffers with ARM NEON SIMD vectorization without triggering garbage collection pauses.
Built to survive real playback.
Music playback apps fail under real conditions: phones enter battery doze mode, Bluetooth headphones disconnect, and cell towers drop WebSocket frames. RaagaX is backed by 84+ verified test suites and 30 formal cross-device acceptance specifications.
PrecisionAudioSinkTest.kt
Media3 DirectTrack audio sink zero-underrun verification
FloatDspChainTest.kt
32-bit float equalizer bands, pre-amp clamping, and dynamic leveling
party_test.go
Time-anchor drift calculations, monotonic clock assertions, and member token auth
LocalJamHostServerTest.kt
Local room creation, client join handshake, and heartbeat state reassertion
PartyQueueMoveTest.kt
Deterministic resolution of concurrent queue delta operations across devices
QueueShuffleTierTest.kt
Pseudo-random seed preservation across session restarts and handoffs
OfflineDashTest.kt
Segmented media caching, atomic file writes, and corrupted stream recovery
DownloadSessionTest.kt
Network state transitions (cellular vs Wi-Fi) and automatic download throttling
CD-001 Zero Autoplay
Opening second device displays remote status without triggering audio playback
CD-002 Play Here Handoff
Atomic lease transfer preserves playhead within 150ms drift tolerance
CD-008 Buffering Rollback
8-second target buffer failure coordinator rolls back lease to source device
WordSyncTest.kt
Sub-millisecond syllable interpolation and LRC time offset bounds checking
Representative Production Stress Scenarios
Zero Inverted State GuaranteesRenderer receives and acknowledges pause state without rewinding playback buffer.
Multiple users reordering songs concurrently resolve deterministically against central epoch.
Wi-Fi to LTE drop recovers via 45-second socket grace period without kicking user from party.
Host OS NTP clock stepping does not perturb playback anchor or cause audio stutter.
Real Device Interface Gallery.
Captured directly via ADB from physical Android hardware running the production release APK. Explore the real application interface across core user flows.

Home / Listen Now
Curated playlists, recent releases, dynamic mood carousels, and quick resume triggers over a reactive Compose LazyColumn.
Material 3 LazyColumn with floating Liquid Glass navigation bar
An engineered stack from metal to UI.
Every technology in RaagaX was picked for reliability, determinism, and performance. No superficial wrapper frameworks — true native code at every tier.
The development journey.
From the initial audio decoding experiments to a distributed WebSocket cluster and native C++ spectral analyzers — an iterative journey of systems engineering.
Discovery & Audio Prototyping
Prototyped multi-source audio resolvers connecting JioSaavn catalog metadata and YouTube streaming fallbacks.
UI Design System & Haze
Built edge-to-edge Material 3 design system in Jetpack Compose with custom Haze frosted-glass shaders.
Media3 Playback Engine
Constructed foreground media session service with 0–12s gapless crossfade and 32-bit float DSP chain.
Synchronized Lyrics Engine
Implemented sub-millisecond syllable and word-level karaoke parser supporting LRCLIB, Musixmatch, and Kugou.
Offline Storage Architecture
Engineered segmented media downloader with ID3 tag injection and Room SQLite local database persistence.
Listen Together (Go Hub)
Developed high-concurrency Go party hub with monotonic server-time anchors and NTP clock synchronization.
Cross-Device Subsystem Spec
Authored formal 30-scenario acceptance test specification (CD-001 to CD-030) and 4-phase lease transfer coordinator.
Native C++ Audio Analyzer
Integrated CMake and Android NDK 27 for SIMD-accelerated Mel spectrogram and tempo beat tracking.
Comprehensive Test Harness
Validated 84 unit and integration test suites covering DSP sinks, queue shuffles, and party state regressions.
120Hz Performance Hardening
Eliminated root Compose recompositions, throttled download StateFlow emissions, and optimized GPU shaders.
I didn’t just design the interface.
RaagaX required working across multiple layers of the stack — from Android UI and media playback to real-time synchronization, backend services, offline storage, and native audio processing.
Android UI & Composition
Playback & DSP Engine
Go Distributed Backend
Real-Time Sync Protocol
Native C++ Audio Analyzer
Data, Storage & Verification
Experience RaagaX.
Download the Android build and explore the project for yourself. Engineered with modern Jetpack Compose, native C++ audio analysis, and sub-second Listen Together synchronization.
Everything starts with the code.
Inspect the complete Kotlin, Go, and C++ source code. Built under the GNU General Public License v3.0, ensuring transparency, reproducibility, and freedom of research.
Astrionix/RaagaX
Modern Android music streaming and playback platform
Contains the complete native Android Jetpack Compose client, ExoPlayer Media3 audio pipeline, Go WebSocket jam server, C++ spectral audio analysis routines, and CMake compilation scripts.