Custom

Source

Customはユーザーが自由に音場を生成するためのGainである.

use autd3::gain::Custom;
use autd3::prelude::*;

fn main() {
let _ =
Custom::new(|_dev| {
    |_tr| Drive {
        phase: Phase::ZERO,
        intensity: EmitIntensity::MIN,
    }
});
}
#include<autd3.hpp>
#include <autd3/gain/custom.hpp>

int main() {
using namespace autd3;
gain::Custom([](const auto& dev) {
  return [](const auto& tr) {
    return Drive(Phase::zero(), std::numeric_limits<EmitIntensity>::min());
  };
});
return 0; }
using System;
using AUTD3Sharp;
using AUTD3Sharp.Gain;
using static AUTD3Sharp.Units;

new Custom(dev => tr => new Drive(Phase.Zero, EmitIntensity.Min));
from pyautd3 import Drive, EmitIntensity, Phase
from pyautd3.gain import Custom

Custom(lambda _dev: lambda _tr: Drive(phase=Phase.ZERO, intensity=EmitIntensity.MIN))

Customコンストラクタの引数はFn(&Device) -> Fn(&Transducer) -> Driveである.