mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
shrink sampler
This commit is contained in:
parent
6c266fcfca
commit
5bd9068bbe
3 changed files with 8 additions and 7 deletions
|
|
@ -89,15 +89,14 @@ render!(Tui: (self: Groovebox) => {
|
|||
let w = self.size.w();
|
||||
let phrase_w = if w > 60 { 20 } else if w > 40 { 15 } else { 10 };
|
||||
let pool_w = if !self.compact { phrase_w } else { 5 };
|
||||
let sampler_w = if !self.compact { phrase_w } else { 4 };
|
||||
let sampler_w = if !self.compact { 11 } else { 4 };
|
||||
let sample_h = if !self.compact { 5 } else { 0 };
|
||||
let note_pt = self.editor.note_point();
|
||||
let color = self.player.play_phrase().as_ref()
|
||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||
.clone();
|
||||
|
||||
let sampler =
|
||||
Fixed::x(sampler_w, Push::y(1, Align::w(Fill::y(SampleList::new(self.compact, &self.sampler, &self.editor)))));
|
||||
let sampler = Fixed::x(sampler_w, Push::y(if self.compact { 1 } else { 0 },
|
||||
Align::w(Fill::y(SampleList::new(self.compact, &self.sampler, &self.editor)))));
|
||||
let selectors =
|
||||
Bsp::e(ClipSelected::play_phrase(&self.player), ClipSelected::next_phrase(&self.player));
|
||||
let edit_clip =
|
||||
|
|
@ -125,7 +124,7 @@ render!(Tui: (self: Groovebox) => {
|
|||
Align::x(Fixed::y(1, MidiEditStatus(&self.editor))),
|
||||
),
|
||||
Bsp::w(
|
||||
Fixed::x(pool_w, Align::e(Fill::y(PoolView(self.compact, &self.pool)))),
|
||||
Fixed::x(pool_w, PoolView(self.compact, &self.pool)),
|
||||
Fill::xy(Bsp::e(sampler, &self.editor)),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,10 @@ impl PianoHorizontal {
|
|||
'╎'
|
||||
} else if time % note_len == 0 {
|
||||
'┊'
|
||||
} else if (127 - note) % 12 == 1 {
|
||||
} else if (127 - note) % 12 == 0 {
|
||||
'='
|
||||
} else if (127 - note) % 6 == 0 {
|
||||
'—'
|
||||
} else {
|
||||
'·'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ render!(Tui: (self: SampleList<'a>) => {
|
|||
let note_lo = editor.note_lo().load(Relaxed);
|
||||
let note_pt = editor.note_point();
|
||||
let note_hi = editor.note_hi();
|
||||
Fill::xy(Tui::map(move||(note_lo..=note_hi).rev(), move|note, i| {
|
||||
Outer(Style::default().fg(TuiTheme::g(96))).enclose(Tui::map(move||(note_lo..=note_hi).rev(), move|note, i| {
|
||||
|
||||
let offset = |a|Push::y(i as u16, Align::n(Fixed::y(1, Fill::x(a))));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue