WAV2VGM Plays Audio Via OPL3 Synthesis

Once upon a time, computers didn’t really have enough resources to play back high-quality audio. It took too much RAM and too many CPU cycles and it was just altogether too difficult. Instead, they relied upon synthesizing audio from basic instructions to make sounds and music. [caiannello] has taken advantage of this with the WAV2VGM project.

The basic concept is straightforward enough—you put a WAV audio file into the tool, and it spits out synthesis instructions for the classic OPL3 sound card. The Python script only works with 16-bit mono WAV files with a 44,100 Hz sample rate.

Amazingly, check the samples, and you’ll find the output is pretty recognizable. You can take a song with lyrics (like Still Alive from Portal), turn it into instructions for an OPL3, and it’s pretty intelligible. It sounds… glitchy and damaged, but it’s absolutely understandable.

It’s a fun little retro project that, admittedly, doesn’t have a lot of real applications. Still, if you’re making a Portal clone for an ancient machine with an OPL3 compatible sound chip, maybe this is the best way to do the theme song? If you’re working on exactly that, by some strange coincidence, be sure to let us know when you’re done!

Open Source Hardware Video Game Music Player

[Aidan Lawrence] likes classic synthesized video game music in the same way that other people “like” breathing and eating. He spent a good deal of 2017 working on a line of devices based on the Yamaha YM2612 used in the Sega Genesis to get his feet wet in the world of gaming synths, and is now ready to take the wraps off his latest and most refined creation.

One of his earlier attempts at a hardware VGM player.

The YM2151 Arcade Classic is an open source hardware player for Video Game Music (VGM) files. It uses no emulation, the files are played on the device’s YM2151 chip in the same way they would have been on a real arcade cabinet at the time of their release. Interestingly, as some arcade machines were exceedingly rare or even scrapped before release, [Aidan] believes that his player may be the first time some of these songs have ever been played (at least in public) on real hardware.

The YM2151 synthesizer is powered by a STM32 “Blue Pill” board, which was selected as much for its capabilities as it was its low cost. The STM32 loads the VGM files from an SD card, and puts track information for the currently playing song on the 128×32 OLED display. A few tactile switches under the screen allow for shuffling through the songs stored on the card, and a slide switch for mute rounds out the simplistic but functional user interface.

In the GitHub repository, [Aidan] has provided the source code, schematics, Bill of Materials, and KiCad-generated Gerber files; everything you need to create your own version of his player. After listening to it rock out for a few minutes in the video after the break, we’re tempted to take him up on that offer.

This player reminds us of a similar design, also using original hardware, that we covered last year. The logical next step for this project would be to flesh out the UI and put it into an enclosure like this SNES chiptune player.

Continue reading “Open Source Hardware Video Game Music Player”