crazykickboxer

/ Android / Kotlin

Phosphor Player

Overview

Music you look at

Phosphor is an Android music player built around its visualizers. It plays the files already on your phone, and every control and label in it can be a 3D cluster of glyph particles rather than a widget.

The visualizers render natively at a locked 120 Hz, and on an HDR panel their highlights are driven above SDR white. Among them: Island Falls, a spectrum analyzer on a cliff edge above a rainbow waterfall; Harmonic Terrain, where rock mountains rise with each band; Douglas Fir, which puts spectrum light into a forest's own trees; plus Spectral Range and its terrain relatives, scopes and several scenes.

The transport controls are shapes rather than icons. A triangular prism is play, twin columns are pause, chevron stacks are previous and next, a braid is shuffle and a loop is repeat. The ring of glyphs around play is the seek bar, and the helix on the right is volume.

The library shows songs rather than files: smart artist and title names, each song once, no clips, and drawn covers for songs that have none.

Specification

Tech spec

Phosphor Player technical specification
PlatformAndroid 12 or later, 64-bit arm64, OpenGL ES 3
LanguageKotlin, with C++ for the analysis engine
Render rateLocked 120 Hz, Choreographer-paced
ColourFP16 targets presented through scRGB linear, with PQ and P3 fallbacks
DSP thread240 Hz, never blocks, triple-buffered immutable snapshots
AnalysisFFT at 2048, 4096 and 8192, Hann; 64 and 256 log bands
LoudnessBS.1770 K-weighted, plus stereo correlation and a 12-bin chroma
Onsets and tempoSpectral-flux onsets per stem, autocorrelation tempo and beat phase
Audio pathMedia3 AudioProcessor copying decoded PCM into a lock-free SPSC ring
FormatsMP3, FLAC, AAC/M4A, OGG/Opus, WAV
TextSingle-channel SDF glyph atlas, generated on device from the bundled font
Version0.17.0
LicenceMIT

Features

What it does

  • Locked 120 Hz. The renderer runs on its own thread at display priority with its own EGL context. Nothing in the pipeline waits on anything else: the audio ring is single-producer single-consumer with a validated read, and DSP snapshots pass through a lock-free triple buffer.
  • Real HDR, honestly reported. The window colour mode is set to HDR, the panel's own HDR-to-SDR ratio is requested, and trace cores are driven to the live ratio while halos stay at SDR. The panel decides the actual peak, and the diagnostics page puts an SDR-white swatch beside an HDR-core swatch so you can judge it by eye.
  • The audio it shows is the audio you hear. A forwarding sink timestamps the decoded PCM so the DSP reads what is audible now, plus a small lead for display latency. Audio offload is disabled to make that possible, and no microphone permission is needed for local files.
  • It never fakes the signal. In YouTube mode, if output capture returns silence the app falls back to an ambient beat grid, and the Island Falls bars sink to dots with the panel reading a dash rather than pretending the ambient synth is music.
  • Controls are geometry. A triangular prism for play, twin columns for pause, a braid for shuffle. The seek bar is a ring of glyphs you drag around, and volume is a helix.
  • A library, not a file list. Smart artist and title names, each song once, clips filtered out, and covers drawn for anything missing one. The naming and tidying logic is pure Kotlin with unit tests.
  • An offline build that cannot phone home. The local flavour drops the internet and microphone permissions at the manifest level rather than just disabling a feature. Both builds install side by side.
  • No ads, no analytics, no account. Your music never leaves the phone. The only network use in the full build is YouTube mode with your own API key, and optional cover lookup that sends nothing but a title and artist.

Visualizers

Scenes, terrains and scopes

Island Falls is the most involved. A spectrum analyzer sits on a cliff edge above a rainbow waterfall, its 96 bars recorded into a ring texture, with the cliff lip fitted to calibration handles and stored as a lookup texture. A silent video plays into a surface texture behind it.

Harmonic Terrain raises rock mountains with each frequency band over a photographic backdrop. Douglas Fir drives spectrum light through a forest's own trees, fed by a separate analysis path: per-channel Blackman FFT power across 96 triangular log bands with a silence gate.

Alongside those are Spectral Range and its terrain relatives, Crystal Peaks, Nebula Ring, Retro Horizon and Liquid Flow, a glyph waterfall, a stem constellation, a chroma wheel, and a plain green CRT oscilloscope that redraws its whole trace from the newest audio every frame.

Swipe the visualizer area to switch, or tap the visualizer name to cycle that one's presets.

Honesty check

Where it differs from the plan

The repository publishes what was built differently from the original brief, rather than quietly shipping around it.

  • The glyph atlas is a single-channel SDF, not MSDF. It is generated on device from the bundled font with a 4x supersampled raster and an exact Euclidean distance transform. At the sizes used, the rounded corners are indistinguishable and no offline tool is needed.
  • Text entry uses a native dialog. API key, origin and search query go through a themed Android text field. Everything else is glyph particles.
  • The stem separation is an approximation. The intended stem code was not available, so stems are band energy plus per-band spectral-flux onsets rather than true separation.
  • HDR headroom is limited by the buffer layer. Extended-range brightness does not reach the BLAST buffer layer, which reports a ratio of 1.0. Hardware composer dimming means the output does not clip, but the granted ratio at low screen brightness measured between 1.0 and 1.48.
  • Tested on one phone. Built on and for a Pixel 10 Pro Fold. Other devices should work and have not been tried.

Media

Gallery

Links