mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 15:56:57 +02:00
This commit is contained in:
parent
54ab1d8ba1
commit
c72fe8ab23
5 changed files with 112 additions and 110 deletions
|
|
@ -1078,25 +1078,25 @@ impl PianoHorizontal {
|
|||
if note == (127-note_point) || time == time_point {
|
||||
cell.set_bg(Rgb(0,0,0));
|
||||
} else {
|
||||
cell.set_bg(clip.color.darkest.rgb);
|
||||
cell.set_bg(clip.color.darkest.term);
|
||||
}
|
||||
if time % 384 == 0 {
|
||||
cell.set_fg(clip.color.darker.rgb);
|
||||
cell.set_fg(clip.color.darker.term);
|
||||
cell.set_char('│');
|
||||
} else if time % 96 == 0 {
|
||||
cell.set_fg(clip.color.dark.rgb);
|
||||
cell.set_fg(clip.color.dark.term);
|
||||
cell.set_char('╎');
|
||||
} else if time % note_len == 0 {
|
||||
cell.set_fg(clip.color.darker.rgb);
|
||||
cell.set_fg(clip.color.darker.term);
|
||||
cell.set_char('┊');
|
||||
} else if (127 - note) % 12 == 0 {
|
||||
cell.set_fg(clip.color.darker.rgb);
|
||||
cell.set_fg(clip.color.darker.term);
|
||||
cell.set_char('=');
|
||||
} else if (127 - note) % 6 == 0 {
|
||||
cell.set_fg(clip.color.darker.rgb);
|
||||
cell.set_fg(clip.color.darker.term);
|
||||
cell.set_char('—');
|
||||
} else {
|
||||
cell.set_fg(clip.color.darker.rgb);
|
||||
cell.set_fg(clip.color.darker.term);
|
||||
cell.set_char('·');
|
||||
}
|
||||
}
|
||||
|
|
@ -1106,7 +1106,7 @@ impl PianoHorizontal {
|
|||
///
|
||||
/// This mode uses full blocks on note on and half blocks on legato: █▄ █▄ █▄
|
||||
fn draw_fg (buf: &mut BigBuffer, clip: &MidiClip, zoom: usize) {
|
||||
let style = Style::default().fg(clip.color.base.rgb);//.bg(Rgb(0, 0, 0));
|
||||
let style = Style::default().fg(clip.color.base.term);//.bg(Rgb(0, 0, 0));
|
||||
let mut notes_on = [false;128];
|
||||
for (x, time_start) in (0..clip.length).step_by(zoom).enumerate() {
|
||||
for (_y, note) in (0..=127).rev().enumerate() {
|
||||
|
|
@ -1178,7 +1178,7 @@ impl PianoHorizontal {
|
|||
let time_pos = self.get_time_pos();
|
||||
let time_start = self.get_time_start();
|
||||
let time_zoom = self.get_time_zoom();
|
||||
let style = Some(Style::default().fg(self.color.lightest.rgb));
|
||||
let style = Some(Style::default().fg(self.color.lightest.term));
|
||||
Thunk::new(move|to: &mut Tui|{
|
||||
let XYWH(x0, y0, w, _) = to.area();
|
||||
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
|
||||
|
|
@ -1209,7 +1209,7 @@ impl PianoHorizontal {
|
|||
let note_pos = state.get_note_pos();
|
||||
let key_style = Some(Style::default().fg(Rgb(192, 192, 192)).bg(Rgb(0, 0, 0)));
|
||||
let off_style = Some(Style::default().fg(Tui::g(255)));
|
||||
let on_style = Some(Style::default().fg(Rgb(255,0,0)).bg(color.base.rgb).bold());
|
||||
let on_style = Some(Style::default().fg(Rgb(255,0,0)).bg(color.base.term).bold());
|
||||
h_full(w_exact(self.keys_width, Thunk::new(move|to: &mut Tui|{
|
||||
let XYWH(x, y0, _w, _h) = to.area();
|
||||
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue