mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-05-01 14:30:14 +02:00
group modules and scripts
This commit is contained in:
parent
93a14a3040
commit
8794b2e05b
9
app/edn/view_arranger.edn
Normal file
9
app/edn/view_arranger.edn
Normal file
|
@ -0,0 +1,9 @@
|
|||
(bsp/n
|
||||
(fixed/y 2 :transport)
|
||||
(bsp/s
|
||||
(fixed/y 2 :status)
|
||||
(fill/xy
|
||||
(bsp/a
|
||||
(fill/xy
|
||||
(align/e :pool))
|
||||
:arranger))))
|
|
@ -100,7 +100,7 @@ impl Tek {
|
|||
midi_froms: &[PortConnect], midi_tos: &[PortConnect],
|
||||
) -> Usually<Self> {
|
||||
let tek = Self {
|
||||
view: SourceIter(include_str!("./view_transport.edn")),
|
||||
view: SourceIter(include_str!("../edn/view_transport.edn")),
|
||||
jack: jack.clone(),
|
||||
color: ItemPalette::random(),
|
||||
clock: Clock::new(jack, bpm)?,
|
||||
|
@ -147,7 +147,7 @@ impl Tek {
|
|||
let clip = Arc::new(RwLock::new(clip));
|
||||
let this = Self::new_clock(jack, bpm, sync_lead, sync_follow, midi_froms, midi_tos)?;
|
||||
Ok(Self {
|
||||
view: SourceIter(include_str!("./view_sequencer.edn")),
|
||||
view: SourceIter(include_str!("../edn/view_sequencer.edn")),
|
||||
pool: Some((&clip).into()),
|
||||
editor: Some((&clip).into()),
|
||||
editing: false.into(),
|
||||
|
@ -164,7 +164,7 @@ impl Tek {
|
|||
audio_froms: &[&[PortConnect];2], audio_tos: &[&[PortConnect];2],
|
||||
) -> Usually<Self> {
|
||||
let tek = Self {
|
||||
view: SourceIter(include_str!("./view_groovebox.edn")),
|
||||
view: SourceIter(include_str!("../edn/view_groovebox.edn")),
|
||||
tracks: vec![Track {
|
||||
devices: vec![Sampler::new(jack, &"sampler", midi_froms, audio_froms, audio_tos)?.boxed()],
|
||||
..Track::default()
|
||||
|
@ -184,7 +184,7 @@ impl Tek {
|
|||
scenes: usize, tracks: usize, track_width: usize,
|
||||
) -> Usually<Self> {
|
||||
let mut tek = Self {
|
||||
view: SourceIter(include_str!("./view_arranger.edn")),
|
||||
view: SourceIter(include_str!("../edn/view_arranger.edn")),
|
||||
pool: Some(Default::default()),
|
||||
editor: Some(Default::default()),
|
||||
editing: false.into(),
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
use crate::*;
|
||||
pub const KEYS_APP: &str = include_str!("keys.edn");
|
||||
pub const KEYS_CLIP: &str = include_str!("keys_clip.edn");
|
||||
pub const KEYS_TRACK: &str = include_str!("keys_track.edn");
|
||||
pub const KEYS_SCENE: &str = include_str!("keys_scene.edn");
|
||||
pub const KEYS_MIX: &str = include_str!("keys_mix.edn");
|
||||
mod keys_clip; pub use self::keys_clip::*;
|
||||
mod keys_ins; pub use self::keys_ins::*;
|
||||
mod keys_outs; pub use self::keys_outs::*;
|
||||
mod keys_scene; pub use self::keys_scene::*;
|
||||
mod keys_track; pub use self::keys_track::*;
|
||||
pub const KEYS_APP: &str = include_str!("../edn/keys.edn");
|
||||
pub const KEYS_CLIP: &str = include_str!("../edn/keys_clip.edn");
|
||||
pub const KEYS_TRACK: &str = include_str!("../edn/keys_track.edn");
|
||||
pub const KEYS_SCENE: &str = include_str!("../edn/keys_scene.edn");
|
||||
pub const KEYS_MIX: &str = include_str!("../edn/keys_mix.edn");
|
||||
handle!(TuiIn: |self: Tek, input|Ok({
|
||||
// If editing, editor keys take priority
|
||||
if self.is_editing() {
|
||||
|
|
|
@ -10,23 +10,8 @@ mod cli; pub use self::cli::*;
|
|||
mod audio; pub use self::audio::*;
|
||||
mod device; pub use self::device::*;
|
||||
mod keys; pub use self::keys::*;
|
||||
mod keys_clip; pub use self::keys_clip::*;
|
||||
mod keys_ins; pub use self::keys_ins::*;
|
||||
mod keys_outs; pub use self::keys_outs::*;
|
||||
mod keys_scene; pub use self::keys_scene::*;
|
||||
mod keys_track; pub use self::keys_track::*;
|
||||
mod model; pub use self::model::*;
|
||||
mod model_track; pub use self::model_track::*;
|
||||
mod model_scene; pub use self::model_scene::*;
|
||||
mod model_select; pub use self::model_select::*;
|
||||
mod view; pub use self::view::*;
|
||||
mod view_arranger; pub use self::view_arranger::*;
|
||||
mod view_clock; pub use self::view_clock::*;
|
||||
mod view_color; pub use self::view_color::*;
|
||||
mod view_iter; pub use self::view_iter::*;
|
||||
mod view_memo; pub use self::view_memo::*;
|
||||
mod view_meter; pub use self::view_meter::*;
|
||||
mod view_sizes; pub use self::view_sizes::*;
|
||||
/// Standard result type.
|
||||
pub type Usually<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
||||
/// Standard optional result type.
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
use crate::*;
|
||||
mod model_track; pub use self::model_track::*;
|
||||
mod model_scene; pub use self::model_scene::*;
|
||||
mod model_select; pub use self::model_select::*;
|
||||
#[derive(Default, Debug)] pub struct Tek {
|
||||
/// Must not be dropped for the duration of the process
|
||||
pub jack: Jack,
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
use crate::*;
|
||||
mod view_arranger; pub use self::view_arranger::*;
|
||||
mod view_clock; pub use self::view_clock::*;
|
||||
mod view_color; pub use self::view_color::*;
|
||||
mod view_iter; pub use self::view_iter::*;
|
||||
mod view_memo; pub use self::view_memo::*;
|
||||
mod view_meter; pub use self::view_meter::*;
|
||||
mod view_sizes; pub use self::view_sizes::*;
|
||||
pub(crate) use std::fmt::Write;
|
||||
pub(crate) use ::tek_tui::ratatui::prelude::Position;
|
||||
pub(crate) trait ScenesColors<'a> = Iterator<Item=SceneWithColor<'a>>;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
(bsp/n (fixed/y 2 :transport) (bsp/s (fixed/y 2 :status) (fill/xy (bsp/a (fill/xy (align/e :pool)) :arranger))))
|
|
@ -1,5 +1,5 @@
|
|||
pub use tek::*;
|
||||
pub(crate) use clap::{self, Parser, Subcommand};
|
||||
pub(crate) use clap::{self, Parser};
|
||||
/// Application entrypoint.
|
||||
pub fn main () -> Usually<()> {
|
||||
TekCli::parse().run()
|
||||
|
|
Loading…
Reference in a new issue