Skip to content

SetSilencer

SetSilencer is a command that configures a Silencer, which linearly interpolates abrupt changes in phase and intensity to suppress output noise.

There are two interpolation methods: FixedCompletionTime, which specifies the interpolation completion time, and FixedUpdateRate, which specifies the update amount per interpolation step.

SetSilencer::default();
SetSilencer::disable();
SetSilencer::new(FixedCompletionTime {
intensity,
phase,
strict_mode,
});
SetSilencer::new(FixedUpdateRate { intensity, phase });

SetSilencer::default() is equivalent to passing the default of FixedCompletionTime. SetSilencer::disable() disables interpolation by the Silencer (equivalent to completing interpolation in 25 μs).

Specifies the completion time until the target value is reached. Each update step is in units of the ultrasound period (25 µs), and it is an error if the specified time is not an integer multiple of it.

Field Type Default Description
intensity Duration 250 µs Completion time until the intensity reaches the target
phase Duration 1000 µs Completion time until the phase reaches the target
strict_mode bool true Whether to error when the completion time does not fit within the modulation/STM sampling period

Fixes the update amount per interpolation step (every 25 μs).

Field Type Description
intensity NonZeroU16 Update amount of intensity per step
phase NonZeroU16 Update amount of phase per step
use autd3_rs::commands::SetSilencer;
use autd3_rs::geometry::{Autd3, Geometry};
use autd3_rs::{Client, ClientConfig};
use autd3_rs_link_nop::Nop;
let geometry = Geometry::new(vec![Autd3::default()]);
let client = Client::open(&geometry, Nop, ClientConfig::default()).await?;
let mut builder = client.datagram_builder();
builder.push(SetSilencer::default());
let frames = builder.build()?;
for frame in &frames {
client.send_checked(frame).await?;
}
client.close().await?;