justinwhite.work

Tailoring a Pocket Audio Player for the Trimui Brick

Why I forked the NextUI Music Player to add hierarchical playlist folders, expanded playlist limits, and an inverted-index search engine for large offline libraries.

by Justin White5 min read
Vol. I, No. OneReleased October 2026

One of the quiet pleasures of open-source handheld hardware is that your devices don't have to stay frozen in someone else's assumptions about how you use them.

The Trimui Brick; a compact vertical handheld typically used for retro emulation under the NextUI custom firmware happens to have all the physical ingredients of a great dedicated digital audio player: tactile hardware buttons, clean USB-C and Bluetooth audio output, low idle power draw, and a pocketable form factor that doesn't beg for your attention with notifications.

The community-built

already laid a strong foundation for local playback, radio streams, and hardware media controls. However, once I loaded my full local music collection onto the SD card and started using the Brick as a daily offline player, I ran into friction around how larger libraries are organized and traversed on a D-pad interface.

Rather than working around those limits, I created a custom fork

tailored specifically to how I organize and search my own library.

Breaking Out of Flat Playlists

Most lightweight embedded media players assume you only maintain a handful of playlists. When playlist storage is flat and capped at a small count, curating a large offline collection quickly turns into a single scrolling wall of entries.

In practice, my listening habits are hierarchical. I group playlists by context crates of instrumental focus music, hiking mixes, full discography runs, and genre folders. To make the player feel natural on the Brick, I reworked playlist handling in two ways:

  • Playlist Folders: Added first-class support for nested playlist directories, allowing playlists to be grouped into folders rather than dumped into a single flat namespace. Navigating with a D-pad becomes a shallow tree traversal enter a folder, pick a mix, and start playback in a few button presses.
  • Expanded Playlist Capacity: Raised the internal limits on total playlists and entries so the player scales comfortably to heavily curated SD cards without truncating collections or degrading menu responsiveness.

Fast Library Lookup with a Reverse Index

Searching on a handheld without a physical keyboard and on modest embedded hardware presents a classic systems trade-off. When your library grows past a few hundred tracks, D-pad scrolling is too slow, and running linear substring scans across thousands of file paths and metadata strings on every character input introduces noticeable UI stutter.

You don't need a heavy database engine to solve this on a handheld; you just need the right data structure.

I built a lightweight reverse index (inverted index) directly into the player's library indexer:

  • Tokenized Ingestion: As the player scans tracks and playlist entries, titles, artists, and folder names are normalized and split into compact tokens.
  • Inverted Posting Lists: Each token maps directly to the set of track and playlist IDs containing it.
  • Sub-Millisecond Intersection: When querying from the handheld UI, lookup resolves by intersecting the posting lists for the active query tokens rather than iterating over the entire library array.

Even on the Trimui Brick's constrained ARM processor, reverse-index lookups feel instantaneous, keeping the UI locked at a smooth frame rate while narrowing down thousands of tracks in real time.

Software That Fits Like a Tool

Not every piece of software needs to be a generalized platform. Sometimes the most rewarding engineering is taking a tool you use every day, filing down the rough edges that clash with your workflow, and shaping it until it fits your hand.

The source code and release packages for my fork are available on

.