carrier and harmonicity in fm synthesis
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?
also do check out [simpleFM~], which I believe comes with the default install of max.
I guess you were looking at this:
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.
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.
[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!).
This simple patch demonstrates the concise, eloquent and comprehensive explanations already given:
----------begin_max5_patcher---------- 1976.3oc6asziaaCD97Ff7ef0WZahiAeHpGEEEnH.AsG1aE8RSPfrDsMSkkb oj23MAc+sW9PZW6csjn13Uqrc8ASIJIxY93vgy7Qou9xWbwnoYaX4i.+D3u. WbwWk0bgtNUMWTUwEiVFtIJILWeiihxVtjkVLZb4EKXaJzW3mk+x4wrogow4 fvkqR3EqiY.dNXFeCK9Wz+t84VEVDsfmN+iBVTgQDHT+Ivw.OO0+DDUUfQSf fOT8PyDymptWn7RkUwi08d1zO8FWxssd55kYqKRXEZg91adVVZQN+KLUkH7j cpOMbot9Q+ISDGlFtcawSqZJjtx+8kuPUJKF+zAbQKBSmyxaG2BBPea3F9nD 23ofhEL.aiBxXfLyoB97EEi0GdGTlMSWwxr30IgEYBkQYLOORvJXf2r+a9tg jX1JlprrGlsNMNTIRgIiAWEJtVNZnuPAe4TgrkhDY44FggMmmWvDS.+gpEyR VWvksRYCkvlUnjj2tH6yoxF46ykOP9przbYakouEoMPRBSZFnjJ4HtfEVn5t 2ORdTB3yYhj32OprmyA+vTgD1.SYIIRKozXvJlHZcdtrS+QfDud2kStEGS3o rnr0oZvDgZv9xyyUaRQIpBTfitv0qCVXvSHKL0vlMFX4QgIrXvzq0W5xrXvu mFy1LFrLjKMd3oU1MWwDWCjBgrO1HGjkMfb7JeAekbfr3yLVJHJTH3LAXlf8 OqYoQWqGb2o6uybU16KBEKyR4Q40LZCaXz1UB+z6FsodlBr8i1zfg7ncJ6yR g7gC1uRpxvIM4mEAoZGsXu.UAE9PGsQYIYBycCmPn3.GzX0QDOLkpNhhQT2. Ift8SsM14UC1c6DTScEWuhY5mQyRxBkR3GNbfK9fCtRPjwuhcCXtHb0hl.YW GsAG0W6yAAwODj2Ftb6LbkymmFlbPwqCuwXtbAGK.KockBdbLA.362LVQOFm VZIRD3A6.R3bLhDe2ajKSCabtiqwbvDGsSKf.oySc3oCF+LqWNkItoQu0Hec fJDieZp6C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OsHu5Suhp9XbPAlW1Fnzqa0oa0YGZkgXixP5rxPjoRn9xhH5kkcMlw6dF xubOujwSSKO8oSQU7UYghFzYE0QqnlDxIXs++cNw7NSIUYp93mNM79SEpYBi RCQ85DFpUBlZCL66YxPqlIS6cAS859Zgf4z6Blc1XDxyyPIpUDq+ELpcNX8G n1XpcmomcWzAAqmM9sJhDZ6B1tYjNdq+POoKPXmWE3PU9oPqWfaXh+VEBh1J CMHwezP0UlcoJ32+txnVgX8+53DGqMEGjB1yfMlc4Oz+wJZmb0+qVZWBW3mg 72sZYPDZnJXv9WvrJper+.kJl1y3c+LwfcbTENN2c1yMQLn9Obb6RRFOnErd 1ymUVk39edLBY6zkCR7y2moLCGXDHwv7u+sm8Dx5G1ZWpCxPtQ14U.OTS4wN KNDYvJ+V4iA4LTk+.qMePOAy3qli6Pzqit0Y1owkaiT3pUWwD4kBsQYGsL7S FIxcr4bdp4byVCNRvthW8HlWI0QghnE7BVTwZgYGs135LRdEcGJ+6+DEU.FL -----------end_max5_patcher-----------
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.
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.
cool patch n00b_meister!
I love this forum. Don’t ever change.
Thanks, just a hack of simpleFM~.
Maybe Christopher or John could improve it; Bessel functions frighten me.
n00bs and Legends. All together.
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.
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.