FM/PM modulators (operators) & Nyquist frequency?

Hello,

It’s a recommendation question. I understand the “audible” frequencies (generated by carrier operators in FM/PM world) doesn’t exceed sampleRate / 2, named Nyquist frequency (bandlimiting), but is this limit is also valid for modulators (or not) in FM/PM world?

Maybe Paul (@baconpaul), author of the excellent Six Sines plugin for DAWs (Win/Mac/Linux) can reply? :wink:

Thanks in advance.

Dominique.

In FM you generate sidebands with each operator. So, you want to keep the carrier + sidebands under the nyquist. A high frequency modulator will widen the sidebands more. And with multiple operators these can stack up.

I should add, 4x oversampling plus a band limiting decimation filter is probably good enough depending on what you mean by ‘modulation’. Or at least it’s the approach I took!

Oh. Further… by ‘modulation’ for the modulator, I mean that it’s highly dependent on what your modulator is. For example if it’s a pure sine, it won’t alias, and instead it’ll just drop to a lower register and give you a pitch you didn’t expect. But for a modulator with higher bandwidth it gets crazier.

Thanks @codyge. To be more precise:

  • My module in development (DeXtral) is using phase modulation (PM).
  • All waveforms (for carrier & modulator operators) are pure sine only, like the real DX7.
  • Modulator can modulates carrier(s), another modulator(s), or… itself (feedback).

Any operator (either carrier and/or modulator) may have important frequency ratio (up to x 63.3).

For C4 (approx. 262Hz) by 64 (I exagerate a bit the number, to give a safe margin) = 16,768Hz, stay below 22,050 (half of 44.1Hz).

But for C9 (approx. 8373Hz) by 64 = 535,872Hz !!! :joy:

The Nyquist frequency is an absolute mathematical limit, it is not a recommendation. So the role of the signal does not matter. Any attempt to represent a frequency over the Nyquist frequency will produce an aliased result.

That would still be aliasing! A high frequency sine above the Nyquist frequency would alias down to a lower frequency sine below the Nyquist frequency after analog to digital conversion. If the intended frequency is an integral multiple of the Nyquist frequency than it will be harmonious with the original frequency, but it would still be aliasing.

Thank you Dave, as good news, it will be more easy for code implementation! :wink:

I agree: even for pure sine, above Nyquist frequency cause aliasing. Most explanations I’ve found on the web use sines as examples!

Indeed! Technically aliasing, but it’s somehow more tolerable than if you were to modulate with anything else. I guess that’s why the DX7 uses PM and sines.. smart engineers!

Pure sines because Fourier theorem that says all sounds can be expressed as a sum of sines, each called a “partial”. Phenomenon such as Nyquist apply to each partial. You can usually break down analysis to the simple case of sines and extrapolate from that.

Hello Paul, thank you very much, I agree about any sound is always a sum of sines (Fourier theorem). But I didn’t quite catch the meaning of your last sentence, precisely:

You can usually break down analysis to the simple case of sines and extrapolate from that.

Fun fact, I discover at very high frequency (such C8, ratio 11, as example), Dexed VST3i plugin ignores Nyquist frequency, the result is funny, visible from spectrum analyzer (of course 24kHz isn’t audible for humans, in particular for mine 62-years old ears lol, however my dog reacts on these sounds).

My DeXtral module uses, via std::min(oscFreq * dx7_ratio, sampleRate / 2), the sampleRate / 2 (it’s a kind of limiter), not sure if it’s a good idea to keep 24kHz (for 48kHz sample rate), if yes, is it safe to give a “margin” (like frequency minus something)… Another way is to “kill” - litterally - the frequency to… 0Hz (in the idea of a kind of brutal LPF with cutoff set @ sampleRate / 2, but honestly, I don’t know).

Maybe just go back to basics of (digital) sound. The fundamentals (bad pun intended).

Since digital is discrete, digital audio is all about sufficient resolution: sampling rate and amplitude. To represent any periodic signal, you would need at least 2 samples: one representing the positive half of the period/cycle and one to represent the negative half of the period/cycle. So, this is why the maximum upper frequency limit for any sampled signal is samplerate/2.

Since human hearing is limited to the 20Hz-20Khz range (at best), we would need a sampling rate of at least 2 x 20kHz. To sufficiently accurately encode amplitude, 16 bits generally are enough. So, for audio CD format, 44.1 kHz and 16 bit PCM was chosen.

But, generally, periodic signals are not just pure sines. Actually, most sounds consist of many frequencies; the so-called spectrum. Each frequency in the spectrum is represented by a sine with its own amplitude and phase. Often, relative phase for each individual frequency is ignored. E.g. in many implementations of additive synthesis, you only get control over amplitude of the various frequencies in the spectrum.

For many natural sounds these frequencies are integer multiples of the fundamental frequency. Most often they are then called harmonics.

Generally in most sounds, the lower frequencies in the spectrum have higher relative amplitudes then higher frequencies in the spectrum.

The obvious and most extreme exception is white noise, which contains all frequencies at equal amplitude.

But, for example: A pure sawtooth contains infinite whole integer multiples of the fundamental frequency, where the amplitude is inverse to the rank: 1/rank (1=1/1, 2=1/2, 3=1/3 etc). A pure square has the same 1/rank amplitudes, but odd ranks only (1=1/1, 3=1/3, 5=1/5 ect). A triangle has the same odd ranks only, but amplitude decays way faster: 1/rank-squared (1/1, 3=1/3^2, 1:5^2 etc).

So, theoretically many signals have frequencies in their spectrum that would cross the Nyquist frequency and cause aliasing (reflecting back into the spectrum at half the frequency). But since generally, higher frequencies in the spectrum have lower amplitudes, aliasing gets more noticeable as lower and thus higher amplitude frequencies bounce back from the Nyquist frequency (so, when playing higher notes). After aliasing appears you cannot simply filter out these reflected frequencies, since they are now mixed in within the intended clean spectrum.

Now let’s look into FM/PM. Why is aliasing especially troublesome in FM/PM? Well…the most common synthesis technique, subtractive synthesis (osc–>filter–>amp) starts with some spectrum and only attenuates (filters) or emphasizes (resonance) EXISTING frequencies in the spectrum. Theoretically no NEW frequencies are generated (or generally at least not at annoying amplitudes).

With FM/AM and many other non-linear techniques, frequencies are generated that were not present in the original spectrum. Generally these non-linear techniques directly alter the shape of the signal/wave (so, some form of waveshaping). Any change in shape will change the spectrum (and vice versa). These direct changes in wave/signal shape can generate/alter frequencies anywhere in the spectrum and can easily result in (very) high frequency content, way beyond what was present in the original spectrum.

Going back to FM/PM (linear). Assuming one carrier and one modulator. The modulator modulates (changes) the frequency or most often the phase of the carrier (the one you hear) at audiorate. This evenly generates sum and difference frequencies to the left and right of the carrier frequency. Where these frequencies appear depends on the ratio between carrier and modulator. E.g. at ratio 1:1 you get harmonics/sidebands appear every one harmonics…so…none are skipped. For a 1:2 ratio each second harmonic is skipped, so only odd harmonics are generated etc.

Since we are summing/subtracting and generally like harmonic spectra, the ratios are generally integer ratios (seemingly non-integer ratios might just be integer ratios, some octaves up: 1:2.75 is effectively 4:11)

Anyway, with FM/PM ratios it’s a bit like PWM where the percentage of the pulsewidth tells you which harmonics are skipped in the spectrum. At 50% we already saw that each 100/50=2nd harmonic is skipped, resulting in only odd harmonics with amplitude 1/rank. At 25%, each 4th is skipped, at 20% each 5th etc. BTW, the harmonics amplitude of any pulsewidth in between sort of smears out toward the nearest higher amplitude harmonics. Those intermediate spectra look very much like comb filtered signals: many small humps.

Anyway: as the FM/PM modulator’s amplitude increases, frequencies are generated towards both the lower and the higher end of the spectrum. Ever more as the amplitude of the modulator increases.

In FM/PM, when (sideband) frequencies reach 0 Hz they reflect back into the spectrum at inverted phase and might interact with frequencies already present there in the spectrum (due to phase cancellation). But towards the higher end of the spectrum, as soon (sideband) frequencies reach Nyquist, they also reflect back into the spectrum and we get aliasing for those frequencies.

So, FM/PM can easily generate very high frequencies and is thus very susceptible to aliasing, especially at higher modulation amplitudes. Even when playing lower to mid range notes, high frequency content might bounce back from Nyquist. My Yamaha SY77 (1989) has noticeable aliasing at higher modulation/notes. And you can safely assume that Yamaha tried to avoid that as much as they could.

Finally, as with many audiorate modulation techniques, like AM and FM/PM, sum and difference frequencies are generated for each frequency in the spectrum (both in carrier and in modulator). This is mainly why FM/PM uses sines only. Richer spectra will soon generate so many frequencies you loose control over where you want them and where you don’t want them in your sound. And…higher spectral content will soon generate sidebands that will reach Nyquist real soon, causing aliasing. Also sooner reaching ‘FM-noise’ where the result is no longer really musically usefull.

Final word: Since lowpass filtering is not really a viable option here (since it is a complex task to predict all resulting frequencies), oversampling is a common techniques to temporary increase the samplerate, thus shifting the Nyquist frequency upward and avoid/diminish aliasing. As long as you filter out the high frequencies that would cross Nyquist, before reverting back to the lower samplerate. Another is bandwidth limiting by splitting the signal into its individual frequencies (FFT), and simply ignoring all frequencies above Nyquist before mixing/converting the remaining ones all back to a single signal (iFFT). There are many ways in which to mitigate aliasing, each with its own cost benifit.

Huh..by now this post has become somewhat long. I hope it contains some usefull information for some…

Just… impressive! :heart: :+1: Thank you so much for all of these explanations.

In fact, in my development since yesterday, I’ve tried to consider to “ignore” all frequencies above Nyquist (either for modulators and… carriers), but the result is bad. Best results at the moment is to set the frequency to sampleRate /2, if over. The developer of Dexed VST3/AU plugin is using another approach: he ignores Nyquist!

Of course, to go deeper, I’ll must repair my DX7 (battery + some electronic components such out-of-order capacitors must be replaced) in order to analyze the behavior at high ratios / frequencies (above Nyquist). Unfortunately I don’t have found any infos on the web about the DX7 vs. Nyquist.

Excellent summary, thanks.

But for dynamic/changing signals in a digital oscillator, this is way too expensive, right?

Apart from oversampling + filtering, you are talking about the various BL*P algorithms, right? Would love your overview on these ways too.

Sure does, give me more please :slight_smile:

The Yamaha DX7 (1983) uses a 12/bit DAC at around 50kHz. So…Nyquist frequency should be at about 25 kHz. Which is above the CD Red Book standard (1980) 44.1 Khz samplingrate, but below the CD Red Book 16-bit bitdepth.

The look-up tables (LUT) for the sines are only 10-bit. But, since mixing is summing sources and dividing by the number of voices…any mix of digital 2 signals will cost you 1-bit of resolution (halves the resolution). So the 10-bit LUT vs 12-bit DAC allows for mixing 4 10-bit voices with no loss of resolution. Since we only modulate phase, amplitude will stay untouched by the modulation. Only the carriers are mixed. So, theoretically, per voice loss of resolution by mixing will only occur for 5 and 6 carrier algorithms.

But, then…we still have a max of 16 voices to mix down to 1 output…

But apparently there’s some resolution enhancing trickery going on too:

How does the Yamaha DX7 digital analog converter work?

This source gives a great overview of the technical side of the DX7 and mentions various other sources (also on the samplerate):

We know from the service manual that the OPS processes all 16 six-operator voices in ~20.368032μs. From this we can determine that the synth’s overall sample rate is 49096Hz.

A nice starting point, with various links to more detailled sources in these articles:

Yamaha DX7 Technical Analysis

Yamaha DX7 Official Technical Analysis

And here’s an article on how all the technical parts work together and make the whole machine work:

Yamaha DX7 chip reverse-engineering, part 4: how algorithms are implemented

Of course I already have discover these sources (all set as bookmarks in Firefox) :wink: since months, but thanks anyway!

For best comparisons/calibrations, I’m using both Dexed and Plogue’s chipsynth OPS7 plugin (VST3i, I’m using Windows 10 platform, Bitwig or REAPER, Voxengo SPAN as spectrum analyzer). At the moment, I’m fighting vs. OP DETUNE, because the DX7 doesn’t use a real detuning by cents. Nothing about details of operator’s detune in DX7’s official manual, but the DX7II’s manual mentions “+7” is approx. +2 cents, “-7” is approx - 2 cents… But they’re approximations, and not “true” cents. :wink:

I’ve sent you a PM, earl this morning (03:00 France time)…

That would be 03:00 AM in my timezone, in the Netherlands.as weel. Though it took me until 03:00 PM to react.

Yeah, I like and have used Dexed a lot. A great free and open source project.

It’s not SY77/SY99 and definitely not NI FM7/FM8 but very usefull and fun nonetheless. The most complicated part to implement, while still maintaining useability is the modulation matrix for all the interacting oscillators/operators (the ‘algorithms’).

The DX7 operators detuning is limited and the frequency will also not go all the way down to 0 Hz (unlike the SY77/SY99). You get 1 Hz minus some detuning.

In PM, slight detuning of operators will create a similar effect as detuning ‘regular’ mixed oscillators (e.g. as is quite common in a basic subtractive patch). Both are the result of slow phase shifting between both oscillators involved. Although in ‘regular’ detuning the phase shift simply creates comb filter effects.

The SY77 and SY99 engines also allow for a fixed phase shift for each operator and this definitively affects the resulting spectrum. You can’t directly modulate that phase shift with some modulation source though (ENV/LFO). But in modular you can, off course.

The engine does allow ‘freerunning’ (random phase) vs phase sync/reset. Just like many subtrative synths offer phase reset y/n on key on (and after that often also drifting, random detune).

Though detune also effectively causes phase shifting, detune is a cyclic effect where the cycling occurs at the rate of the difference in frequency between the two oscillators involved. A fixed phase shift is in effect…well fixed, static in nature.

So, phase and frequency are very much related. Normal wavetable synthesis uses a phasor to read samples out of a sampled waveform in a linear way (e.g. using a saw shape at the notes frequency to determine the phase angle/position in the sampled waveform). You can of course use non-linear shapes to create other waveform. This causes the waveshape to get streched and compressed at defined point in time. This then is more like Phase Distortion and this is often used in oscillators/synthesizers to create basic waveshapes (saw, square, triangle, sine) from a single shape core oscillator. In these cases, the carrier is effectively at 0 Hz, while the phasor runs at the notes frequency. In PM the carrier is normally no longer at 0 Hz. For musical purposes (to keep results within the harmonic series) the differences in frequency between carrier and modulator are generally integer ratios.

So, manipulating phase has advantages above manipulating frequency. This is why the Yamaha implementation of FM is actually PM. Also, due to the high sensitivity to phase shifts, PM is actually only practically achievable in ultra-stable, predictable digital implementations.

In the case of (future) DeXtral & DeXtral Kompakt, another “layer” will be… custom modulations (up to 28 modulator “slots” per voice/program). Matrix modulation editor is working fine, but now I’ll must to “interface” all declared (and active) modulations and common controls (DX7 potentiometers only). Also by using tricks to reduce CPU usage.

Sounds like bells often uses fixed frequencies for modulators, to create inharmonics, it’s the reason why the FM/PM is a powerful synthesis.

Unfortunately my DX7 (Mark I, firmware 1.8) - second hand bought during 90s - is out of service, I’ll must replace the battery (for the first time), but also some capacitors…

So, manipulating phase has advantages above manipulating frequency. This is why the Yamaha implementation of FM is actually PM.

Yep of couse, also it was marketing, everybody knows FM (in car, radio at home), PM is like an UFO (lol). FM becomes unstable at high frequencies (mainly drifts).

Bells (or struck crystal glasses and such) tend to have very few, very dominant harmonics in unusual spots in the spectrum. Not necessarily inharmonic, but very prominent. When mixing fixed frequencies and key following frequencies, it means that the ratios and the spectrum is different for each note.

Of course, physical bells only produce a single fixed ‘note’ with fixed resonant frequencies. Although it matters where and how hard it is struck. The ratios/relative frequencies in PM are very useful to create harmonics in specific regions in the spectrum. Not as precise and responsive as physical modeling (exciter+resonator) e.g. modal synthesis though.

The magical oil drum / steel pan seems similar to a bell…but is somehow able to produce multiple tuned notes from 1 continuous shape. Whoever came up with that unlikely idea and actually built the first one?

Same here. I should start up my late eighties/early nineties synths too. To see if or actually how much they physically/electrically degraded. Some already have common old age issues already like failing buttons, wheels, floppy disk drives, LCD screens.

Hello…

It’s a DX7II-FD?

Yes of course! the keyboard range is, in this case, very limited, for central note, and few notes around (not always).

Many people consider the DX7 as “cold”, regardling analog synthesis. There’s something for everyone, so I have an analogy involving the light spectrum: you can consider analog synthesis in the red/yellow (warm), and FM/PM in the blue/indigo/purple (cold), there is room for everyone. :wink:

Nope, not a DX7 at all. Somewhere in the early nineties I got my hands on a secondhand Yamaha SY77, to cover my FM needs. Meant to be the successor of the DX7. It can do what the DX7 can…and a lot more. The SY77 has extra (advanced) FM functionality (Yamaha AFM engine, more algorithms, more operator waveforms etc). But it also has samples in ROM and 2 great 12 dB/Oct filters (Yamaha’s AWM2 engine). You can feed the output of the AFM into the AWM section filters. Also, you can use the AWM engine output as modulators. Or use the engines in parallel. The step-up SY99 had better technical/sound quality and custom sample memory.

But still 6 operators. And when using for multiple carrier algorithms (parallel stacks), you will soon run out of operators. Later on, with the FS1r and Montage, 2 more operators were added. Both still pretty pricy on the second hand market.

The dry output from a DX (or SY) might sound relatively harsh. Most ‘analog’ sounds are created using Low Pass filters, which by their very nature attenuate higher frequencies. No such filters in FM/PM. Sounds can easily have a lot of high frequency energy. Also, sounds can be very clean, tight and stable, if desired. Since it is fully digital there is no natural drift or other electronic unstability quirks. But dynamics/unstability can be introduced by detuning and not locking operator phase. And there is the aliasing to add to the character…

But, the range of sounds they can generate is huge.

And many of these often unique sounds work great with effects like chorus/flanger, phaser, delay, reverb and such, without getting to messy/muddy too soon.

Much of the so revered eighties music is dominated by the DX7 (often just factory presets). Just sayin’.