Remember the Adlib and Sound Blaster sound cards and their FM synthesizer chip? (think music from Doom, Monkey Island, Duke Nukem, and many many more)
My idea for this project came because I love the sound of FM synthesis and OPL2, and because I wanted to try and save some money on gear by building my own synth around the 9 voice 2-operator Yamaha OPL2 FM chip from those sound cards, with all parameters of the chip and its two operators accessible with pots and buttons. I found the data sheet on-line and thought that it couldn't be that hard. That turned out not to be entirely true and that I had underestimated the project a bit, as I had hardly any experience with electronics let alone analogue electronics required for audio. Lets see where this goes!
My wish list of features is as follows:
- OPL2 synthesizer with all of the chips parameters/registers addressable with physical buttons and potentiometer sliders
- Indicator LEDs and 7-segment displays to see all the current settings of the synth
- MIDI-in via DIN socket
- SD card for loading and saving patches (imagine loading some of the sounds from your favourite DOS games)
- Possibility of either configuring and addressing all 9 voices individually (9 mono synths in one!)
- ...Or layering two or more voices in order to get some more complex sounds (4 to 18 operator) even though max 2 operators can be in a feedback loop at a time.
- A button to randomize a patch for some FM happy accidents
- A one octave keyboard so that patches can be previewed without connecting a MIDI keyboard.
The audio board
OPL2 synthesis consists of the main OPL2 chip the YM3812 and its DAC chip YM3014B. The YM3812 outputs a rather weird digital signal format so you cannot 'just' pick another DAC chip.In what I hoped could be a short cut, I found this Arduino/Teensy/Pi board on tindie but after assembly I found out that its rather noisy. I had read that in the comments on that page already, but I wasn't sure if they were meaning noisy in the ears of an audiophile or if it was real old fashion noisy. Turns out it was the latter. I started investigating a bit and I found out that the LM386 amplifier chip on the board was missing a capacitor, and after I added it the situation did improve but not quite enough. The LM358 op-amp used on the board was probably not improving the situation much and to my untrained eyes it looked like there was no separation of digital and analogue ground. So the board is good for fooling around, but not suitable for making an instrument. On Vogons forum I spoke with the user LABS who made his own Sound Blaster compatible ISA sound card and he was very helpful and said he made a perfectly quiet OPL2 implementation by using better op-amps and better isolation of the analogue signal path, so that made me confident that it can be done.
The tindie board turned out to be a good investment none the less because it has made me able to quickly test the YM3812 and YM3014B chips I ordered from china, and the new op-amps I wanted to use. The YM chips are very cheap, and I got a batch of 10 for less than 2$. Actually I thought I ordered just two OPL2 chips but turns out it was two batches of 10! Be aware that some sellers sell repainted OPL2 chips as new even though they have not been in production for 20 years or so. Working but used "pull" chips is the best you can hope for it seems, but I have 19 spares if I need it now.
Instead of the LM358 / LM386 op-amp stage on the tindie board, and the TL074 op-amps used on the adlib sound card, I have decided to use OPA1688. Its modern, made for musical instruments, and works as a headphone driver, so at least on paper it seems perfect for this project. I also ordered Nichicon audio grade electrolyte capacitors, although it may be a bit of an overkill. They are definitely better than the no-name ones, and still so cheap that there was little price difference between them and regular caps as I only need a few.
Controller, MIDI and storage
To control the board I will use an Arduino Mega 2560. It has enough analogue and digital IO pins to control the whole thing, and I will design the audio board such that it can use the same software examples made for the tindie OPL2 board. It should be fast enough and have enough RAM for the project as well. MIDI will be input from the DIN to one of the digital IO pins.Patch storage is just a standard full-size SD card module for the Arduino.
Power
To power the synth I am using a pre-assembled power supply based on three LT1963 voltage regulators. It has three separate 5V outputs, so that I have one for the digital circuitry, one for all the LEDs, and one for the analogue circuitry. It has a "sense" pin to sense and try to account for electrical noise, but since it is pre-assembled I doubt the sense pin will help me much as I cannot connect it near the components that I want to keep noise free. I hope that using a good quality dedicated regulator for the analogue part of the board will mean that the noise will not be too much of an issue. To power the OPA1688 op-amps the 5V will further more go into yet another power supply based on a XL6008E1 regulator (also pre-assembled) capable of delivering dual supply power. I do not know a lot about this Chinese regulator, but the few opinions I have been able to dig out about it were all positive so I will give it a try. On my cheapo meter it gives me a stable ±5V.
User interface
The buttons are Omron B3F-5050. They are cheap, reliable, and have a nice soft yet tactile click. I also sampled some B3F-4055 from China, but they felt too hard and they were also fake (the Omron key-caps didn't fit on them).
For selecting synth patches and changing between the 9 voices I will use rotary encoders, and for volume a standard rotary potentiometer.
Case
I plan on making the case itself in black painted wood, with an aluminium or stainless steel IO plate at the back. The top will be 7C83 dark grey 50% transparent plexiglass which I will get cut and engraved on a laser. I think it will look sleek and with all the LEDs still clearly visible underneath. If I can afford it I might pay for having it hard-coated.Progress so far
I have only just gathered all the components, and I ran out of bread board wires for my prototype of the audio board. The only assembly I have made so far is that I have mounted the OPA1688 op-amps onto SMD to DIP adapters and tested them (all working perfectly) and tested the two power supply units. Will post an update when I have made the breadboard version of the audio board so that I will know what the audio quality will be like and determine if I am ready to continue with the project. I estimate that the final synth will cost me around $200 in parts (in hours a whole lot more) which actually is not all that cheap, but I think I have enough components to build at least 2 more since its sometimes impossible to order less than 10 of a given electrical component.
Questions and suggestions in the comments are very welcome :)
Comments
Post a Comment