performance meter

This commit is contained in:
🪞👃🪞 2024-11-23 22:10:17 +01:00
parent a509db7215
commit 398f676ae3
12 changed files with 123 additions and 32 deletions

View file

@ -11,15 +11,13 @@ impl<T: TransportControl> Command<T> for TransportCommand {
use TransportCommand::{Focus, Clock};
use FocusCommand::{Next, Prev};
use ClockCommand::{SetBpm, SetQuant, SetSync};
Ok(Some(match self {
Focus(Next) => { todo!() }
Focus(Prev) => { todo!() },
Focus(_) => { unimplemented!() },
Clock(SetBpm(bpm)) => Clock(SetBpm(state.bpm().set(bpm))),
Clock(SetQuant(quant)) => Clock(SetQuant(state.quant().set(quant))),
Clock(SetSync(sync)) => Clock(SetSync(state.sync().set(sync))),
Ok(match self {
Focus(cmd) => cmd.execute(state)?.map(Focus),
Clock(SetBpm(bpm)) => Some(Clock(SetBpm(state.bpm().set(bpm)))),
Clock(SetQuant(quant)) => Some(Clock(SetQuant(state.quant().set(quant)))),
Clock(SetSync(sync)) => Some(Clock(SetSync(state.sync().set(sync)))),
_ => return Ok(None)
}))
})
}
}