mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
groovebox: don't crash on 'r'
This commit is contained in:
parent
ccf21cbdfe
commit
986e0a42a1
8 changed files with 33 additions and 29 deletions
|
|
@ -129,8 +129,9 @@ impl Configuration {
|
|||
}
|
||||
print!("{path:?}...");
|
||||
let keys = read_and_leak(path)?.into();
|
||||
println!("ok");
|
||||
let cond = cond.unwrap();
|
||||
print!("{exp:?}...");
|
||||
println!("ok");
|
||||
map.add_layer_if(
|
||||
Box::new(move |state|{
|
||||
let mut exp = exp.clone();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ pub(crate) use std::path::PathBuf;
|
|||
pub(crate) use std::error::Error;
|
||||
pub(crate) use std::ffi::OsString;
|
||||
|
||||
pub(crate) use ::tengri::{dsl::*, input::*, output::*, tui::{*, ratatui::prelude::*}};
|
||||
pub(crate) use ::tengri::{Usually, Perhaps, dsl::*, input::*, output::*, tui::{*, ratatui::prelude::*}};
|
||||
pub(crate) use ::tek_engine::*;
|
||||
pub(crate) use ::tek_engine::midi::{u7, LiveEvent, MidiMessage};
|
||||
pub(crate) use ::tek_engine::jack::{Control, ProcessScope, MidiWriter, RawMidi};
|
||||
|
|
@ -43,8 +43,7 @@ pub(crate) use ratatui::{prelude::Rect, widgets::{Widget, canvas::{Canvas, Line}
|
|||
pub enum Device {
|
||||
#[cfg(feature = "sequencer")] Sequencer(MidiPlayer),
|
||||
#[cfg(feature = "sampler")] Sampler(Sampler),
|
||||
#[cfg(feature = "plugin")] Plugin(Plugin),
|
||||
#[cfg(feature = "lv2")] Lv2, // TODO
|
||||
#[cfg(feature = "lv2")] Lv2(Lv2), // TODO
|
||||
#[cfg(feature = "vst2")] Vst2, // TODO
|
||||
#[cfg(feature = "vst3")] Vst3, // TODO
|
||||
#[cfg(feature = "clap")] Clap, // TODO
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ fn scan (dir: &PathBuf) -> Usually<(Vec<OsString>, Vec<OsString>)> {
|
|||
}
|
||||
|
||||
impl Content<TuiOut> for AddSampleModal {
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
fn render (&self, _to: &mut TuiOut) {
|
||||
todo!()
|
||||
//let area = to.area();
|
||||
//to.make_dim();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ impl Sampler {
|
|||
voices.write().unwrap().push(Sample::play(sample, time as usize, vel));
|
||||
}
|
||||
},
|
||||
MidiMessage::Controller { controller, value } => {
|
||||
MidiMessage::Controller { controller: _, value: _ } => {
|
||||
// TODO
|
||||
}
|
||||
_ => {}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,10 @@ pub(crate) use std::sync::{Arc, atomic::{AtomicUsize, AtomicBool, Ordering::Rela
|
|||
pub(crate) use std::fmt::Debug;
|
||||
pub(crate) use std::ops::{Add, Sub, Mul, Div, Rem};
|
||||
|
||||
pub(crate) use ::tengri::tui::*;
|
||||
pub(crate) use ::tengri::{Usually, tui::*};
|
||||
|
||||
pub use ::atomic_float; pub(crate) use atomic_float::*;
|
||||
|
||||
/// Standard result type.
|
||||
pub(crate) type Usually<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
||||
|
||||
/// Standard optional result type.
|
||||
pub(crate) type Perhaps<T> = std::result::Result<Option<T>, Box<dyn std::error::Error>>;
|
||||
|
||||
pub trait Gettable<T> {
|
||||
/// Returns current value
|
||||
fn get (&self) -> T;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue