mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
all seems to mostly work besides midi editor - here be dragons!
This commit is contained in:
parent
50bb8cab07
commit
e9957fcd49
1 changed files with 14 additions and 23 deletions
|
|
@ -120,35 +120,26 @@ render!(Tui: (self: Groovebox) => {
|
||||||
let color = self.player.play_phrase().as_ref()
|
let color = self.player.play_phrase().as_ref()
|
||||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||||
.clone();
|
.clone();
|
||||||
let transport = Fixed::y(3, row!(
|
let transport = Fixed::y(3, Bsp::e(
|
||||||
PlayPause(self.clock().is_rolling()),
|
PlayPause(self.clock().is_rolling()),
|
||||||
TransportView::new(self, color, true),
|
TransportView::new(self, color, true),
|
||||||
));
|
));
|
||||||
let selector = Push::x(sampler_w, Fixed::y(1, row!(
|
let selector = Fixed::y(1, Bsp::e(
|
||||||
PhraseSelector::play_phrase(&self.player),
|
PhraseSelector::play_phrase(&self.player),
|
||||||
PhraseSelector::next_phrase(&self.player),
|
PhraseSelector::next_phrase(&self.player),
|
||||||
)));
|
));
|
||||||
|
let sampler = Tui::bg(TuiTheme::g(32), Align::w(Fixed::x(sampler_w, Fill::xy(col!(
|
||||||
|
Meters(self.sampler.input_meter.as_ref()),
|
||||||
|
GrooveboxSamples(self)
|
||||||
|
)))));
|
||||||
|
let status = EditStatus(&self.sampler, &self.editor, note_pt, "test");
|
||||||
let pool = PoolView(&self.pool);
|
let pool = PoolView(&self.pool);
|
||||||
let with_pool = move|x|Bsp::w(Pull::y(1, Align::e(Fill::y(Fixed::x(pool_w, pool)))), x);
|
let with_pool = move|x|Bsp::w(Align::e(Fill::y(Fixed::x(pool_w, pool))), x);
|
||||||
with_pool(Fill::xy(Align::nw(col!(transport, selector))))
|
Fill::xy(Bsp::a(&self.size,
|
||||||
//selector
|
Bsp::s(transport,
|
||||||
//let sampler = move|x|Bsp::e(
|
Bsp::n(status,
|
||||||
//Fixed::x(sampler_w, Fill::xy(col!(
|
Bsp::n(selector,
|
||||||
//Meters(self.sampler.input_meter.as_ref()),
|
with_pool(Fill::xy(sampler)))))))});
|
||||||
//GrooveboxSamples(self)))),
|
|
||||||
//x);
|
|
||||||
//let status = EditStatus(&self.sampler, &self.editor, note_pt, pool(sampler(&self.editor)));
|
|
||||||
//status
|
|
||||||
//Fill::xy(lay!(
|
|
||||||
//&self.size,
|
|
||||||
//Fill::xy(Align::s(Fixed::y(2, GrooveboxStatus::from(self)))),
|
|
||||||
//Shrink::y(2, col!(
|
|
||||||
//transport,
|
|
||||||
//selector,
|
|
||||||
//status
|
|
||||||
//))
|
|
||||||
//))
|
|
||||||
});
|
|
||||||
|
|
||||||
struct EditStatus<'a, T: Content<Tui>>(&'a Sampler, &'a MidiEditor, usize, T);
|
struct EditStatus<'a, T: Content<Tui>>(&'a Sampler, &'a MidiEditor, usize, T);
|
||||||
impl<'a, T: Content<Tui>> Content<Tui> for EditStatus<'a, T> {
|
impl<'a, T: Content<Tui>> Content<Tui> for EditStatus<'a, T> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue