Competing Modulators — User Guide

A deterministic multi-voice FM generator in which three sinusoidal control rates compete inside each voice's bounded instantaneous-frequency trajectory.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4 reviewed (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Competing Modulators generates sound from scratch; it does not process an input Sound. It creates between two and eight sinusoidal carrier voices. Each voice has its own carrier frequency and its own three-rate modulation pattern. The three modulators are combined into one bounded control signal, that control signal moves the voice's instantaneous frequency, and the resulting frequency is integrated at the audio sample rate to obtain oscillator phase.

The voices are then mixed in mono or positioned independently in stereo, followed by one optional global envelope, a short edge fade, and optional peak normalization.

This is real FM, but not a chaos generator. Earlier documentation described chaotic, exponential and nested modulation processes. The current v0.4 implementation contains no chaotic map, random walk, noise process or exponential FM in the signal path. Its complexity comes from several deterministic sinusoidal rates interacting at once.

What “competing modulators” means

The word competing describes the control structure, not a physical interaction between separate synthesizers. For each voice, three sinusoidal modulators pull the instantaneous frequency in different directions at the same time:

m1(t) = sin(2π f1 t) m2(t) = sin(2π f2 t) m3(t) = sin(2π f3 t) m(t) = [m1(t) + 0.75 m2(t) + 0.40 m3(t)] / 2.15

The weights sum to 2.15, so the combined control m(t) remains bounded between −1 and +1. The three rates are related but deliberately not identical:

f1 = Modulator base rate × voice number f2 = f1 × Modulator spread f3 = f1 × (1 + 0.01 × voice number)

Because these rates continually move in and out of alignment, the summed control develops beating, reinforcement and cancellation. Different voices use different carrier frequencies and different rate sets, so their FM sidebands also overlap and interfere in the final mix.

What is not happening: the voices do not modulate one another, there is no feedback between them, and no nonlinear “winner” is selected. They are independent FM voices mixed linearly. “Competition” is therefore a useful musical description of overlapping control rates and spectral activity, not a separate dynamical-system algorithm.

Quick start

  1. Run the script with no input Sound required.
  2. Choose a preset. Gentle Interference is a good starting point.
  3. Choose the number of voices and the modulation intensity if using Custom.
  4. Use Modulator base rate to set the basic speed of the control motion and Modulator spread to separate the competing rates.
  5. Choose a global envelope and a spatial mode.
  6. Run the script. The resulting object is named competing_<preset>.
Listening guide: lower modulation rates make the frequency motion easier to hear as drift or warble. Higher rates push the effect toward timbral FM and denser sidebands. Increasing Modulation intensity increases the maximum fractional frequency excursion but does not add randomness.

Signal model

1. Carrier layout

Voice 1 starts at Base frequency. Each following voice is 10% higher than the previous base step:

fc(v) = Base frequency × [1 + 0.10 × (v − 1)]

With four voices, for example, the carriers are 1.00×, 1.10×, 1.20× and 1.30× the entered base frequency.

2. Bounded frequency modulation

For each voice, the normalized three-modulator sum controls instantaneous frequency:

f(v,t) = fc(v) × [1 + d × m(v,t)]

d is Modulation intensity. Because m is bounded to ±1, an intensity of 0.50 means a maximum instantaneous-frequency deviation of approximately ±50% around that voice's carrier. At the allowed maximum of 1.0, the lower bound can reach 0 Hz but does not become negative.

3. Audio-rate phase integration

The script does not substitute a time-varying frequency directly into sin(2π f(t)t). Instead it integrates the instantaneous frequency sample by sample:

φ[n] = φ[n−1] + 2π f[n] / Fs y[n] = A sin(φ[n])

This distinction matters: it produces a genuine frequency trajectory whose derivative is the requested instantaneous frequency.

4. Voice level

Later voices are progressively quieter, using a 1/√voice weighting. The complete set is then normalized by the square root of the summed voice-weight energy and multiplied by 0.65. This keeps the overall expected voice energy comparatively stable as Number of voices changes instead of simply dividing every voice by the voice count.

5. Practical aliasing guard

FM has theoretically infinite sidebands, so the script cannot guarantee a perfectly band-limited spectrum. Instead it uses a practical headroom estimate: it limits the fastest modulator relative to the sample rate, reserves approximately four times that rate above the largest expected carrier excursion, and automatically reduces Modulator base rate or Base frequency if necessary.

This is a practical anti-aliasing precaution, not a mathematical guarantee that every FM sideband lies below Nyquist.

Parameters

ParameterDefaultWhat it controls
Duration_s8.0 sOutput duration. Valid range: greater than 0 and at most 120 s.
Sample_rate_Hz44100Output sample rate. Valid range: 8000–192000 Hz.
Base_frequency_Hz120 HzCarrier frequency of voice 1; later voices rise in 10% steps. May be reduced automatically for headroom.
Number_of_voices4Number of independent FM voices, from 2 to 8.
Modulation_intensity0.5Maximum fractional instantaneous-frequency deviation, from 0 to 1.
Modulator_spread1.5Multiplies the second modulator rate of every voice. Valid range: greater than 0 and at most 8.
Modulator_base_rate_Hz2.0 HzStarting rate from which each voice's three control rates are derived. May be reduced automatically for sampling headroom.
Envelope_typeNo EnvelopeOne global amplitude shape applied after all voices are mixed.
Spatial_modeMonoMono sum or one of four voice-level equal-power stereo layouts.
Edge_fade_s0.02 sIndependent linear safety fade at both output edges, capped at 20% of total duration.
Normalize_outputOnWhen enabled, scales every non-silent result to a target peak of 0.90.
Draw_visualizationOnDraws the mechanism/model/measurement figure.
Play_resultOnPlays the final Sound after synthesis.

Presets

Presets set the main synthesis character by overriding carrier, modulation, voice-count, envelope and spatial parameters. Except for Deep Interference, they do not change the entered duration. They also leave Sample rate, Edge fade, Normalize output, Draw visualization and Play result unchanged.

PresetBaseDepthVoicesSpreadBase rateEnvelopeSpatial
Gentle Interference100 Hz0.3031.201.5 HzSwellMono
Metallic Clash180 Hz0.8052.005.0 HzPercussiveWide Field
Organic Swarm80 Hz0.4061.100.5 HzTremoloRotating Field
Digital Warble200 Hz0.7041.808.0 HzNonePing Pong
Harmonic Battle150 Hz0.6042.003.0 HzADSRStereo Voices
Alien Chorus140 Hz0.9051.6184.0 HzTremoloRotating Field
Glitchy Modulation220 Hz1.0033.0012.0 HzNonePing Pong
Rhythmic Conflict110 Hz0.5041.506.0 HzNonePing Pong
Spectral War160 Hz0.8062.507.0 HzSlow FadeWide Field
Liquid Modulation70 Hz0.4031.300.3 HzSwellRotating Field
Crystal Resonance440 Hz0.5051.502.0 HzPercussiveStereo Voices
Deep Interference55 Hz0.6041.200.2 HzSlow FadeRotating Field
Deep Interference is the only preset that also overrides duration, setting it to 12 seconds.

Envelopes

The selected envelope is applied once to the complete mono or stereo mix. It does not alter individual modulators or voices.

EnvelopeCurrent v0.4 behavior
No EnvelopeNo additional musical amplitude shaping.
Percussiveexp(-3t): immediate onset followed by exponential decay.
Slow Fadeexp(-0.2t): slow exponential decay.
ReverseCurrent implementation is a linear crescendo, t / duration. It does not reverse the waveform in time.
TremoloAmplitude multiplier 0.6 + 0.4 sin(2πrt), where r = 5 + 10 × Modulation intensity; therefore 5–15 Hz.
SwellLinear fade-in over the first 30% of the sound, then sustain at full envelope value.
ADSROne piecewise pass: short attack, short decay, sustain at 0.60, then release near the end. Stage lengths adapt to short durations.
The separate Edge fade is applied after the musical envelope. It is a safety treatment for the beginning and end of the Sound and should not be confused with the selected envelope.

Spatial modes

Stereo processing occurs at the voice level. The current script does not create width by filtering the completed mono mix.

ModeCurrent behavior
MonoAll voices are summed into one channel.
Stereo VoicesVoices are distributed evenly from hard left to hard right using equal-power gains.
Rotating FieldEvery voice follows an equal-power pan trajectory at 0.15 Hz. Voices start at staggered phases around the pan cycle.
Wide FieldFixed equal-power positions from pan 0.05 to 0.95: near the edges, but not completely one-channel-only.
Ping PongSmooth equal-power movement at 2.5 Hz. Adjacent voices begin 180° apart, so the field alternates rapidly without hard switching.

Output, reproducibility & level

Visualization

The figure separates the mathematical model from measurements of the rendered Sound.

Panel A — Competing Modulators

Voice 1's three exact sinusoidal controls are shown together with their normalized weighted sum. These are model/control curves, not measurements from the output Sound.

Panel B — Instantaneous Frequency

Shows the analytical instantaneous-frequency trajectory for every voice. Horizontal references mark the carrier centers.

Panel C — Model → Measurement

A measured spectrogram of the rendered output with the model instantaneous-frequency guides drawn over it. The guides are control trajectories, not claims that all spectral energy lies exactly on those lines; FM produces sidebands around them.

Panel D — Measured Output

Measured waveform of the final Sound. For stereo results, the channel with the higher whole-file RMS is used as the representative display channel to avoid misleading fold-down cancellation.

The summary strip reports carrier and modulator ranges, FM depth, envelope, spatial mode, final peak/RMS and the practical occupied-top estimate used for headroom checks.

Further Reading