Frequency Modulation

Frequency modulation, or FM, is an analog modulation scheme that encodes information by changing the frequency of a carrier wave.

FM is commonly used in

Implementation in Python



import math
RATE = 32_000

# Phase accumulator
ph = 0

for s in samples:
    ph += 2 * math.pi * s / RATE

    i = math.sin(ph)
    q = math.cos(ph)

    write(i, q)