diff --git a/crates/sampler/sampler_scratch.rs b/crates/sampler/sampler_scratch.rs index 4bbce539..82009355 100644 --- a/crates/sampler/sampler_scratch.rs +++ b/crates/sampler/sampler_scratch.rs @@ -103,47 +103,3 @@ //gain: 1.0 //})))) //}); - -//content!(TuiOut: |self: Sampler| { - //let keys_width = 5; - //let keys = move||"";//SamplerKeys(self); - //let fg = self.color.base.rgb; - //let bg = self.color.darkest.rgb; - //let border = Fill::xy(Outer(true, Style::default().fg(fg).bg(bg))); - //let with_border = |x|lay!(border, Fill::xy(x)); - //let with_size = |x|lay!(self.size.clone(), x); - //Tui::bg(bg, Fill::xy(with_border(Bsp::s( - //Tui::fg(self.color.light.rgb, Tui::bold(true, &"Sampler")), - //with_size(Shrink::y(1, Bsp::e( - //Fixed::x(keys_width, keys()), - //Fill::xy(SamplesTui { - //color: self.color, - //note_hi: self.note_hi(), - //note_pt: self.note_pos(), - //height: self.size.h(), - //}), - //))), - //)))) -//}); - -//struct SamplesTui { - //color: ItemTheme, - //note_hi: usize, - //note_pt: usize, - //height: usize, -//} - -//render!(TuiOut: |self: SamplesTui, to| { - //let x = to.area.x(); - //let bg_base = self.color.darkest.rgb; - //let bg_selected = self.color.darker.rgb; - //let style_empty = Style::default().fg(self.color.base.rgb); - //let style_full = Style::default().fg(self.color.lighter.rgb); - //for y in 0..self.height { - //let note = self.note_hi - y as usize; - //let bg = if note == self.note_pt { bg_selected } else { bg_base }; - //let style = Some(style_empty.bg(bg)); - //to.blit(&" (no sample) ", x, to.area.y() + y as u16, style); - //} -//}); - diff --git a/crates/sampler/src/sampler_view.rs b/crates/sampler/src/sampler_view.rs index 117a656b..9a50380b 100644 --- a/crates/sampler/src/sampler_view.rs +++ b/crates/sampler/src/sampler_view.rs @@ -61,7 +61,7 @@ impl Sampler { let note_lo = editor.note_lo().load(Relaxed); let note_pt = editor.note_pos(); let note_hi = editor.note_hi(); - Fixed::x(16, Map::south( + Fixed::x(12, Map::south( 1, move||(note_lo..=note_hi).rev(), move|note, i| { @@ -114,7 +114,7 @@ fn draw_list_item (sample: &Option>>) -> String { sample.channels[0].len() ) } else { - String::from("(none)") + String::from("........") } }