feat: run stub tek_sequencer

This commit is contained in:
🪞👃🪞 2024-08-06 18:05:05 +03:00
parent b8a67b8adc
commit 09abc4cd95
12 changed files with 78 additions and 56 deletions

View file

@ -14,6 +14,8 @@ pub struct Sampler {
pub output_gain: f32
}
process!(Sampler = Sampler::process);
handle!(Sampler |self, event| handle_keymap(self, event, KEYMAP_SAMPLER));
render!(Sampler |self, buf, area| {
let Rect { x, y, height, .. } = area;
let style = Style::default().gray();
@ -56,8 +58,6 @@ fn draw_sample (
Ok(label1.len() + label2.len() + 4)
}
handle!(Sampler |self, event| handle_keymap(self, event, KEYMAP_SAMPLER));
/// Key bindings for sampler device.
pub const KEYMAP_SAMPLER: &'static [KeyBinding<Sampler>] = keymap!(Sampler {
[Up, NONE, "/sampler/cursor/up", "move cursor up", |state: &mut Sampler| {
@ -98,7 +98,6 @@ pub const KEYMAP_SAMPLER: &'static [KeyBinding<Sampler>] = keymap!(Sampler {
}],
});
process!(Sampler = Sampler::process);
impl Sampler {
pub fn new (name: &str, mapped: Option<BTreeMap<u7, Arc<RwLock<Sample>>>>) -> Usually<JackDevice> {