mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
tabula rasa
This commit is contained in:
commit
11a9f3ba50
33 changed files with 1937 additions and 0 deletions
41
src/main.rs
Normal file
41
src/main.rs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
extern crate clap;
|
||||
extern crate jack;
|
||||
extern crate crossterm;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use std::error::Error;
|
||||
|
||||
//pub mod sequence;
|
||||
pub mod engine;
|
||||
pub mod transport;
|
||||
pub mod mixer;
|
||||
pub mod looper;
|
||||
|
||||
fn main () -> Result<(), Box<dyn Error>> {
|
||||
let cli = Cli::parse();
|
||||
match cli.command {
|
||||
Command::Transport =>
|
||||
crate::transport::Transport::run_tui(),
|
||||
Command::Mixer =>
|
||||
crate::mixer::Mixer::run_tui(),
|
||||
Command::Looper =>
|
||||
crate::looper::Looper::run_tui(),
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Command
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Subcommand)]
|
||||
pub enum Command {
|
||||
/// Control the master transport
|
||||
Transport,
|
||||
/// Control the mixer
|
||||
Mixer,
|
||||
/// Control the looper
|
||||
Looper,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue