Nearly all digital music systems use some form of wavetable synthesis to generate signals. The wavetable is a section of memory that contains a list of values corresponding to the desired waveform. The computer reads the numbers from the list at a steady rate (the sampling rate), repeating the table when the end is reached. If the table contains a single cycle of the waveform, the frequency produced would simply be the sample rate divided by the number of values in the table:
The output is a very high fidelity copy of the waveform:
Fig. 1 Using all values in the wavetable gives an exact copy of the stored waveform.
To produce higher pitches, the system skips some values each time. The number of values skipped is the sampling increment. A sampling increment of 4 (reading every fourth value) gives an output two octaves higher than the original.
Fig. 2 Effect of increases sampling increment.
The frequency produced is the original multiplied by the sampling increment.
It is possible to have fractional increments; the computer interpolates between listed values, or simply reads a number twice. (If all numbers are read twice, the pitch is one octave down.) This distorts the waveform somewhat.
Fig. 3 A sampling increment of .5.
Amplitude control can be added with a variety of techniques. The straightforward way is to simply multiply the sample value by a number derived in a similar manner from an envelope table. A more efficient technique is available if the waveform is a sine. During each sample period two values are taken from the table: one found the usual way, and another at a location offset from the first according to the envelope. The two values are then added before moving to the output. The sum of two sine waves that are out of phase is a sine of amplitude determined by the phase difference. If the offset equals half the table size, the output will be zero.
Frequency modulation is a very powerful algorithm for creating sounds. The heart of the technique is the way extra tones (sidebands) are created when one oscillator is used to modulate the frequency of another. These sidebands are symmetrically spaced about the frequency of the carrier, and the size of the spaces is equal to the frequency of the modulator. Increasing modulation increases the number of sidebands, but the amplitude of the sidebands varies in a rather complex way as the modulation changes.
Fig. 4 Spectrum of simple frequency modulation
There are three kinds of relationship between the frequencies of the carrier and modulator, and each produces a different family of sounds.
If the modulator and carrier are the same frequency, all of the sidebands will be harmonics of that frequency, and the sound will be strongly pitched. You may wonder how that can be if there are supposed to be sidebands at frequencies lower than the carrier. If the spacing of the sidebands is the same as the carrier frequency (as it will be if modulator equals carrier), the sideband just below the carrier will be zero in frequency. The sideband just below that will be the carrier frequency, but negative. When that concept is applied in reality, the result is the carrier frequency, but 180deg. out of phase. That sideband therefore weakens or strengthens the fundamental, depending on the modulation index. Further low sidebands interact with upper sidebands in the same way. The regularity of the sidebands produces the strongly harmonic sound usually associated with synthesizers, but if the modulation index is changed during the note (dynamic modulation) the intensity of the sidebands will change in some very voicelike effects.
Fig. 5 Harmonic spectrum generated with FM
If the frequencies of the carrier and modulator are different but rationally related, the result will again be strongly harmonic, and the pitch will be the root of the implied series. (For instance, frequencies of 400hz and 500hz imply a root of 100hz. ) If the carrier is the higher frequency, the resultant sound will be quite bright, sounding like a high pass effect at low modulation and becoming very brash as the modulation increases. The frequency of the carrier is always prominent. If the carrier is the lower frequency, the sound will have "missing" harmonics, and those that are present will appear in pairs (see figure 6). At low modulation index, you will hear two distinct pitches in the tone; as the index is increased, the timbre of the upper pitch seems to become brighter.
Fig. 6 FM with modulator frequency higher than carrier
If the frequencies of the carrier and modulator are not rationally related, the tone will have a less definite pitch, and will have a rich sound. Very often the effect is of two tones, a weak pure tone at the carrier frequency, plus a rough sound with a vague pitch. With careful adjustment of the operator level of the modulator, the carrier tone can be nearly eliminated. If the frequencies of the carrier and modulator are close to, but not quite harmonic, timbral beating will occur at a rate that equals the difference.
Fig. 7 Nonharmonic FM spectrum
A particularly powerful aspect of frequency modulation as a music generating technique is that the timbres can be dynamically varied. By applying an envelope function to the amount of modulation or the frequencies of carrier and modulator, sounds can be produced that have a life and excitement far beyond that available with the older synthesis methods.