mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
remove old input macros
This commit is contained in:
parent
6fd87ce4ed
commit
ca1fb3c414
11 changed files with 218 additions and 247 deletions
33
cli/tek.rs
33
cli/tek.rs
|
|
@ -1,7 +1,8 @@
|
|||
use tek::*;
|
||||
use clap::{self, Parser, Subcommand};
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
#[derive(Debug, Parser)] pub struct TekCli {
|
||||
pub struct TekCli {
|
||||
/// Which app to initialize
|
||||
#[command(subcommand)] mode: TekMode,
|
||||
/// Name of JACK client
|
||||
|
|
@ -60,7 +61,7 @@ use clap::{self, Parser, Subcommand};
|
|||
pub fn main () -> Usually<()> {
|
||||
let cli = TekCli::parse();
|
||||
let name = cli.name.as_ref().map_or("tek", |x|x.as_str());
|
||||
let color = ItemPalette::random();
|
||||
//let color = ItemPalette::random();
|
||||
let jack = JackConnection::new(name)?;
|
||||
let engine = Tui::new()?;
|
||||
let empty = &[] as &[&str];
|
||||
|
|
@ -73,20 +74,6 @@ pub fn main () -> Usually<()> {
|
|||
let audio_froms = &[left_froms.as_slice(), right_froms.as_slice()];
|
||||
let audio_tos = &[left_tos.as_slice(), right_tos.as_slice() ];
|
||||
Ok(match cli.mode {
|
||||
TekMode::Sampler => engine.run(&jack.activate_with(|jack|Ok(
|
||||
SamplerTui {
|
||||
cursor: (0, 0),
|
||||
editing: None,
|
||||
mode: None,
|
||||
note_lo: 36.into(),
|
||||
note_pt: 36.into(),
|
||||
size: Measure::new(),
|
||||
state: Sampler::new(jack, &"sampler", &midi_froms,
|
||||
&[&left_froms, &right_froms],
|
||||
&[&left_tos, &right_tos])?,
|
||||
color,
|
||||
}
|
||||
))?)?,
|
||||
TekMode::Clock =>
|
||||
engine.run(&jack.activate_with(|jack|App::clock(
|
||||
jack, cli.bpm))?)?,
|
||||
|
|
@ -101,6 +88,20 @@ pub fn main () -> Usually<()> {
|
|||
jack, cli.bpm, &midi_froms, &midi_tos, &audio_froms, &audio_tos,
|
||||
scenes, tracks, track_width,
|
||||
))?)?,
|
||||
//TekMode::Sampler => engine.run(&jack.activate_with(|jack|Ok(
|
||||
//SamplerTui {
|
||||
//cursor: (0, 0),
|
||||
//editing: None,
|
||||
//mode: None,
|
||||
//note_lo: 36.into(),
|
||||
//note_pt: 36.into(),
|
||||
//size: Measure::new(),
|
||||
//state: Sampler::new(jack, &"sampler", &midi_froms,
|
||||
//&[&left_froms, &right_froms],
|
||||
//&[&left_tos, &right_tos])?,
|
||||
//color,
|
||||
//}
|
||||
//))?)?,
|
||||
_ => todo!()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue