prompter: There is a sound synthesis technique called Frequency Modulation wherein an oscillator (such as a sine wave), has it's frequency modulated by another oscillator to produce a more complex sound. Eg, when the second oscillator is high, the frequency of the first oscillator becomes faster. However, in practice hardly any real musical synthesizers perform real FM synthesis. Instead they use a technique popularized by the Yamaha DX7, and do what's called Phase Modulation instead. Please explain how Phase Modulation works, and why it's used over real Frequency Modulation in most FM synthesizers.

assistant: Phase Modulation (PM) is a sound synthesis technique that is closely related to Frequency Modulation (FM) synthesis, but with some key differences. In PM, instead of modulating the frequency of the carrier oscillator, the phase of the oscillator is modulated by a modulating oscillator. The amount of phase modulation is directly proportional to the amplitude of the modulating oscillator, and the result is a sound with a complex waveform that can be shaped by adjusting the parameters of the modulating oscillator.

The main reason why PM is used over real FM in most FM synthesizers is due to the simplicity of the synthesis process. PM is much easier to implement than true FM synthesis, which requires a more complex algorithm to calculate the frequency modulation. PM can be implemented in a much simpler way by using a lookup table to determine the phase shift caused by the modulating oscillator. This makes PM more efficient, and thus more practical for real-time synthesis.

Another advantage of PM is that it provides a greater degree of control over the resulting sound. In FM synthesis, the frequency modulation can cause unpredictable sidebands to appear in the resulting waveform. In PM, the sidebands are more predictable, and can be controlled by adjusting the parameters of the modulating oscillator. This allows for greater precision when shaping the sound, and makes it easier to achieve the desired result.

Finally, PM has been popularized by the Yamaha DX7 synthesizer, which used a form of PM synthesis known as "linear frequency modulation" (LFM). LFM is a specific form of PM in which the modulating oscillator is also a sine wave, but with a frequency that is allowed to vary linearly over time. This technique was used extensively in the DX7, and became synonymous with the sound of FM synthesis in the 1980s.

In summary, while PM and FM are closely related synthesis techniques, PM is generally preferred in modern synthesizers due to its simplicity, greater control over the resulting sound, and its association with the iconic sounds of the Yamaha DX7.

prompter: Nice explanation - thank you. I've got another question for you. 

Ring modulation (RM) creates new frequencies, called sidebands, by adding and subtracting the two original frequencies. These often sound quite cool, except the new frequencies generated a) are often not part of the harmonic series, and thus sound not in scale, and b) because of the simple arithmetic nature of how the new tones are created (simple addition and subtraction) those new tones almost never track musically across the keyboard.

This is opposed to to FM/PM, which is generated by sounds that are harmonically proportionate to one another, thus giving sounds that (usually) track nicely across the keyboard. Why does FM/PM have this nice melodic property and not RM?

assistant: The reason why FM/PM synthesis tends to produce sounds that track nicely across the keyboard is due to the relationship between the frequencies of the carrier and modulating oscillators. In FM/PM, the modulating oscillator is usually a harmonic of the carrier oscillator, meaning that its frequency is a multiple of the carrier frequency. For example, if the carrier oscillator is generating a frequency of 440 Hz (A4), a modulating oscillator with a frequency of 880 Hz (A5) would be one octave above the carrier and therefore a harmonic.

When the modulating oscillator frequency is a harmonic of the carrier frequency, the resulting sidebands generated by FM/PM are also harmonically related to the carrier frequency, and thus tend to track musically across the keyboard. This is because the harmonic series is a natural and mathematically predictable set of frequencies that is present in all musical sounds, and the ear is naturally attuned to these harmonic relationships.

In contrast, with RM, the new frequencies generated are the sum and difference of the two original frequencies, and these new frequencies are not necessarily harmonically related to the original frequencies. This can result in sidebands that do not track musically across the keyboard, and may produce dissonant or out-of-tune sounds.

However, it's worth noting that there are certain situations where RM can be used creatively to produce interesting and unique sounds, even if they do not track musically across the keyboard. In fact, many classic synth sounds from the 1960s and 70s used RM to produce distinctive and otherworldly sounds that were not necessarily melodic, but had a unique character all their own.

assistant: The reason why FM/PM synthesis has this nice melodic property and not RM synthesis is due to the fact that in FM/PM, the modulating oscillator is typically a harmonic multiple of the carrier oscillator. This means that the resulting sidebands are also harmonic multiples of the carrier frequency, which are in tune with the original frequencies and are part of the same harmonic series. This results in a more musically pleasing sound that tracks nicely across the keyboard.

In contrast, in RM synthesis, the two original frequencies are simply added and subtracted, which can result in sidebands that are not harmonically related to the original frequencies. This can result in frequencies that are out of tune with the original sound and not part of the same harmonic series. Furthermore, because the sidebands are not necessarily harmonic multiples of the original frequencies, they may not track musically across the keyboard in the same way as the original frequencies.

Therefore, while RM synthesis can produce interesting and unique sounds, it may not always be suitable for creating melodic or harmonically pleasing sounds.

assistant: Phase Modulation (PM) synthesis is another type of synthesis via signal modulation. As in Frequency Modulation (FM), a carrier wave is modulated by another oscillator. If in FM the frequency of the carrier vawe is driven by the amplitude of the driver wave, in PM the phase of the carrier wave is driven by the amplitude of the driver wave. This means that the  waveform of the carrier signal is shifted forwards or backwards in time in response to the modulating signal. As the phase of the carrier waveform changes, the resulting sound can exhibit various forms of spectral complexity, including harmonically rich or inharmonic timbres. PM synthesis is often used to create metallic sounds, plucked string instruments, and other sounds that require a percussive or transient character.

Both techniques allows to synthesis a wide range of sound. In practice, by assuming the carrier wave is a sinusoidal function, PM is more efficient than FM with respect to computationoal complexity, and it requires fewer parameters to control. In FM synthesis, the ratio between the modulating frequency and carrier frequency must be carefully adjusted to create a specific sound. In contrast, PM synthesis only requires the modulation index to be adjusted. This makes it easier to use for sound designers and musicians who may not have a deep understanding of the complex math involved in FM synthesis.