Modulation
Modulation is an amplitude modulation (AM) feature that modulates the output amplitude of each transducer over time. It applies a coefficient sequence common to all transducers while sampling it at a fixed period, thereby varying the intensity of the sound field produced by the Pattern over time.
Each sample is an 8 bit amplitude coefficient
SamplingConfig
Section titled “SamplingConfig”Each sample in the buffer is applied in order at the period of the SamplingConfig passed to Modulation::new.
The sampling_config held by the Option of a waveform computation function determines the length of the waveform (number of samples), and it must match the SamplingConfig passed to Modulation::new.
For example, with SamplingConfig::FREQ_4K (4 kHz, sampling period 250 µs), one period of a 200 Hz sine wave is 20 samples.
Function List
Section titled “Function List”- constant — constant amplitude (no modulation)
- sine — sine wave
- square — square wave
- fourier — synthesis of multiple sine waves
- radiation_pressure — radiation pressure correction