1use crate::{DeckId, SurfaceRegion};
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5#[serde(tag = "type", rename_all = "snake_case")]
6pub enum HostCommand {
7 SetMotor {
8 deck: DeckId,
9 running: bool,
10 },
11 SetPacketGain {
12 deck: DeckId,
13 gain: f32,
14 ramp_ms: u32,
15 },
16 StartPacketPlayback {
17 deck: DeckId,
18 offset_seconds: f64,
19 rate: f32,
20 platter_handoff: bool,
21 },
22 StopPacketPlayback {
23 deck: DeckId,
24 platter_handoff: bool,
25 },
26 SeekPacketPlayback {
27 deck: DeckId,
28 offset_seconds: f64,
29 },
30 SetScratchTransport {
31 deck: DeckId,
32 hand_contact: bool,
33 motor_rate: f32,
34 grip: f32,
35 output_frame: u64,
36 },
37 SetScratchTarget {
38 deck: DeckId,
39 position_frames: f64,
40 rate: f32,
41 impulse: f32,
42 output_frame: u64,
43 },
44 SetScratchPosition {
45 deck: DeckId,
46 position_frames: f64,
47 impulse: f32,
48 },
49 StartSurfaceRegion {
50 region: SurfaceRegion,
51 duration_seconds: f64,
52 },
53 StopSurfaceRegion {
54 region: SurfaceRegion,
55 },
56 StopClipLoop,
57 SetMixerTrackGain {
58 track: u8,
59 gain: f32,
60 ramp_ms: u32,
61 },
62 CaptureScratchStart {
63 deck: DeckId,
64 start_seconds: f64,
65 rotation_degrees: f64,
66 output_frame: u64,
67 },
68 CaptureScratchFinish {
69 deck: DeckId,
70 end_seconds: f64,
71 rotation_degrees: f64,
72 save_sample: bool,
73 output_frame: u64,
74 },
75 PublishTransportIntent,
76 RefreshView,
77}