git ssb

0+

dinoworm ๐Ÿ› / metronome



Tree: 2431efbc25dadc7996fc6ca2d7748bc2f467b4e9

Files: 2431efbc25dadc7996fc6ca2d7748bc2f467b4e9 / src / control.rs

547 bytesRaw
1use std::sync::mpsc::{channel, Sender, Receiver};
2
3use clock;
4
5#[derive(Debug)]
6pub struct Control {
7 pub tx: Sender<ControlMessage>,
8 pub rx: Receiver<ControlMessage>
9}
10
11impl Control {
12 pub fn new() -> Self {
13 let (tx, rx) = channel();
14
15 Self {
16 tx,
17 rx
18 }
19 }
20}
21
22#[derive(Clone, Copy, Debug)]
23pub enum ControlMessage {
24 Time(clock::ClockTime),
25 Signature(clock::ClockSignature),
26 Reset,
27 NudgeTempo(f64),
28 Tap,
29 /*
30 Stop,
31 NudgeClock,
32 Configure
33 */
34}
35
36

Built with git-ssb-web