flatten arranger and piano modules

This commit is contained in:
🪞👃🪞 2025-01-02 13:16:25 +01:00
parent 7a4fa1692b
commit 1723826cc2
19 changed files with 120 additions and 130 deletions

View file

@ -111,42 +111,42 @@ render!(Tui: (self: Groovebox) => {
&self.size,
Bsp::s(
Fill::x(Fixed::y(3, Align::x(TransportView(&self.player.clock)))),
Bsp::s(
Fill::x(Fixed::y(1, Align::x(Bsp::e(
PhraseSelector::play_phrase(&self.player),
PhraseSelector::next_phrase(&self.player),
)))),
Bsp::n(
Fixed::y(9, col!(
Bsp::e(
self.sampler.mapped[note_pt].as_ref().map(|sample|format!(
"Sample {}-{}",
sample.read().unwrap().start,
sample.read().unwrap().end,
)),
MidiEditStatus(&self.editor),
),
Bsp::a(
Outer(Style::default().fg(TuiTheme::g(128))),
Fill::x(Fixed::y(8, if let Some((_, sample)) = &self.sampler.recording {
SampleViewer(Some(sample.clone()))
} else if let Some(sample) = &self.sampler.mapped[note_pt] {
SampleViewer(Some(sample.clone()))
} else {
SampleViewer(None)
})),
),
Bsp::n(
Fixed::y(9, Bsp::s(
self.sampler.mapped[note_pt].as_ref().map(|sample|format!(
"Sample {}-{}",
sample.read().unwrap().start,
sample.read().unwrap().end,
)),
Bsp::w(
Align::e(Fill::y(Fixed::x(pool_w, PoolView(&self.pool)))),
Fill::xy(Bsp::e(
Align::w(Fixed::x(sampler_w, Tui::bg(TuiTheme::g(32), Fill::xy(col!(
Meters(self.sampler.input_meter.as_ref()),
GrooveboxSamples(self)
))))),
Fill::xy(Align::c("kyp"))
))
)
Bsp::a(
Outer(Style::default().fg(TuiTheme::g(128))),
Fill::x(Fixed::y(8, if let Some((_, sample)) = &self.sampler.recording {
SampleViewer(Some(sample.clone()))
} else if let Some(sample) = &self.sampler.mapped[note_pt] {
SampleViewer(Some(sample.clone()))
} else {
SampleViewer(None)
})),
),
)),
Bsp::w(
Align::e(Fill::y(Fixed::x(pool_w, PoolView(&self.pool)))),
Fill::xy(Bsp::e(
Align::w(Fixed::x(sampler_w, Tui::bg(TuiTheme::g(32), Fill::xy(col!(
Meters(self.sampler.input_meter.as_ref()),
GrooveboxSamples(self)
))))),
Bsp::s(
Fill::x(Align::c(Bsp::e(
PhraseSelector::play_phrase(&self.player),
PhraseSelector::next_phrase(&self.player),
))),
Bsp::n(
MidiEditStatus(&self.editor),
Fill::xy(Align::c("kyp"))
),
),
))
)
)
)