wip: refactor into fewer crates

This commit is contained in:
🪞👃🪞 2025-05-01 17:39:29 +03:00
parent c367a0444e
commit 77703d83a5
105 changed files with 64 additions and 131 deletions

View file

@ -6,11 +6,8 @@ version = { workspace = true }
[dependencies]
tengri = { workspace = true }
tek_jack = { workspace = true }
tek_time = { workspace = true }
tek_midi = { workspace = true }
tek_sampler = { workspace = true }
tek_plugin = { workspace = true, optional = true }
tek_engine = { workspace = true }
tek_device = { workspace = true }
backtrace = { workspace = true }
clap = { workspace = true, optional = true }
@ -25,4 +22,4 @@ proptest-derive = { workspace = true }
[features]
default = ["cli"]
cli = ["clap"]
host = ["tek_plugin"]
host = ["tek_device/lv2"]

View file

@ -382,20 +382,25 @@ impl<'a> ArrangerView<'a> {
}
fn output_froms (&'a self) -> impl Content<TuiOut> + 'a {
Tryptich::top(2)
.left(self.width_side, Align::ne("Next clip:"))
.middle(self.width_mid, per_track_top(
self.width_mid,
||self.tracks_with_sizes_scrolled(),
|t, track|Either(
track.player.next_clip.is_some(),
Thunk::new(||Tui::bg(Reset, format!("{:?}",
track.player.next_clip.as_ref()
.map(|(moment, clip)|clip.as_ref()
.map(|clip|clip.read().unwrap().name.clone()))
.flatten().as_ref()))),
Thunk::new(||Tui::bg(Reset, " ------ "))
)))
let label = Align::ne("Next clip:");
Tryptich::top(2).left(self.width_side, label).middle(self.width_mid, per_track_top(
self.width_mid, ||self.tracks_with_sizes_scrolled(), |t, track|{
let queued = track.player.next_clip.is_some();
let queued_blank = Thunk::new(||Tui::bg(Reset, " ------ "));
let queued_clip = Thunk::new(||{
let title = if let Some((_, clip)) = track.player.next_clip.as_ref() {
if let Some(clip) = clip {
clip.read().unwrap().name.as_ref().clone()
} else {
"Stop"
}
} else {
""
};
Tui::bg(Reset, title)
});
Either(queued, queued_clip, queued_blank)
}))
}
fn output_ports (&'a self) -> impl Content<TuiOut> + 'a {