Win95-Tracker-CYD Is A Cheap Yellow Mod Tracker With I2S

The Cheap Yellow Display is a great little module to start a project with, but it wouldn’t necessarily be our first choice for an audio device. That’s because the PWM on the ESP32 isn’t exactly going to put out hi-fi, and the I2C pins needed for the I2S audio protocol aren’t broken out on the CYD board. That didn’t stop [ivans805] AKA [Ill-Town-5623]– he wanted a mod tracker, he had a CYD board, and necessity is the mother of invention.

It isn’t exactly a ground-breaking hack: he’s just tossed a bodge wire to the pin he needs on the ESP32, and run it to the I2S sound module. Still, in this era of endless modules it’s nice to see someone hacking what they have rather than running to AliExpress or somewhere else for a part that has everything the project needs built in.

The bodge wire is how you know it’s a hack.

What really caught our eye when we saw this project on the ESP32 subreddit was the aesthetics. It might be called “Win95-Tracker-CYD” but that interface just screams “Amiga” to us– look at that Boing Ball! Given where MOD files come from, that’s perfect. The UI was made with Lopaka.app, which we haven’t seen before but appears to be a sort of WYSIWYG editor for embedded device interfaces.

While you don’t need an ESP32 to play mod files– the diminutive CH32 can manage the task— there’s no arguing the CYD could make a nice little player. If you actually wanted to push its limits, you might try a 3D engine instead,

10 Cent Microcontroller Makes Tracker Music

We are absurdly spoiled these days by our microcontrollers. Take the CH32V00X family– they’ve been immortalized by meme as “the ten cent micro” but with a clock speed of 48MHz and 32-bit registers to work with, they’re astoundingly capable machines even by the standards of home computers of yore. That’s what motivated [Tim] to see if he could use one to play MOD files, with only minimal extra parts– and quite specifically no DAC.

Well, that’s part of what motivated him. The other part was seeing Hackaday feature someone use a CH32V003 making chiptune-like beeps. [Tim] apparently saw that post as a gauntlet thrown down, and he picked it up with an even smaller chip: the CH32V002, which he proceeded to turn into a MOD player. For those of you who slept through 80s and early 90s (or for those precocious infants reading this who hadn’t then yet been born), MOD files are anĀ  electronic music format, pioneered on the Amiga home computers. Like MIDI, the file specifies when to play specific voices rather than encoding the sound directly. Unlike MIDI, MOD files are self-contained, with the samples/voices used being stored inside the file. The original version targeted four-channel sound, and that’s what [Tim] is using here.

As you can see from the demo video, it sounds great. He pulled it off by using the chip’s built-in PWM timer. Since the timer’s duty cycle is determined by a variable that can be changed by DMA, the CPU doesn’t end up with very much to do here. In the worst case, with everything in flash memory instead of SRAM, the CPU is only taxed at 24%, so there’s plenty of power to say, add graphics for a proper demo. Using the existing MODPlay Library, [Tim]’s player fits into 4kB of memory, leaving a perfectly-usable 12kB for the MOD file. As far as external components needed, it’s just an RC filter to get rid of PWM noise.

[Tim] has put his code up on GitHub for anyone interested, and has perhaps inadvertently cast down another gauntlet for anyone who wants to use these little RISC V microprocessors for musical tasks. If you can do better, please do, let us know.

Continue reading “10 Cent Microcontroller Makes Tracker Music”