music.monaural_beats

music.monaural_beats(carrier_freq=200.0, beat_freq=10.0, duration=2.0, waveform_table=array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), number_of_samples=0, sample_rate=44100)[source]

Synthesize a monaural beat: sstim-v:techMonauralBeats.

Two close-frequency tones summed in a single channel, producing a physically present amplitude beat at their difference frequency [2]. Distinct from a binaural beat, where the beat is a neural construct from dichotic presentation.

Parameters:
carrier_freqscalar

The centre frequency of the two tones, in Hertz.

beat_freqscalar

The difference between them, in Hertz, which is the rate of the resulting amplitude beat.

durationscalar

The duration in seconds.

waveform_tablearray_like

The table the two tones are looked up in.

number_of_samplesinteger

The number of samples of the sound, taken instead of duration when it is given.

sample_rateinteger

The sampling frequency in Hertz.

Returns:
ndarray

A mono sequence of PCM samples, the mean of the two tones.

Parameters:
  • carrier_freq (float)

  • beat_freq (float)

  • duration (float)

  • waveform_table (ArrayLike)

  • number_of_samples (int)

  • sample_rate (int)

Return type:

NDArray[float64]

See also

binaural_beats

the same two tones one per ear, where the beat is perceptual only.

amplitude_modulation

an envelope imposed on one carrier rather than arising from two.

Notes

The beat is in the signal. Unlike binaural_beats(), the modulation is physically present: the sum of two tones a few Hertz apart has an envelope at their difference frequency, which a spectrum of the rendered audio shows and which survives being played through one loudspeaker.

References

[1]

Fabbri, Renato, et al. “Musical elements in the discrete-time representation of sound.” arXiv preprint arXiv:abs/1412.6853 (2017)

Examples

>>> stimulus = monaural_beats(carrier_freq=200, beat_freq=10)
>>> stimulus.ndim
1