On Fri, 20 Jun 1997, somebody wrote: > Pardon my complete ignorance on what an f-number is. You realize that you > have now piqued my curiosity. I am by nature a curious person, and when you > mention something I don't have a clue about, I NEED to know! :) uhh, Mind > if I ask? When programming the OPL2 to play a specific frequency, you have to convert it from Hz to a block and f-number. In order to simplify the electronics inside the chip, you convert the frequency to a number that is closely related to the phase increment in the synthesizer. That number is called the f-number. To go from a frequency fmus in Hz to a phase increment, you multiply fmus by 2^19, then divide by fsam, or the sampling frequency, which is 1/72 of the input 3.6MHz input clock to the OPL2. Rather than forcing the chip to do it, you calculate the phase increment yourself by by multiplying fmus by 2^19, then dividing by fsam. However, this number can vary over a pretty big range. Each octave doubles the frequency, and thus the phase increment, so a lot of bits would be required. Rather than do this, the data is divided into two parts, sort of like scientific notation or floating point. Ten bits are allocated for the mantissa: this is the F-number. Three bits are then allocated for a base-2 exponent, called the block. Multiplying the F-number by 2^block gives the OPL2 the phase increment for the base frequency. Finally, there is a multiplier. The OPL2 creates sound using two operator FM-synthesis. Each operator can be set to run at some multiple (1/2, 1-10, 12, 15) of the base frequency, allowing you to get rich harmonic sounds. It also allows you to set _both_ operators to the same harmonic, allowing you to achieve a frequency of up to 15 times the maximum base frequency. Without the multiplier, you're either limited to roughly 3000 or 6000 Hz (I don't remember which). With it, you can go well above the top end of human hearing. > . . . Ethan Brodsky ---- Ethan Brodsky