mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
align sampler
This commit is contained in:
parent
44c28183de
commit
ba5e65ed7d
1 changed files with 29 additions and 27 deletions
|
|
@ -108,9 +108,14 @@ 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 sampler = Align::w(Fill::y(SampleList::new(&self.sampler, &self.editor)));
|
|
||||||
let selectors = Bsp::e(ClipSelected::play_phrase(&self.player), ClipSelected::next_phrase(&self.player));
|
let sampler =
|
||||||
let edit_clip = MidiEditClip(&self.editor);
|
Fixed::x(sampler_w, Push::y(1, Align::w(Fill::y(SampleList::new(&self.sampler, &self.editor)))));
|
||||||
|
let selectors =
|
||||||
|
Bsp::e(ClipSelected::play_phrase(&self.player), ClipSelected::next_phrase(&self.player));
|
||||||
|
let edit_clip =
|
||||||
|
MidiEditClip(&self.editor);
|
||||||
|
|
||||||
self.size.of(Bsp::s(
|
self.size.of(Bsp::s(
|
||||||
Fill::x(Fixed::y(if self.pool.visible { 3 } else { 1 }, lay!(
|
Fill::x(Fixed::y(if self.pool.visible { 3 } else { 1 }, lay!(
|
||||||
Align::w(Meter("L/", self.sampler.input_meter[0])),
|
Align::w(Meter("L/", self.sampler.input_meter[0])),
|
||||||
|
|
@ -120,32 +125,29 @@ render!(Tui: (self: Groovebox) => {
|
||||||
&self.player.clock
|
&self.player.clock
|
||||||
))),
|
))),
|
||||||
))),
|
))),
|
||||||
Bsp::n(
|
Bsp::s(
|
||||||
Bsp::a(
|
lay!(Align::w(edit_clip), Align::e(selectors)),
|
||||||
Outer(Style::default().fg(TuiTheme::g(128))),
|
|
||||||
Fill::x(Fixed::y(sample_h, 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(
|
Bsp::n(
|
||||||
lay!(
|
Bsp::a(
|
||||||
Align::w(Fixed::y(1, SamplerStatus(&self.sampler, note_pt))),
|
Outer(Style::default().fg(TuiTheme::g(128))),
|
||||||
Align::x(Fixed::y(1, MidiEditStatus(&self.editor))),
|
Fill::x(Fixed::y(sample_h, if let Some((_, sample)) = &self.sampler.recording {
|
||||||
),
|
SampleViewer(Some(sample.clone()))
|
||||||
Bsp::w(
|
} else if let Some(sample) = &self.sampler.mapped[note_pt] {
|
||||||
Fixed::x(pool_w, Align::e(Fill::y(PoolView(&self.pool)))),
|
SampleViewer(Some(sample.clone()))
|
||||||
Fill::xy(Bsp::e(
|
} else {
|
||||||
Fixed::x(sampler_w, Push::y(3, sampler)),
|
SampleViewer(None)
|
||||||
Bsp::s(
|
})),
|
||||||
lay!(Align::w(edit_clip), Align::e(selectors)),
|
|
||||||
&self.editor
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
|
Bsp::n(
|
||||||
|
lay!(
|
||||||
|
Align::w(Fixed::y(1, SamplerStatus(&self.sampler, note_pt))),
|
||||||
|
Align::x(Fixed::y(1, MidiEditStatus(&self.editor))),
|
||||||
|
),
|
||||||
|
Bsp::w(
|
||||||
|
Fixed::x(pool_w, Align::e(Fill::y(PoolView(&self.pool)))),
|
||||||
|
Fill::xy(Bsp::e(sampler, &self.editor)),
|
||||||
|
),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue