mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-04-04 05:10:44 +02:00
add arranger cell bgs and partially update Justfile
This commit is contained in:
parent
7bb3f6224d
commit
60258649fb
3 changed files with 39 additions and 73 deletions
|
|
@ -98,69 +98,3 @@ has_clock!(|self: Arranger|&self.clock);
|
|||
has_phrases!(|self: Arranger|self.pool.phrases);
|
||||
has_editor!(|self: Arranger|self.editor);
|
||||
handle!(TuiIn: |self: Arranger, input|ArrangerCommand::execute_with_state(self, input.event()));
|
||||
|
||||
//render!(TuiOut: (self: Arranger) => {
|
||||
//let pool_w = if self.pool.visible { self.splits[1] } else { 0 };
|
||||
//let color = self.color;
|
||||
//let layout = Bsp::a(Fill::xy(ArrangerStatus::from(self)),
|
||||
//Bsp::n(Fixed::x(pool_w, PoolView(self.pool.visible, &self.pool)),
|
||||
//Bsp::n(TransportView::new(true, &self.clock),
|
||||
//Bsp::s(Fixed::y(1, MidiEditStatus(&self.editor)),
|
||||
//Bsp::n(Fill::x(Fixed::y(20,
|
||||
//Bsp::a(Fill::xy(Tui::bg(color.darkest.rgb, "background")),
|
||||
//Bsp::a(
|
||||
//Fill::xy(Outer(Style::default().fg(color.dark.rgb).bg(color.darkest.rgb))),
|
||||
//Self::render_mode(self))))), Fill::y(&"fixme: self.editor"))))));
|
||||
//self.size.of(layout)
|
||||
//});
|
||||
|
||||
///// Status bar for arranger app
|
||||
//#[derive(Clone)]
|
||||
//pub struct ArrangerStatus {
|
||||
//pub(crate) width: usize,
|
||||
//pub(crate) cpu: Option<Arc<str>>,
|
||||
//pub(crate) size: Arc<str>,
|
||||
//pub(crate) playing: bool,
|
||||
//}
|
||||
//from!(|state:&Arranger|ArrangerStatus = {
|
||||
//let samples = state.clock.chunk.load(Relaxed);
|
||||
//let rate = state.clock.timebase.sr.get();
|
||||
//let buffer = samples as f64 / rate;
|
||||
//let width = state.size.w();
|
||||
//Self {
|
||||
//width,
|
||||
//playing: state.clock.is_rolling(),
|
||||
//cpu: state.perf.percentage().map(|cpu|format!("│{cpu:.01}%").into()),
|
||||
//size: format!("{}x{}│", width, state.size.h()).into(),
|
||||
//}
|
||||
//});
|
||||
//render!(TuiOut: (self: ArrangerStatus) => Fixed::y(2, lay!(
|
||||
//Self::help(),
|
||||
//Fill::xy(Align::se(Tui::fg_bg(TuiTheme::orange(), TuiTheme::g(25), self.stats()))),
|
||||
//)));
|
||||
//impl ArrangerStatus {
|
||||
//fn help () -> impl Content<TuiOut> {
|
||||
//let single = |binding, command|row!(" ", col!(
|
||||
//Tui::fg(TuiTheme::yellow(), binding),
|
||||
//command
|
||||
//));
|
||||
//let double = |(b1, c1), (b2, c2)|col!(
|
||||
//row!(" ", Tui::fg(TuiTheme::yellow(), b1), " ", c1,),
|
||||
//row!(" ", Tui::fg(TuiTheme::yellow(), b2), " ", c2,),
|
||||
//);
|
||||
//Tui::fg_bg(TuiTheme::g(255), TuiTheme::g(50), row!(
|
||||
//single("SPACE", "play/pause"),
|
||||
//single(" Ctrl", " scroll"),
|
||||
//single(" ▲▼▶◀", " cell"),
|
||||
//double(("p", "put"), ("g", "get")),
|
||||
//double(("q", "enqueue"), ("e", "edit")),
|
||||
//single(" wsad", " note"),
|
||||
//double(("a", "append"), ("s", "set"),),
|
||||
//double((",.", "length"), ("<>", "triplet"),),
|
||||
//double(("[]", "phrase"), ("{}", "order"),),
|
||||
//))
|
||||
//}
|
||||
//fn stats (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//row!(&self.cpu, &self.size)
|
||||
//}
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue