mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
enable adding midi ins and outs
This commit is contained in:
parent
76cefdca61
commit
5d6592bbdf
12 changed files with 171 additions and 165 deletions
|
|
@ -25,18 +25,18 @@ pub enum ClockCommand {
|
|||
provide_num!(u32: |self: Clock| {});
|
||||
provide!(f64: |self: Clock| {});
|
||||
atom_command!(ClockCommand: |state: Clock| {
|
||||
("play" [] Self::Play(None))
|
||||
("play" [t: u32] Self::Play(t))
|
||||
("pause" [] Self::Pause(None))
|
||||
("pause" [t: u32] Self::Pause(t))
|
||||
("toggle" [] if state.is_rolling() { Self::Pause(None) } else { Self::Play(None) })
|
||||
("toggle" [t: u32] if state.is_rolling() { Self::Pause(t) } else { Self::Play(t) })
|
||||
("seek/usec" [t: f64] Self::SeekUsec(t.expect("no usec")))
|
||||
("seek/pulse" [t: f64] Self::SeekPulse(t.expect("no pulse")))
|
||||
("seek/sample" [t: f64] Self::SeekSample(t.expect("no sample")))
|
||||
("set/bpm" [t: f64] Self::SetBpm(t.expect("no bpm")))
|
||||
("set/sync" [t: f64] Self::SetSync(t.expect("no sync")))
|
||||
("set/quant" [t: f64] Self::SetQuant(t.expect("no quant")))
|
||||
("play" [] Some(Self::Play(None)))
|
||||
("play" [t: u32] Some(Self::Play(t)))
|
||||
("pause" [] Some(Self::Pause(None)))
|
||||
("pause" [t: u32] Some(Self::Pause(t)))
|
||||
("toggle" [] Some(if state.is_rolling() { Self::Pause(None) } else { Self::Play(None) }))
|
||||
("toggle" [t: u32] Some(if state.is_rolling() { Self::Pause(t) } else { Self::Play(t) }))
|
||||
("seek/usec" [t: f64] Some(Self::SeekUsec(t.expect("no usec"))))
|
||||
("seek/pulse" [t: f64] Some(Self::SeekPulse(t.expect("no pulse"))))
|
||||
("seek/sample" [t: f64] Some(Self::SeekSample(t.expect("no sample"))))
|
||||
("set/bpm" [t: f64] Some(Self::SetBpm(t.expect("no bpm"))))
|
||||
("set/sync" [t: f64] Some(Self::SetSync(t.expect("no sync"))))
|
||||
("set/quant" [t: f64] Some(Self::SetQuant(t.expect("no quant"))))
|
||||
});
|
||||
impl<T: HasClock> Command<T> for ClockCommand {
|
||||
fn execute (self, state: &mut T) -> Perhaps<Self> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue