### Human: 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.### Human: 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.### Human: add asdf a dfa