Skip to main content

rustriff_lib/domain/dto/effect/
delay_dto.rs

1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
5#[ts(export)]
6pub struct DelayDto {
7    /// Unique identifier for this effect instance. Used for targeting commands.
8    pub id: u32,
9    /// Human-readable name displayed in the UI pedal. Example: `"Distortion"`.
10    pub name: String,
11    /// Whether the effect is currently active/processing audio (`true`) or bypassed (`false`).
12    /// When `false`, the input signal passes through unchanged.
13    pub is_active: bool,
14    /// UI colour for the pedal chassis. Hex string format: `"#rrggbb"`.
15    pub color: String,
16    /// Time (ms) between the original sample and the echo's
17    pub delay_time: u32,
18    /// Output level of the Echo's in `[0.0, 0.95]`.
19    /// - `0.0` = no audio
20    /// - `0.95` = almost the same volume as the dry sample
21    pub level: f32,
22}