Very fun board for AdLib music enthusiasts
For OPL2 Audio Board
This is a great little board which makes it easy to play around with a classic FM chip. The library also offers some useful functions I wasn't expecting (e.g. a single command to load an instrument from a byte array, configuring all aspects of a channel and its ops in one go). For me, though, the best part is that it's possible to directly write any value to any register on the board, meaning you can take full control of the OPL2, even allowing things for which there are no library functions, e.g. CSW mode for speech synthesis fun.
There is a lot of noise even with the volume pot at minimum (muted) when using headphones directly, so definitely use a separate amplifier (as others have recommended), which allows you to set the board's volume high enough for the signal-to-noise ratio to be much better.
The example programs themselves are good demonstrations and they all worked first time, although the ones which stream music as OPL commands from the computer to the Arduino suffer slowdown issues. The code implements a buffer to help avoid slowdowns with sudden bursts of data but the buffer refills slowly so it doesn't help with sustained high throughput, plus the timing is all relative rather than absolute (seconds of delay build up over a few minutes of playback). I made some simple modifications to fix this (Python sends chunked data, Arduino tracks absolute playback time), in case anyone is interested (to the seller: Please _don't_ include my real name if using this code):
- Python: http://puu.sh/CeeIq/f4d7ef78a7.py
- Arduino: http://puu.sh/CeeIE/e9b2f92bb1.ino
Also, there is a "DosBoxPassthrough" Arduino example included, but it would be nice to know how to use this with DOSBox (is a modified version required?).
In any case, if you are considering buying this board but are unsure, I highly recommend it. The example program issues I described are easy to fix, and besides, isn't it more fun to write your own code? :)
Just make sure you start with the volume pot fully anticlockwise, as the audio output can get extremely loud and distorted (I've never been able to take it above 50%).
I'm very happy with the board will probably buy a second one so that I can have a dual-OPL2 setup.
Response from Cheerful Electronic | Dec. 11, 2018
Thanks for your review!
The Python example was kindly contributed by another user. Since I'm not an expert Python coder I will try out your changes and see if I can add them in the next library update :). As you requested I will not mention your name.
For the DosBox passthrough there is a modified version of DosBox available on my Github page https://github.com/DhrBaksteen/ArduinoOPL2.DosBox. It includs a build for Windows and allows you to use your OPL2 board as a real sound card. You simply configure the COM port in the DosBox config (See the readme.md). I'd love to hear from people using this custom build to hear what they think and if they have any suggestions!