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.
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.
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.
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.
and adjusted the settings until I got a similar output.
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)
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.
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.
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.
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.