pub struct Args {Show 54 fields
pub num_filters: usize,
pub curve: Option<PathBuf>,
pub target: Option<PathBuf>,
pub sample_rate: f64,
pub max_db: f64,
pub min_db: f64,
pub max_q: f64,
pub min_q: f64,
pub min_freq: f64,
pub max_freq: f64,
pub output: Option<PathBuf>,
pub speaker: Option<String>,
pub version: Option<String>,
pub measurement: Option<String>,
pub curve_name: String,
pub algo: String,
pub population: usize,
pub maxeval: usize,
pub refine: bool,
pub local_algo: String,
pub bo_initial_samples: usize,
pub bo_batch_size: usize,
pub bo_posterior_std_threshold: f64,
pub bo_acquisition: String,
pub bo_ehvi: bool,
pub min_spacing_oct: f64,
pub spacing_weight: f64,
pub smoothness_weight: f64,
pub smoothness_exponent: f64,
pub smoothness_schroeder_hz: Option<f64>,
pub smoothness_modal_scale: f64,
pub smooth: bool,
pub smooth_n: usize,
pub loss: LossType,
pub peq_model: PeqModel,
pub peq_model_list: bool,
pub algo_list: bool,
pub tolerance: f64,
pub atolerance: f64,
pub recombination: f64,
pub strategy: String,
pub strategy_list: bool,
pub adaptive_weight_f: f64,
pub adaptive_weight_cr: f64,
pub no_parallel: bool,
pub parallel_threads: usize,
pub seed: Option<u64>,
pub qa: Option<f64>,
pub driver1: Option<PathBuf>,
pub driver2: Option<PathBuf>,
pub driver3: Option<PathBuf>,
pub driver4: Option<PathBuf>,
pub crossover_type: String,
pub preset: Option<String>,
}Expand description
Shared CLI arguments for AutoEQ binaries.
Fields§
§num_filters: usizeNumber of IIR filters to use for optimization.
curve: Option<PathBuf>Path to the input curve CSV file (format: frequency,spl). Required unless speaker, version, and measurement are provided for API data.
target: Option<PathBuf>Path to the optional target curve CSV file (format: frequency,spl). If not provided, a flat 0 dB target is assumed.
sample_rate: f64The sample rate for the IIR filters.
max_db: f64Maximum absolute dB gain allowed for each filter.
min_db: f64Minimum signed dB gain allowed for each filter (the cut bound).
max_q: f64Maximum Q factor allowed for each filter.
min_q: f64Minimum Q factor allowed for each filter.
min_freq: f64Minimum frequency allowed for each filter.
max_freq: f64Maximum frequency allowed for each filter.
output: Option<PathBuf>Output PNG file for plotting results.
speaker: Option<String>Speaker name for API data fetching.
version: Option<String>Version for API data fetching.
measurement: Option<String>Measurement type for API data fetching.
curve_name: StringCurve name inside CEA2034 plots to use (only when –measurement CEA2034) e.g., “Listening Window”, “On Axis”, “Early Reflections”. Default: Listening Window
algo: StringOptimization algorithm to use (e.g., autoeq:isres, autoeq:cobyla)
population: usizeOptional population size for population-based algorithms (e.g., ISRES)
maxeval: usizeMaximum number of evaluations for the optimizer
refine: boolWhether to run a local refinement after global optimization
local_algo: StringLocal optimizer to use for refinement (e.g., cobyla)
bo_initial_samples: usizeBayesian optimization Sobol hot-start samples (0 = automatic)
bo_batch_size: usizeBayesian optimization batch size for parallel expensive evaluations (0 = automatic)
bo_posterior_std_threshold: f64Bayesian optimization posterior-std threshold for local-refiner handoff (0 disables)
bo_acquisition: StringBayesian optimization acquisition: ei, qei, or thompson
bo_ehvi: boolUse Monte-Carlo qEHVI Bayesian optimization for multi-objective data
min_spacing_oct: f64Minimum spacing between filter center frequencies in octaves (0 disables)
spacing_weight: f64Weight for the spacing penalty in the objective function
smoothness_weight: f64Second-difference penalty weight on the correction curve (dB/decade^2). 0 disables. Suggested starting point: 0.05.
smoothness_exponent: f64L_p exponent for smoothness penalty (1.0 = TV^2/sparsifier, 2.0 = L2).
smoothness_schroeder_hz: Option<f64>Schroeder cutoff for relaxed smoothness in the modal region.
smoothness_modal_scale: f64Modal-region weight multiplier (0 = exempt modal region entirely).
smooth: boolEnable smoothing (regularization) of the inverted target curve
smooth_n: usizeSmoothing level as 1/N octave (N in [1..24]). Example: N=6 => 1/6 octave smoothing
loss: LossTypeLoss function to optimize (flat or score).
peq_model: PeqModelPEQ model that defines the filter structure
peq_model_list: boolDisplay list of available PEQ models with descriptions and exit.
algo_list: boolDisplay list of available optimization algorithms with descriptions and exit.
tolerance: f64Optimization tolerance (tol parameter for DE algorithm)
atolerance: f64Absolute tolerance (atol parameter for DE algorithm)
recombination: f64Recombination probability for DE algorithm (0.0 to 1.0)
strategy: StringDE strategy to use (e.g., best1bin, rand1bin, currenttobest1bin, adaptive)
strategy_list: boolDisplay list of available DE strategies and exit.
adaptive_weight_f: f64Adaptive weight for F parameter (DE adaptive strategies only)
adaptive_weight_cr: f64Adaptive weight for CR parameter (DE adaptive strategies only)
no_parallel: boolDisable parallel evaluation for DE algorithm (default: parallel is enabled)
parallel_threads: usizeNumber of threads to use for parallel evaluation (0 = use all available cores)
seed: Option<u64>Random seed for deterministic optimization (default: random seed for each run) Setting this makes optimization results reproducible
qa: Option<f64>Quality assurance mode with optional threshold: suppress normal output, show summary line and analysis If a threshold is provided (e.g., –qa 0.4), also perform QA analysis
driver1: Option<PathBuf>Path to first driver measurement CSV file (for multi-driver optimization with –loss drivers-flat)
driver2: Option<PathBuf>Path to second driver measurement CSV file (for multi-driver optimization with –loss drivers-flat)
driver3: Option<PathBuf>Path to third driver measurement CSV file (for multi-driver optimization with –loss drivers-flat)
driver4: Option<PathBuf>Path to fourth driver measurement CSV file (for multi-driver optimization with –loss drivers-flat)
crossover_type: StringCrossover type for multi-driver optimization (butterworth2, linkwitzriley2, linkwitzriley4)
preset: Option<String>Use a named preset that sets all optimizer parameters at once. Available presets: quick, balanced, max-quality, score (speakers only). Individual parameter flags override preset values when both are specified.
Implementations§
Source§impl Args
impl Args
Sourcepub fn effective_peq_model(&self) -> PeqModel
pub fn effective_peq_model(&self) -> PeqModel
Get the effective PEQ model
Sourcepub fn uses_highpass_first(&self) -> bool
pub fn uses_highpass_first(&self) -> bool
Check if the first filter should be a highpass (for compatibility)
Sourcepub fn speaker_defaults() -> Args
pub fn speaker_defaults() -> Args
Create Args with speaker optimization defaults
These defaults are tuned for typical speaker EQ optimization using CEA2034 measurements from spinorama.org.
Sourcepub fn headphone_defaults() -> Args
pub fn headphone_defaults() -> Args
Create Args with headphone optimization defaults
These defaults are tuned for headphone EQ optimization using frequency response measurements and Harman target curves.
Sourcepub fn roomeq_defaults() -> Args
pub fn roomeq_defaults() -> Args
Create Args with room EQ optimization defaults
These defaults are tuned for room correction, focusing on low frequencies where room modes are most problematic.
Sourcepub fn apply_preset(&mut self)
pub fn apply_preset(&mut self)
Apply a named preset, setting optimizer parameters to tuned values.
Call this after parsing CLI args. Parameters explicitly set by the user
are not tracked by clap, so this method overwrites all optimizer fields.
The caller should parse args, call apply_preset(), then override
any fields they want to customize.
NOTE: These preset values are intentionally duplicated from
sotf-player::autoeq::presets because the autoeq crate cannot
depend on sotf-player. Keep values in sync when updating presets.
Available presets:
quick: 5 filters, fast (pop 40, maxeval 2000, no refine)balanced: 7 filters, good balance (pop 80, maxeval 5000, refine)max-quality: 10 filters, best results (pop 200, maxeval 20000, ls-pk-hs, refine)score: 7 filters, listener preference score (speaker-score loss)
Sourcepub fn display_preset_list() -> !
pub fn display_preset_list() -> !
Display available presets and exit.
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl From<&Args> for PlotConfig
impl From<&Args> for PlotConfig
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Args, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Args, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Args, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Args, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnsafeUnpin for Args
impl UnwindSafe for Args
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeParallel for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.