Fourier

Modulation that generates a waveform by superimposing multiple sine waves of different frequencies.

use autd3::modulation::{Fourier, FourierOption};
use autd3::prelude::*;

fn main() {
let _ = 
Fourier {
    components: vec![
        Sine {
            freq: 100 * Hz,
            option: Default::default(),
        },
        Sine {
            freq: 150 * Hz,
            option: Default::default(),
        },
    ],
    option: FourierOption {
        scale_factor: None,
        clamp: false,
        offset: 0x00,
    },
};
}
#include<autd3.hpp>
#include <autd3/modulation/fourier.hpp>

int main() {
using namespace autd3;
modulation::Fourier({Sine(100 * Hz, SineOption{}),
                     Sine(150 * Hz, SineOption{})},
                    modulation::FourierOption{
                        .scale_factor = std::nullopt,
                        .clamp = false,
                        .offset = 0x00,
                    });

return 0; }
using AUTD3Sharp.Modulation;

using static AUTD3Sharp.Units;
new Fourier(
    components: [
        new Sine(freq: 100u * Hz, option: new SineOption()),
        new Sine(freq: 150u * Hz, option: new SineOption())
    ],
    option: new FourierOption
    {
        ScaleFactor = null,
        Clamp = false,
        Offset = 0x00
    }
);
from pyautd3 import Hz, Sine, SineOption
from pyautd3.modulation import Fourier, FourierOption

Fourier(
    components=[
        Sine(freq=100 * Hz, option=SineOption()),
        Sine(freq=150 * Hz, option=SineOption()),
    ],
    option=FourierOption(
        scale_factor=None,
        clamp=False,
        offset=0x00,
    ),
)

Scale Factor and Value Clamping

The calculation of Fourier is performed using the following formula, If the scale factor is not specified, is used.

If clamp is false, it returns an error if intensity, offset are specified such that the above formula results in values outside the range of . To clamp values outside the range to instead of returning an error, specify true for clamp.

The default values for these are as above.