Resource icon

ulc-codec Demonstration (NDS) 2022.09.18

Hey everyone.

After developing a GBA player for my MDCT-based audio codec, I decided to port it to the DS, and in the process completely revamp both the UI and API.

As with the GBA player, this is mostly proof-of-concept (decoding 32kHz audio still takes 1-2 frames, at an overall CPU usage of ~35%). But I thought it was pretty nice as a tech demo.

More technical details are available on the GitHub page, but the basics for the codec itself are:
  • Target bitrate: 32..256kbps+ (no hard limits on playback or coding rates)
  • MDCT-based coding using sine window (window switching plus overlap switching to minimize decimation)
  • Noise-fill (similar to PNS)
  • Nybble-based syntax (no entropy-code lookups)

The GitHub page contains the source code to the player as well as the tools necessary to convert your own files.

The ROM file itself has a single demo track embedded in it (Sefa & Crypton - Lastig; all credit goes to them, and I am making no money off this project). If a DLDI interface is available, additional tracks may be added in a folder named "ulc" (an example of this is included in the download, containing Dr. Rude & RATKID - Self Esteem; all credit goes to them for the music).

I've tested the demo on an original R4 as well as an R4SDHCi card, and it works fine, provided that the CPU isn't overloaded (eg. excessively long track names; drawing the text can eat up a lot of CPU time).

Included in the download is the ROM file, a Python script to add metadata to tracks, an example song for streaming playback, and a copy of the reference encoder as of 2022-09-18 (compiled using generic x87 code; might not be as fast as the AVX version, but should be compatible everywhere) plus a batch script to use ffmpeg for handling file conversion into something the encoder can understand.

Usage:
  • A/B unpauses and pauses music, respectively
  • L/R shoulder buttons to switch between tabs
  • L/R shoulder buttons plus Select plays the previous/next song, respectively
  • Touchscreen should work about as expected (tap to play a song or change playback modes, swipe to scroll, etc.)

The codec itself is free open-source software, under the GPLv3 license.
  • Screenshot.png
    Screenshot.png
    83.5 KB · Views: 66
  • Like
Reactions: IC_
Author
Aikku
Downloads
254
Views
1,514
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Aikku

Latest updates

  1. Update to latest encoding tools

    Heavily improved noise fill, psychoacoustics, and some improvement to transient detection. Fixed...
General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/Y9WKPRUjNQ4?si=raUf8jEiET8rmH2P