carrier and harmonicity in fm synthesis

    Jul 26 2013 | 11:52 pm
    How do the carrier and harmonicity relate mathematically to one another in fm synthesis?
    For example if I change the frequency of the carrier, then how much should I change the harmonicity?

    • Jul 27 2013 | 12:22 am
      it's all laid out pretty nicely here:
    • Jul 27 2013 | 12:23 am
      also do check out [simpleFM~], which I believe comes with the default install of max.
    • Jul 27 2013 | 12:35 am
      Harmonicity controls the relationship the sidebands have to the carrier. With an integer harmonicity, they are always harmonic. You don't need to change this ratio when the carrier changes. But, you might want to change if you want to create a different timbre.
    • Jul 27 2013 | 12:54 am
      in real life, the harmonicity of a body, string or drum is not only depending on length, thickness and how it is stimulated, but also on the material.
      the relation between length and thickness of a string is one of the factors which influence the harmonicity factor. this is why a harp sound better than a toy guitar and a concert piano better then an upright piano.
      no idea what you now would do for a frequency modulated sinewave in a synthesizer, or what you would need to do. i would go so far saying that if harmonicity is a matter in a digital synth, then it is caused by the intermodulation distortion of the speakers, and not happening in the computer code at all. ;)
      in an FM synth, harmonicity (or better: inharmonicity) is to my knowledge somethign you dont need to remove, but you will typically add some by detuning the modulator a bit against the carrier.
      and this factor should be linear ... 500 Hz modulated by 124.8 Hz should fit perfectly to 1000 Hz modulated by 249.6 Hz.
    • Jul 27 2013 | 6:25 am
      [Sorry for any duplication of information]
      The point of the harmonicity ratio and modulation index is that they will provide a constant timbre across the spectrum, so you don't need to change them at all with the fundamental. (they're calculated as a ratio to the fundamental, so their frequencies are automatically scaled with the fundamental)
      Loosely speaking, the harmonicity ratio (as mentioned earlier) controls the harmonicity/inharmonicity of the spectra. A harmonicity of 1 will (potentially) have all harmonics. A harmonicity of 2 will have only the odd harmonics. The higher the harmonicity, the broader the spacing of the harmonics. (I'm assuming sine waves for both oscillators) Near integer values will often sound better than pure integer values (1.995 vs 2.0) because of the subtle modulations, beatings, etc. they introduce.
      The modulation index controls (roughly) the intensity of the partials. The exact volume of each partial (for two operator FM) is non-linear and described by a Bessel function. You can find a chart of that with a quick search. With a mod index of zero, you get the carrier frequency, since there's no modulation signal present. As you increase this value, you will see more harmonics.
      All that said: FM is really complex once you start introducing more operators, and it becomes quite hard to predict. Chowning himself said that he doesn't anticipate that we will come anywhere close to exhausting the timbral possibilities of six operators (e.g. the Yamaha DX7!).
    • Jul 27 2013 | 10:45 am
      This simple patch demonstrates the concise, eloquent and comprehensive explanations already given:
    • Jul 27 2013 | 3:21 pm
      Chowning's original article explains this pretty clearly. MSP Tutorial 11 tries to condense the vital info in simple prose, and demonstrates a basic implementation.
      N.B. In the current MSP tutorial the following paragraph has been deleted, which was a sidebar in earlier versions.
      Technical detail: In John Chowning’s article “Synthesis of Complex Audio Spectra by Means of Frequency Modulation” and in Curtis Roads’ Computer Music Tutorial, they write about the ratio Fc/Fm. However, in F.R. Moore’s Elements of Computer Music he defines the term harmonicity ratio as Fm/Fc. The idea in all cases is the same, to express the relationship between the carrier and modulator frequencies as a ratio. In this tutorial we use Moore’s definition because that way whenever the harmonicity ratio is an integer the result will be a harmonic tone with Fc as the fundamental.
    • Jul 27 2013 | 9:02 pm
      The problem with the idea of harmonicity ratio (HR) is the implication that harmonic partials are produced only when the ratio is an integer. Look at preset #7 in the MSP Tutorial 11, which has a carrier of 392Hz and a pitch frequency that is the same. If you change the HR to 0.6666 and the carrier Freq to 1176Hz, you will hear a very similar sound. They both have odd # harmonics and are at the same pitch frequency — 392Hz, midi note# 67. In fact there are numerous non-integer ratios that produce harmonic partials.
      The question of how to best express the ratio of the carrier frequency (Fc), the modulating frequency (Fm) and resulting pitch frequency was carefully considered many years ago and the conclusion was to have a freq (pitch frequency) that can be scaled by independent numbers for Fc and for Fm. So I recommend adding a third flonum between the two and change the labels from “carrier Freq” and “Harmonicity” to “Freq (pitch)” and “c” and “m” with the understanding that the carrier frequency will be c * Freq and the modulating frequency will be m * Freq. There is a modification of the 11FM synthesis patch that is downloadable from (see attachment or) that shows this change. The original Harmonicity value is labeled.
      As long as c & m are integers and form an irreducible fraction, the pitch will be the pitch frequency. For example, 6 and 4 will produce a pitch an octave higher and should be 3 and 2. Note that c:m of 3:2, 2:3 3:4, 4:3, 5:1, 5:2, etc. all produce harmonic partials at the same pitch frequency (392Hz) but with differing spectral shapes for a constant modulation index function shape. With a low Modulation Index, e.g. 1, a resonance can be produced by making c=5 and m=1. The spectral envelope has a peak at the 5th harmonic and the harmonics are at intervals of the pitch frequency — adjacent harmonics, but none at the pitch frequency (fundamental)! At low pitch frequencies the sound is double reed-like. With an increase of Index the bandwidth of the spectrum increases and the fundamental will appear. Regenerate the 5:1 example as a long tone (15000ms) having a freq at 80Hz and an Index function that ramps up from 0 to about 10. At first you hear 400Hz and and then the pitch freq of 80Hz. Now set m = 1.01 and you will hear beats as the lowest harmonics spread into the negative freq domain, reflect around 0Hz and add to the harmonics in the positive domain with a small offset.
      With an eye on the Harmonicity ratio number object, note it is not at all apparent that these timbres are possible.
      You can download a sound synchronous slide set that shows how the Bessel functions and Index determine partial amplitudes and bandwidth.
    • Jul 28 2013 | 12:09 am
      cool patch n00b_meister!
    • Jul 28 2013 | 7:43 am
      I love this forum. Don't ever change.
    • Jul 28 2013 | 11:27 am
      @seejayjames Thanks, just a hack of simpleFM~. Maybe Christopher or John could improve it; Bessel functions frighten me.
      @Wetterberg n00bs and Legends. All together.
    • Jul 28 2013 | 12:14 pm
      A small addendum for cases when the Fc is rather small and the modulation index is relatively high (in other words, when negative frequencies appear in the spectrum). In those cases, even if one would guess (based on the harmonicity ratio) that the result is a harmonic sound, this might not hold due to the mirrored frequencies.
      The point is that the mirrored freqs will coincide with (some of) the original (positive) freqs only if 2Fc/Fm is integer. In this case, the mirrored freqs would only modify the spectral shape of the sound, but they won't introduce new partials. If 2Fc/Fm is not an integer, the mirrored freqs will appear as new spectral components, in which case one needs to dig a bit deeper to decide whether the result would be harmonic or not.
      Cheers, Ádám
    • Jul 28 2013 | 1:22 pm
      somehow it is very suspect that brendans patch is centered around a [!- 110], isn´t it?
      take care not to press the wrong button in this patch, or there will be no longer any harmoni in your -city.