mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
28 lines
702 B
Rust
28 lines
702 B
Rust
extern crate clap;
|
|
extern crate jack;
|
|
extern crate crossterm;
|
|
|
|
use clap::{Parser};
|
|
use std::error::Error;
|
|
|
|
pub mod cli;
|
|
pub mod device;
|
|
pub mod prelude;
|
|
pub mod draw;
|
|
pub mod config;
|
|
pub mod layout;
|
|
pub mod time;
|
|
|
|
use crate::prelude::*;
|
|
|
|
fn main () -> Result<(), Box<dyn Error>> {
|
|
let _cli = cli::Cli::parse();
|
|
let xdg = microxdg::XdgApp::new("dawdle")?;
|
|
crate::config::create_dirs(&xdg)?;
|
|
let transport = crate::device::Transport::new("Transport")?;
|
|
let timebase = transport.state.lock().unwrap().timebase();
|
|
crate::device::run(Chain::new("Chain#0000", vec![
|
|
Box::new(Sequencer::new("Phrase#000", &timebase)?),
|
|
Box::new(Plugin::new("Plugin#000")?),
|
|
])?)
|
|
}
|