ADSR and Yamaha Cost Saving
This has been the FM week. I have fixed some NeoGeo sound issues, which have been released on MiSTer today and continued work on the YM3526 OPL sound chip. Let me talk about FM sound a bit.
NeoGeo, Megadrive and Ghosts'n Goblins have something in common: FM sound chips built around the OPN Yamaha operator. These FM chips were capable of producing realistic sounds. A key aspect of that feeling was the envelope of each sound.
The envelope is how the volume of a note changes over time. Each instrument has a different profile, which Yamaha originally defined with five parameters:
* Attack rate: how fast the sound went up, exponential in dB
* Decay rate: how fast the sound faded away once reached the maximum, linear in dB
* Sustain level: some instruments will change to a different decay at this level
* Decay 2 rate: how fast the sound faded after the sustain level had been met, linear in dB
* Release rate: how fast it faded once the "piano key" had been lifted, linear in dB
You can imagine, the more the parameters, the larger the memory needed to store them and the more complex the circuit used to process them. YM2203 and successors (OPN) used 5 bits for each attack and decay rates, then 4 bits for sustain level and release rate. Making it a total of 23 bits per FM operator.
Although OPN was very successful, after some years of use it was clear that things could be simplified. Most instruments actually fall in one of two categories:
* Percussive: sound cannot be sustained, like an acoustic guitar
* Non percussive: sound can be sustained, like a flute
So the need for a different decay rate beyond sustain level was not all that clear. More bits, more circuits, more money... and for little value. So Yamaha removed it for YM3526 (OPL operator). Instead of that, it created a new option: one bit to choose between percussive and non percussive. The difference being that non percussive sounds will stay at sustain level until the "piano key" was released. See attached figure.
Another change was to reduce the resolution of attack and decay rates. Instead of using 5 bits to program each rate, it was reduced to 4 bits. With these 4 bits rates could be selected to last anywhere from 39s to just 0.002s. As you see, a very wide range.
These were small cut downs in the flexibility of the sound generator that seemed small but that formed the basis for the consumer market. The YM3526 is the origin of the OPL series of Yamaha devices that were used on MSX and PC computers for many years. During the same time the more complex OPN and OPM (YM2151) dominated the professional market (including arcade games).
SEGA Megadrive had still a different approach to cost savings: it kept the OPN operator but integrated the DAC (digital to analog converter) chip into the FM chip, effectively cutting the resolution from 16 to just 9 bits. What does that mean? It means that the difference from a loud sound to a quiet one could be 40dB larger on a NeoGeo -with its full DAC- than on a Megadrive.
And why the interest in YM3526 and OPL? Because of Bubble Bobble music, which you should hear soon...
Comments (16)
gracias!
Muchas gracias por compartir esta información con nosotros. Es muy interesante.
Thank you for an excellent write-up!
Updates like this one are the reason why I am a patron 😀
This makes me just want to live in FPGA coding. Well, clearly detailed, awesome.
Por post como este, por tu perseverancia en los detalles, y por el mimo que pones en tus cores... todavía te preguntarás por qué tienes 1200 patronos? Sigue así!!💪🏻
I liked the surprise ending !
Very Nice write up
That is so great - audio is often overlooked. Best regards from a game sound engineer and composer since 1997.
This was an interesting read, I find it always interesting to read how the need to cut costs lead to certain technological developments. I recently read a lot about the original Gauntlet hardware, its design was also driven by the idea to cut costs (and to maximize profits with its game mechanics), but in the end the idea of cutting costs e.g. by going to a 4 layer mainboard lead not only to lower costs because only one board was needed, but also to more complex hardware in the future. Cutting costs is one of the most overlooked factors in technological advancement.
Dumb question... are you an audiophile?... or are you approaching this from a musical instrument aspect... because you attention to detail is a breath of fresh air... just curious.
I'm captivated by some of these melodies but I suppose it's fair to say that I've always pushed for more attention to sound in all the systems I've touched.
Love FM. Tracking music on them is very fulfilling. Creating realistic sounds with such a limited bit and waveform pallette.
Obsessive attention to detail is why we are all here! Thanks.
Wow 🤯
Thanks for taking the time to write all of this, very interesting.
