# How does Fm work?

I've a question about fm chips works.
Please do not tell me about the theory of synthesis. I know that in terms of mathematics, ( fourier series etc) but my question is another. How does these chips produces the waveform in terms of digital electronics?
For example if I want a simple square wave this can be done with astable mutivibrator and probably the PSG do this by flipping a high order bit of a counter driven by a oscillator (clock).
For example how does a oplx chip generate its waveforms? Does it generate using a series of precalculated digital values or it has some kind of oscillators and filtering? Or what kind of other solution? Is there a link where I can deep inside this details?

Aangemeld of registreer om reacties te plaatsen

Yamaha FM chips work completely digitally. The operators look up in a quarter-sine table (mirrored twice) using a ±20-bit cyclic phase counter to produce the waveform. The frequency specified in the f-num + block registers specifies the phase increment per internal step (block shifts the f-num).

When a modulator is used, the output of the modulator is simply added to the carrier’s phase counter in addition to the f-num. This is called phase modulation.

A further detail is that the quarter-sine table is stored in logarithmic scale, and there is an additional inverse log lookup table to produce the final output waveform. This allows the chip to use simple additions to manipulate amplitude, rather than multiplications. Levels, envelopes, tremolo, key scaling, all are done in logarithmic scale.

Lastly there is only one actual operator circuit. It is re-used in sequence for each channel’s operators. The YM2413 for example has nine 2-op channels so 18 operators in total. The input clock is 3579545 Hz. It takes 4 input cycles to process one operator, so processing all 18 takes 72 cycles. Therefore the output frequency of the YM2413, how often it processes all channels per seconds, is 49716 Hz.

1. The YM2413 manual
2. WouterV’s YM2413 research project (in more easily readable format here at the bottom).

There is a lot of detailed information there.

Once you have a good understanding of the inner workings and you need to find out about specific under-specified details, the Nuked.OPLL emulation core is a very accurate representation of the internal working of the YM2413.

By thoroughly understanding the YM2413 I was able to do this.

Quote:

By thoroughly understanding the YM2413 I was able to do this.

It is simply impressive. How much does costs In cpu usage?

The PCM streaming requires full CPU attention of course, however the PCM output itself is just one `outi` per sample, optionally with a table lookup if you don’t pre-process the data. And hblank synchronisation for timing. There was plenty of time left to add that visual effect. For more information, forum thread here and project page here.