What’s wrong with this simple FM synth design?

Most synthesizers labled ‘FM’ in fact do phase modulation (PM, see https://en.wikipedia.org/wiki/Phase_modulation ). There are some benefits (mostly leading to more stable sound over a large tonal range).
The OPL2 may use this too, I found no clear evidence, but the Wikipedia article also uses the term ‘phase modulation’.

For short, many musical synthesizers labeled ‘FM’ in fact featured ‘PM’, so you might try go with that, and check if it better fits the expected OPL2 sounds.

From a quick glance to the Audiolet source, I would guess the Sine oscilator is doing true FM, so you may need to replace it and add a phase input to allow phase modulation.

Basically, the line

output.samples[0] = Math.sin(this.phase);

used by Sine of the carrier oscilator would have to read something like

output.samples[0] = Math.sin(this.phase+phase_offset);

with phase_offset controlled by the mod oscilator instead of the frequency.

Leave a Comment