rustriff_lib/domain/dto/effect/hcdistortion_dto.rs
1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4/// # Data Transfer Object for HC Distortion Effect
5///
6/// `HcDistortionDto` is the serialisable representation of an [`HCDistortion`] effect
7/// for communication between the Rust backend and the TypeScript frontend.
8///
9/// This DTO is automatically generated for TypeScript via the `ts-rs` crate
10///
11/// [`HCDistortion`]: crate::services::effects::distortion::hc_distortion::HCDistortion
12#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
13#[ts(export)]
14pub struct HcDistortionDto {
15 /// Unique identifier for this effect instance. Used for targeting commands.
16 pub id: u32,
17 /// Human-readable name displayed in the UI pedal. Example: `"Distortion"`.
18 pub name: String,
19 /// Whether the effect is currently active/processing audio (`true`) or bypassed (`false`).
20 /// When `false`, the input signal passes through unchanged.
21 pub is_active: bool,
22 /// UI colour for the pedal chassis. Hex string format: `"#rrggbb"`.
23 pub color: String,
24 /// Hard-clip threshold in the range `(0.0, 1.0]`.
25 pub threshold: f32,
26 /// Normalised output level boost in `[0.0, 1.0]`.
27 /// - `0.0` = unity gain (no boost)
28 /// - `1.0` = ×2.0 boost
29 pub level: f32,
30}