mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56: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()
|
||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||
.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 edit_clip = MidiEditClip(&self.editor);
|
||||
|
||||
let sampler =
|
||||
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(
|
||||
Fill::x(Fixed::y(if self.pool.visible { 3 } else { 1 }, lay!(
|
||||
Align::w(Meter("L/", self.sampler.input_meter[0])),
|
||||
|
|
@ -120,32 +125,29 @@ render!(Tui: (self: Groovebox) => {
|
|||
&self.player.clock
|
||||
))),
|
||||
))),
|
||||
Bsp::n(
|
||||
Bsp::a(
|
||||
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::s(
|
||||
lay!(Align::w(edit_clip), Align::e(selectors)),
|
||||
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(
|
||||
Fixed::x(sampler_w, Push::y(3, sampler)),
|
||||
Bsp::s(
|
||||
lay!(Align::w(edit_clip), Align::e(selectors)),
|
||||
&self.editor
|
||||
),
|
||||
)),
|
||||
Bsp::a(
|
||||
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(
|
||||
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