I like things that make music. And I like old computer parts. There is a nice overlap there, and I’ve always had a particular appreciation for it.
Chips that were designed not for any practical purpose, but specifically just for making tunes fascinate me. That and some of the sometimes unique ways silicon engineers had to build these circuits way before one could just store PCM samples on a CD.

There are many such components I played around with in the past, but the most successfull of these projects is this one. Combining two YM3812s into a MIDI synthesizer with three modes: 18-voice mono, 9-voice stereo with full pan (not just hard left/right/center) or "independent", where each chip is a separate 9-voice synth with separate audio output.

Hardware

The hardware design is obviously based around two YM3812s, each with 9 FM synthesis channels containing two operators, and their required DACs. And even though for stereo and independent modes, their outputs are available separately on the "Stereo" output, they of course need to be mixed for the "Mono" output, requiring a decent chunk of op-amps.

To glue it all together, some kind of microcontroller is needed, and I went with the incredibly cheap but fast nanoCH dev module with a 48MHz RISC-V core. It turns out calculating the register settings (particularly "block" and "fnum") on the YM3812 from a desired frequency is a bit difficult, especially since there are often multiple possible register values yielding the same frequency, and the highest-quality one needs to be chosen.
And yes, although that data could be loaded into a LUT for all the possible MIDI notes, its nicer to do the calculations in real time, especially once even simple effects like pitch bend come into play. For the nanoCH, this is no problem.

There is also a 128KiB spiflash for storing instrument patches, since doing that for all the standard MIDI instruments is a surprising amount of data.

The nanoCH is a 3.3V part while the rest of the board is 5V, but its mostly fine. The YM3812 inputs are TTL-compatible, so they’re fine receiving 3V digital signals, though the shift register used as a port expander needs to be specifically a 74HCT type part. The only place a level shifter is needed is for the data coming from the MIDI cable. However, I took care to ensure all the parts on the board can be had new from distributers like Mouser and TME, with the obvious exception of the YM3812s.
The nanoCH can be most cheaply found on AliExpress.

Modes

The synthesizer can operate in three distinct modes.

Mono: both sound chips are combined into a single output. This allows their voices to be used together, 18 in total. This is the most basic and default mode.

Stereo: every note is played on both chips simultaniously, but its volume on either chip is adjusted according to the MIDI channel’s stereo pan, giving the illusion of stereo audio. This, however, reduced the amount of usable voices back to 9.

Independent: each chip acts as a separate synthesizer. Each responds only to events on a specific range of MIDI channels and their outputs can be individually obtained on the same output as the stereo audio.

Patches

Patches are stored directly on the synthesizer using a SPI flash ROM. It turns out that storing YM3812 register settings and metadata for every standard MIDI instrument takes more than the 2KiB SRAM on the nanoCH. It would also be cool if those settings could be persisted while still allowing the user to update them. So new patches can actually be uploaded over the MIDI port and the amazing OPL3 Bank Editor used to create them in the first place.

Although a Java application from me is still required to convert from the OPL3 Bank Editor file format to the binary representation my synth uses, and push it out over the MIDI port using sysex messages, updating all of the patches only takes a click of a button and a few seconds, meaning editing instrument sounds can be done almost live and you can hear the changes after only a few moments.

Download + Build Instructions

If you’d like to actually build one of these for yourself, all the files for it, hardware and software sources plus pre-built gerber and firmware files are available on GitHub.
Build instructions are also included, together with a guide on where to buy all the parts.