mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
sampler: enable recording
This commit is contained in:
parent
2877545140
commit
3b5c23f68c
5 changed files with 16 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#![feature(let_chains)]
|
||||
|
||||
pub(crate) use ::tek_jack::{*, jack::*};
|
||||
pub(crate) use ::tek_midi::{*, midly::{*, live::*, num::*}};
|
||||
pub(crate) use ::tengri::{dsl::*, input::*, output::*, tui::{*, ratatui::prelude::*}};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ expose! {
|
|||
[Option<Arc<RwLock<Sample>>>] => {}
|
||||
[PathBuf] => {}
|
||||
[f32] => {}
|
||||
[u7] => {}
|
||||
[u7] => {
|
||||
":sample" => (self.note_pos() as u8).into(),
|
||||
}
|
||||
[usize] => {
|
||||
":sample-up" => self.note_pos().min(119) + 8,
|
||||
":sample-down" => self.note_pos().max(8) - 8,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,14 @@ impl Sampler {
|
|||
let cursor = self.cursor();
|
||||
let hi_fg = Color::Rgb(64, 64, 64);
|
||||
let hi_bg = if y == 0 { Color::Reset } else { Color::Rgb(64, 64, 64) /*prev*/ };
|
||||
let tx_fg = Color::Rgb(255, 255, 255);
|
||||
let tx_fg = if let Some((index, _)) = self.recording
|
||||
&& index % 8 == x as usize
|
||||
&& index / 8 == y as usize
|
||||
{
|
||||
Color::Rgb(255, 64, 0)
|
||||
} else {
|
||||
Color::Rgb(255, 255, 255)
|
||||
};
|
||||
let tx_bg = if x as usize == cursor.0 && y as usize == cursor.1 {
|
||||
Color::Rgb(96, 96, 96)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue