Sega Genesis FM Instrument Basics

This is a bit off subject for my other topics, but I find this stuff fascinating. The Sega Genesis / Mega Drive has a very interesting FM synth chip, YM2612. It also has a simpler (pulse wave) audio chip, TI SN76489, which isn’t much different from earlier consoles (NES, gameboy, etc), and I won’t talk about that today. It was the FM chip really made Sega Genesis music shine.

This is for newcomers, who are not familiar with how FM synth works, and are wondering how to make their own instruments for it.

I am using Deflemask, set to Genesis. Now, if you click on the “edit” next to the instrument, you get this panel with 100 different settings and it’s not clear what everything does.

So, I’m going to try to make this as simple as possible, so you can understand it. The FM chip is generating sine waves. It generates 4 different sine waves, and their rates depend on the MULT (multiplier) values. Those sine waves could be half speed (MULT = 0), normal speed (MULT = 1), double speed (MULT = 2), or higher. It volumes up or down each sine wave based on a standard ADSR model, and then combines them based on the Algorithm (ALG).

The standard FM synthesis has a carrier wave and a modulator wave.

We start out at Algorithm 4, which has 2 separate sets of FM synth. OP 1 modulates OP 2. OP 3 modulates OP 4. Those are then combined to generate the note. Algorithm 4 is a good place to start.

Let’s simplify it a little more, just for learning purposes. Turn off OP 1, OP 3, and OP 4 by lowering their TL (max volume) to the bottom (127 = silent). That leaves OP 2 as a unmodified sine wave. I raised the S (sustain level) so it’s just a constant tone.

And this is what is generated, just a sine wave. At higher frequencies it sounds a bit like a flute. At lower frequencies it is barely audible.

Because OP 1 is off, it is unmodulated. Let’s turn OP 1 back on, by raising its TL nearly to the top. (Also, I set S, sustain level, to the top so it’s a constant value). TL is very touchy… it’s not linear, it’s some kind of logarithm scale. This is a middle range modulation.

And this is the output.

Half the time, the sine wave is stretched out, and half the time the sine wave is squished in. If we continue to raise the TL (max volume), it gets more and more modulated. The more modulated the sound, the more “interesting” it gets.
And you can go much further, because OP 1 always has the ability to feedback into itself for extra modulation. FB is the feedback level, and it only applies to OP 1.

If you turn it up, while OP 1 has its TL very high, you get so much modulation it turns into noise.

This effect could be used for percussion instruments, such as cymbals.

But, the main takeaway is that OP 1 modulates OP 2, and OP 3 modulates OP 4. Other algorithms modulate in different ways, and I will talk about that later.



Now, let’s go over the ADSR settings.

First, the TL sets the maximum volume. S sets the sustain volume. The scale is not linear. 0 = 100%, about 8 is 50%, 16 is 25%, etc. It goes all the way to 127, but at 40 it’s already so quiet it’s basically off.

A is the initial fade in period. It raises to the TL level, and then it immediately goes into decay until it reaches the Sustain level, then if D2 is set to the top it will hold until it gets a “note off” signal, and that’s where R (fade out) comes in. But, if D2 is set low, it will automatically fade out after it reaches the sustain level.

“Note off” is the TAB button in the pattern editor. It will say “OFF”.

The ADSR for the carrier wave (in Algorithm 4, those are OP 2 and OP 4) will change the volume of the note. If you want a fade in, you could set the values like this, and increase the attack period.

Or if you want a fade out, you lower S Sustain level and D Decay controls how fast it fades out.

There are thousands of different ways you could adjust these. You could even try to simulate an actual instrument. I took a recording of a piano note…

and adjusted the settings until I got a similar output.

I know this doesn’t look the same, but this was the WAV export…
So, I would conclude that what you see in the Deflemask box isn’t exactly the shape of the output. Attack happens much faster than it appears. I’m not complaining. Just an observation.

But, back on subject. ADSR… how does it affect the modulation wave? Where the value is high, there is more modulation, and when it is low the carrier wave returns to a basic sine wave.

OP 1 will be the modulator for OP 2…

You could keep the modulation wave constant, and get an unchanging tone.

Or you could fade in to get a wah kind of effect (below)

Or, you could start at full modulation and fade it down for a “ow” sound (below)

This is similar to the default instrument that loads in Deflemask, and it is the kind of sound I usually think of when I think of FM instruments. This setting sounds good for most purposes.

Now, I said that this chip only makes Sine waves, but if you do some things, you can kind of fake some other waveforms. If you turn just OP 2 and OP 4 on, and play them at max level with the exact same settings, they combine and the peaks will clip, and it forms square waves.

Interesting effect, but 99% of the time you would want to set the 2 carrier waves to different multipliers.

If you add feedback at just the right level, (carrier wave at MULT=1) you can kind of get sawtooth waves.

I added a little attack fade in, and this sounds a bit like brass.

Most of the instrument design decisions will be carefully adjusting the TL level or the ADSR of the modulation wave. Even slight changes to the modulation wave will sound like a different instrument.


Lets go over the different algorithms in reverse order.

Algorithm 7 has 4 unmodulated sine waves. You would set the multiplier values different for each wave, and it would sound like a church organ.


Algorithm 6 has 2 unmodulated sine waves (3 and 4), and it has OP 1 modulate OP 2. It’s basically a single FM synth with some unmodulated sine waves added to it. You could maybe use 3 and 4 at higher multiples to create a chord.


Algorithm 5 has 3 carrier waves, and OP 1 modulates all of them. Again, you could make a chord by setting 2,3,4 at different multiples.


Algorithm 4 we already covered. OP 1 modulates OP 2. OP 3 modulates OP 4. I like this one best, you have 2 different FM synths to work with. It’s easy to understand what’s going on. The rest of the algorithms below are a bit complex.


Algorithm 3 has OP 1 modulate OP 2, which is then added to OP 3 to finally modulate OP 4. You could turn OP 3 off, to simplify it to 1->2->4 modulation chain.


Algorithm 2 is similar to 3. OP 2 modulates OP 3, which is added to OP 1 to finally modulate OP 4.


Algorithm 1 has OP 1 and OP 2 combine to modulate OP 3 which then modulates OP 4.


Algorithm 0 is the most modulated, and typically produces highly noisy sounds (cymbals or electric guitar). OP 1 modulates OP 2 which modulates OP 3 which modulates OP 4. I have seen instruments that just turn off OP 1, because you get enough modulation with just 2,3, and 4.

Now, Deflemask has dozens of FM instruments in a folder for the Genesis that you should try out, and usually you can get what you want by just slightly adjusting the TL on the modulation wave, or slightly adjusting the ADSR levels.


A few more buttons

The FMS is frequency modulation, which is vibrato. The AMS is amplitude modulation, which is tremolo. You have to manually click the AM checkbox on each Operator that you want Amplitude Modulation to work. Unfortunately you can’t modify the speed of the FM or AM effects, just the depth.

RS (rate scale, or key scale) shortens the note at higher octaves. I just leave it at 0 or 1.

DT is detune. -3 to +3, and zero is normal. Presumably, you would set different carrier waves to different detuned rates to have them make a wuwuwuwuh kind of effect. This is kind of how a chorus effect works on a guitar.

SSG-EG has different effects depending on the value, some of them are retriggering the note, 5 is a fade in. I don’t really use SSG-EG. Values 2 and 6 continuously fade in and out, which I guess could be used as a slow tremolo effect.

There’s also some other weird mode that involves channel 3. In Deflemask you have to change the system mode to Genesis Ext Ch3. Something like… channel 3 can set 4 different frequencies to play, and those 4 frequencies can be any 4 notes. I’m not really sure how this works, so I won’t say any more.



The Genesis can also use samples. I believe that only one channel can use samples, and they tend to be low quality. I think people use them for drum samples, or a single vocal sample.


I plan to make a YouTube video so you can watch me adjust the instrument settings and hear how it changes. It’s on my TODO list.



The Konami VRC7 chip is also an FM synth. It was only used in the game Lagrange Point. It works very similar to the Sega Genesis chip, except that you always have 1 modulation wave and 1 carrier wave. This is from Famitracker.

Unlike the Genesis, you mostly have to use the presets built into it. You can use any of the 15 presets and 1 custom instrument. You can’t play 2 different custom instruments at the same time. Luckily, the presets sound ok.

The ADSR values work like this…

attack (<-slow | fast->)
decay (<-slow | fast->)
sustain level (<-high | low->)
release (<-slow | fast->)

A value of zero (for A,D,or R) = don’t increase or decrease

The “wave rectification” button makes the sine wave do this.

It sounds a bit more like a triangle wave than a a smooth sine wave.

In order to get the VRC7 set, you have to go to Module/Module Properties, and change the dropdown from “NES channels only” to “Konami VRC7”. And in order to test / hear the FM instrument while you edit it, you need to have one of the FM channels selected in the pattern editor. When you add an instrument, if you have a standard NES channel highlighted, it will add that kind of instrument. If you have an FM channel highlighted, it will add that kind of instrument.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s