mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
switchable monitoring
This commit is contained in:
parent
e30dd94d23
commit
edadfde1a4
5 changed files with 94 additions and 107 deletions
|
|
@ -57,7 +57,7 @@ impl Launcher {
|
|||
recording: false,
|
||||
overdub: true,
|
||||
cursor: (2, 2),
|
||||
current_frame: 0,
|
||||
current_frame: 0,
|
||||
scenes: scenes.unwrap_or_else(||vec![Scene::new(&"Scene 1", &[None])]),
|
||||
tracks: if let Some(tracks) = tracks { tracks } else { vec![
|
||||
Track::new("Track 1", &timebase, None, Some(vec![
|
||||
|
|
@ -172,8 +172,8 @@ impl DynamicDevice<Launcher> {
|
|||
}
|
||||
impl PortList for Launcher {}
|
||||
pub fn process (state: &mut Launcher, _: &Client, _: &ProcessScope) -> Control {
|
||||
let transport = state.transport.query().unwrap();
|
||||
state.playing = transport.state;
|
||||
let transport = state.transport.query().unwrap();
|
||||
state.playing = transport.state;
|
||||
state.current_frame = transport.pos.frame() as usize;
|
||||
Control::Continue
|
||||
}
|
||||
|
|
@ -184,9 +184,9 @@ pub fn render (state: &Launcher, buf: &mut Buffer, mut area: Rect) -> Usually<Re
|
|||
{
|
||||
use crate::device::transport::*;
|
||||
draw_play_stop(buf, x + 1, y, &state.playing);
|
||||
draw_rec(buf, x + 12, y, state.recording);
|
||||
draw_mon(buf, x + 19, y, state.monitoring);
|
||||
draw_dub(buf, x + 26, y, state.overdub);
|
||||
draw_rec(buf, x + 12, y, state.sequencer().map(|s|s.recording).unwrap_or(false));
|
||||
draw_mon(buf, x + 19, y, state.sequencer().map(|s|s.monitoring).unwrap_or(false));
|
||||
draw_dub(buf, x + 26, y, state.sequencer().map(|s|s.overdub).unwrap_or(false));
|
||||
draw_bpm(buf, x + 33, y, state.timebase.bpm() as usize);
|
||||
draw_timer(buf, x + width - 1, y, &state.timebase, state.current_frame);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue