mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
45 lines
1.4 KiB
Rust
45 lines
1.4 KiB
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::device::*;
|
|
use crate::layout::*;
|
|
|
|
fn main () -> Result<(), Box<dyn Error>> {
|
|
let _cli = cli::Cli::parse();
|
|
let xdg = microxdg::XdgApp::new("dawdle")?;
|
|
crate::config::create_dirs(&xdg)?;
|
|
//crate::device::run(Sequencer::new("Rhythm#000")?)
|
|
let transport = Transport::new("Transport")?;
|
|
let timebase = transport.state.lock().unwrap().timebase();
|
|
crate::device::run(FocusColumn(Some(0), Column::new(vec![
|
|
Box::new(transport) as Box<dyn Device>,
|
|
Box::new(Chain::new("Chain#0000", vec![
|
|
Box::new(Sequencer::new("Melody#000", &timebase)?),
|
|
Box::new(Plugin::new("Plugin#000")?),
|
|
])?),
|
|
//Box::new(Columns::new(false, vec![
|
|
//Box::new(Chain::new("Chain#00", vec![
|
|
//Box::new(Sequencer::new("Rhythm#000")?),
|
|
//Box::new(Sampler::new("Sampler#00")?),
|
|
//])?),
|
|
//Box::new(Chain::new("Chain#01", vec![
|
|
//Box::new(Sequencer::new("Melody#000")?),
|
|
//Box::new(Plugin::new("Plugin#000")?),
|
|
//])?),
|
|
//])),
|
|
//Box::new(Mixer::new("Mixer#000")?),
|
|
//Box::new(Sequencer::new("Rhythm#000")?),
|
|
])))
|
|
}
|