Yamaha OPL2 Desktop FM Synthesizer


#1

Hello, first-time browser, first-time caller here. Not currently a paying VHS member but we’ll get to that eventually.

Like many people, I grew up in the early 1990s. In a home with a computer programmer for a father, we always had a PC around, which in retrospect was really nice because it meant that I had no shortage of the weird old IBM PC games of the late 80s and early 90s. This, of course, means that I was basically beholden to the AdLib and Sound Blaster cards for all the metallic noises that are associated with my childhood, because let’s be real, nobody was actually spending that much money on a Gravis UltraSound in 1992. Come on, get real.

Smash cut to 2019, and 30 year old Keegan is now a competent programmer, an extremely tenuous electrical engineer (read: I can google stuff and I know how to work KiCad) and a somewhat capable musician. It turns out these things, combined with a millennial sense of nostalgia (because our generation is never going to be able to enjoy any of the things our parents convinced us were important in life; thanks a lot, capitalism) is a really bad. My idiot brain says to me “Hey Keegan, wouldn’t it be fun to make music using a Sound Blaster with a real OPL2?” I mean yes, it would, but it’s kind of inconvenient. There are some options, though, ranging from “use a giant PC tower with an AdLib or Sound Blaster in it and then try to wrangle MIDI connections” to “use a Toshiba Libretto (which has an OPL3) and a Parallel Port MIDI adapter” but all of these things have a nasty tendency to break down spectacularly during a live performance, and that’s happened to me enough with real musical equipment that I know I don’t want it.

Okay, new plan: Take the OPL3LPT (https://www.serdashop.com/OPL3LPT) you bought from some guy in Europe, slam it onto a laptop with a parallel port, and…wait, crap, what do I do for software to drive it now? If the goal is to use MIDI, AdLib Tracker 2 (http://www.adlibtracker.net/) hasn’t supported MIDI synth mode in ages, and MIDI drivers become a problem running it under DOS anyways. That’s not going to work. But wait! There’s Freq Monster 801 (http://fm801.kewl.org/) that talked to old OPL chips to drive them as a MIDI-compatible synthesizer! Surely we can repurpose that somehow, right? Well, not exactly: The OPL3LPT only uses half as many pins for data transmission and does things in two-byte sequences, so maybe we could write a driver…no, Windows drivers are terrible.

Hey, I know: there’s a mode in there to use an external DLL for OPL3 emulation. Let’s just gut that and rewrite its exports to talk directly to the parallel port and send the messages we want. The OPL2/OPL3 spec isn’t really that complicated (https://www.fit.vutbr.cz/~arnost/opl/opl3.html). This probably would have worked, but while I was having some trouble with it, I got the bright idea to e-mail Freq Monster 801’s author and ask him some questions. He thought what I was doing was stupid, but asked to see my code. I sent it to him, and instead he just added a mode for the OPL3LPT to the program and sent me a working copy back.

End result: Panasonic Toughbook CF-29 (Pentium M 1.7GHz, 1.5GB RAM, 128GB SSD, Windows XP) with the OPL3LPT attached, M-Audio Fast Track Pro for MIDI input, flattened to one channel through MIDI-OX (http://www.midiox.com/) and piped back into Freq Monster 801 through LoopBe1 (https://www.nerds.de/en/loopbe1.html) played with, of all things, a Rock Band 3 Pro Guitar Controller for the Wii, because apparently these things just have MIDI output on them?

Whatever, man, fine. Here’s the result:

Well that was a bit of an odyssey. Still with me? Cool.

Wouldn’t it be better if this was all just one box, designed for this specific purpose?

I thought so, so now I’m essentially just building a desktop module that replicate the user interface of JuceOPLVSTi (https://bsutherland.github.io/JuceOPLVSTi/) using an Arduino Pro Mini (clone) and a real Yamaha YM3812/Y3014B pair. Jury’s still out on exactly how to represent things in terms of rotary encoders (which are expensive) versus displayed parameters (displays for which are also expensive), but we’ll figure that out. For now, the circuit involves driving the YM3812 from a serial shift register off the Arduino, running the digital out into the Y3014B (as expected for this chip) and then I’ve stolen the amplifier circuit from the AdLib clone here (http://www.malinov.com/Home/sergeys-projects/isa-opl2-card) and grafted it on.

Ideally, this will take MIDI input, have mappable MIDI CCs, and save/load patches to/from SD/microSD. When I dig up the schematic so far, I’ll post it here. I’ll continue to update this thread as I go.


#2

Ahh, the memories of going from ISA to PCI sounds cards and dos usage of the
same .

Sounds like a mighty cool/fun project, I look forward to seeing the final
result.

As a side comment I did own a Gravis Ultrasound alongside several variants of
the SB cards in the early to mid 90’s. The AWE64 was my fave until the SB
Live line came out.

Mods and tracker heaven :wink:


#3

Don’t get me wrong, the GUS was a great wavetable card, and yeah, for tracker music it was basically unimpeachable! In 2019, though, I don’t feel like there’s a lot that differentiates it from any other wavetable hardware (a controversial opinion, maybe), modern implementations of which are less of a pain.


#4

You might find the MIDIBox project interesting. They’ve been going for years doing all kinds of MIDI stuff, and it’s a really flexible platform for building custom MIDI peripherals, so I thought they might have an OPL2/3 module. And lo and behold, of course they do, which integrates with their existing LCD & front panel and other such. So if you don’t want to do a bunch of hacking around, maybe just build one :slight_smile:.

http://www.ucapps.de/midibox_fm.html


#5

That’s right! the MIDIBox OPL unit showed up in some research I did around this a long time ago, and is a pretty solid implementation. I’m somewhat hesitant to start digging into its schematics because of the license they use on it (not that it’s bad, just that it’s unconventional, shall we say, and I still don’t know what this project is going to turn into) but it’s nice to know that someone’s done this with reasonable success before.

At one point, I’d actually considered just including an ISA edge connector on the board, and letting the user bring their own AdLib/Sound Blaster. I’m still not quite over that idea yet.


#6

Throwing this idea out there, did you want to host a night at vhs to bring likeminded people in one room? If you get somebody to bottom line, you won’t need to be a member. Of course we’d love you to sign up that were more about community and cool stuff than membership numbers.


#7

Paging @drewbharris


#8

This is so cool and I would like to come to this proposed night please


#9

I will bottomline this!


#10

Well, it looks like I’m hosting a “Crappy PC FM Synthesis” night.

I regret many things in life, but this is not one of them.


#11

awesome, if @Logan_Buchy and @kvanderlaag aren’t already talking, figure out a date and throw it on the calendar!

This is awesome!