pub struct SnapshotConfigBuilder { /* private fields */ }Expand description
Builder for SnapshotConfig.
Implementations§
Source§impl SnapshotConfigBuilder
impl SnapshotConfigBuilder
Sourcepub fn sample_rate(&mut self, value: f64) -> &mut Self
pub fn sample_rate(&mut self, value: f64) -> &mut Self
Sample rate of the audio unit.
Default is 44100.0 fundsp::DEFAULT_SR
Sourcepub fn num_samples(&mut self, value: usize) -> &mut Self
pub fn num_samples(&mut self, value: usize) -> &mut Self
Number of samples to generate.
Default is 1024
Sourcepub fn processing_mode(&mut self, value: Processing) -> &mut Self
pub fn processing_mode(&mut self, value: Processing) -> &mut Self
Processing mode for snapshotting an audio unit.
Default - Tick
Sourcepub fn warm_up(&mut self, value: WarmUp) -> &mut Self
pub fn warm_up(&mut self, value: WarmUp) -> &mut Self
Warm-up mode for snapshotting an audio unit.
Default - WarmUp::None
Sourcepub fn allow_abnormal_samples(&mut self, value: bool) -> &mut Self
pub fn allow_abnormal_samples(&mut self, value: bool) -> &mut Self
How to handle abnormal samples: NaN,±Infinity
When set to true abnormal samples are allowed during processing,
but skipped in actual output. Plotted with labeled dots.
When set to false and encoutered abnormal samples,
the snapshotting process will panic.
Sourcepub fn chart_layout(&mut self, value: Layout) -> &mut Self
pub fn chart_layout(&mut self, value: Layout) -> &mut Self
Chart layout
Whether to plot channels on separate charts or combined charts.
Default - Layout::Separate
Sourcepub fn with_inputs(&mut self, value: bool) -> &mut Self
pub fn with_inputs(&mut self, value: bool) -> &mut Self
Whether to include inputs in snapshot
Default - false
Sourcepub fn svg_width(&mut self, value: usize) -> &mut Self
pub fn svg_width(&mut self, value: usize) -> &mut Self
Optional width of the SVG viewBox
None means proportional to num_samples
Sourcepub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
pub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
Height of one channel in the SVG viewBox
Default - 500
Sourcepub fn show_labels(&mut self, value: bool) -> &mut Self
pub fn show_labels(&mut self, value: bool) -> &mut Self
Show ax- labels
Default - true
Sourcepub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self
pub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self
X axis labels format
Whether to format X axis labels as time
Default - false
Sourcepub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
pub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
Maximum number of labels along X axis
Default - Some(5)
Sourcepub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Optional chart title
Default - None
Sourcepub fn output_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for output channels
Default - empty Vec
Sourcepub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for output channels
Default - empty Vec
Sourcepub fn input_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for input channels
Default - empty Vec
Sourcepub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for input channels
Default - empty Vec
Sourcepub fn show_grid(&mut self, value: bool) -> &mut Self
pub fn show_grid(&mut self, value: bool) -> &mut Self
Show grid lines on the chart
Default - false
Sourcepub fn line_width(&mut self, value: f32) -> &mut Self
pub fn line_width(&mut self, value: f32) -> &mut Self
Waveform line thickness
Default - 2.0
Sourcepub fn background_color<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn background_color<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Chart background color (hex string)
Default - “#000000” (black)
Sourcepub fn output_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Custom colors for output channels (hex strings)
Default - None (uses default palette)
Sourcepub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for output channels (hex strings)
Default - None (uses default palette)
Sourcepub fn input_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Custom colors for input channels (hex strings)
Default - None (uses default palette)
Sourcepub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for input channels (hex strings)
Default - None (uses default palette)
Sourcepub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
pub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
Trait Implementations§
Source§impl Clone for SnapshotConfigBuilder
impl Clone for SnapshotConfigBuilder
Source§fn clone(&self) -> SnapshotConfigBuilder
fn clone(&self) -> SnapshotConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more