TRAX 1.0 RC1 — a music player for the PSP and PS Vita
Two native builds, thirteen visualizations, a ten-band equalizer, and about 47,000 lines of C
Today I’m releasing TRAX 1.0, a music player for the Sony PlayStation Portable and the PlayStation Vita. It plays the files you already have, from the card you already own, and it is quick about it.
I didn’t write TRAX because the world was short of music players. I wrote it because I wanted one on my PSP, and because it turned out to be the most fun I’ve had with a compiler in a very long time.

What it plays
MP3, FLAC from 8 to 32 bits a sample and up to 24-bit/192 kHz, AAC and ALAC, WAV, Opus, and the PSP’s own ATRAC3 and ATRAC3plus — the last decoded on the machine’s Media Engine, the way Sony intended. Cue-sheet albums show up as one entry and open like a folder to their numbered tracks.
There is no converting, no re-encoding and no companion app on a desktop. You copy your music to the card and you play it.

What else it does
- A ten-band equalizer — 31, 62, 125, 250 and 500 Hz, then 1, 2, 4, 8 and 16 kHz — adjustable while the music keeps playing, with presets.
- Thirteen visualizations: a vintage cassette whose reels wind in real time, analog VU meters with needles that take 300 ms to the mark and step a little past it, a dancing orb, stereo level meters, drifting smoke, a flight through a starfield, a grid of glowing spheres, LED bars, spectrum rays, a waveform, a ring, a waterfall, and the words themselves where the track has an .lrc beside it.
- A cassette you can build yourself. The tape shell is described in JSON, so you can rebuild a tape you actually owned — the shell, the label, the little window — and watch it play.
- Six play modes on the shoulder buttons: play once, repeat, repeat one, shuffle, shuffle with repeat, and global shuffle across the entire card.
- A sleep timer of 15, 30, 60 or 90 minutes that fades the music out over the last half minute rather than cutting it off.
- Screen off while playing, after 30 seconds to 5 minutes without a press, because the screen is where most of the battery goes.
- Cover art, an album gallery, a battery meter, and resume exactly where you left off.

The Vita version is a real Vita app
This is the part I want to be clear about, because it is the question I get asked most. The PS Vita build is a native Vita application. It is not the PSP version running under emulation. It is drawn for the Vita’s own screen, at the Vita’s own size, and the progress bar and the gallery respond to touch. One app, two builds, each one at home on its machine.
Written in C, because it had to be fast. TRAX is about 47,000 lines across 181 source files, almost all of it C with a little C++ where it helped. That was a deliberate choice. These are machines from 2004 and 2011 with a slow card in the slot, and the difference between a player that feels instant and one that makes you wait is measured in milliseconds you have to go and find.

A few of the numbers I’m proudest of
- Global shuffle indexes 1,615 tracks in 1.657 seconds on a Vita — 975 tracks a second — and 1,663 tracks in 2.433 seconds on a PSP, 684 a second. It uses 102 KB and 71 KB of memory respectively to do it. It opens no files while it walks the card, which is the only reason those are seconds and not minutes.
- Streaming reads the card in 128 KB aligned blocks. On one card, misaligned reads cost 123 milliseconds a block against 8 milliseconds aligned. Same card, same data, fifteen times the speed, for nothing but asking properly.
- Opening a 9 MB MP3 used to take 2.55 seconds, of which 2.3 seconds was spent reading a tag sitting at the very end of the file. It doesn’t do that any more.
- A five-hour-fifty-two-minute soak test — 468 tracks, every visualization — finished with the heap exactly where it started, having held between 3.6 and 4.1 MB the whole way through.

The fun part
Honestly: all of it. Chasing a 123-millisecond card read down to 8. Getting a needle to swing like a real VU movement instead of a bar pretending to be one. Watching a cassette’s reels turn at the right speed for the first time. Finding out that a PSP is a great deal more capable than anyone remembers, if you are willing to meet it halfway.
I tested it on real hardware, with a deliberately horrible library, for months. I would do it again tomorrow.
Availability
TRAX 1.0 is free
- PSP — a PSP 1000, 2000 or 3000 with custom firmware (tested on ARK-4) and a 32 MB Memory Stick or larger.
- PS Vita — a homebrew-enabled Vita. TRAX.vpk installs with VitaShell, and your music can live on internal storage, a microSD adapter, or uma0.
Download, the full manual and the release notes are at https://traxpspvita.wixsite.com/trax
Issues and questions: https://github.com/traxpsp/traxpsp
Contact: Lisa – traxpsp@gmail.com


Facebook Comments