comnum.fm_multiplex#

comnum.fm_multiplex(left, right, fs, *, rds_bits=None, audio_hz=67500.0, pilot_hz=6750.0, rds_hz=2000.0, tau_s=5e-05)#

The stereophonic multiplex of FM broadcasting (ITU-R BS.450-4 Sec. 2.2, pilot-tone system), in hertz of deviation: Δa [M + S sin 2θ] + Δp sin θ + Δr r(t) sin 3θ, θ = 2π 19 kHz t, M = (A + B)/2, S = (A - B)/2 after pre-emphasis, r the biphase RDS baseband of the transmitted bits (NRSC-4 Sec. 1).

Parameters:
  • left (array_like) – the left audio A at fs, at most 1 in magnitude.

  • right (array_like) – the right audio B, as many samples.

  • fs (float) – the sampling rate (Hz), at least 120 kHz (a multiple of 2375 Hz with RDS; 228 kHz is 12 times the pilot).

  • rds_bits (array_like | None) – the transmitted RDS bits (differentially encoded: rds_differential_encode()), repeated to the length of the audio.

  • audio_hz (float) – the deviation of the audio (90 % of 75 kHz).

  • pilot_hz (float) – the deviation of the pilot (9 %).

  • rds_hz (float) – the deviation of the RDS subcarrier (2 kHz).

  • tau_s (float) – the time constant of the pre-emphasis (s).

Returns:

the multiplex (float64, Hz of deviation).

Return type:

numpy.ndarray

Raises:

ValueError – for channels of different lengths or an invalid rate.