mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip4 (81e): kinda
This commit is contained in:
parent
1bb0107485
commit
5507b71973
10 changed files with 55 additions and 50 deletions
|
|
@ -47,7 +47,7 @@ impl JackActivate for JackClient {
|
||||||
Control::Quit
|
Control::Quit
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let frames = tek_core::jack::contrib::ClosureProcessHandler::new(frame as BoxedAudioHandler);
|
let frames = ClosureProcessHandler::new(frame as BoxedAudioHandler);
|
||||||
let mut buffer = Self::Activating;
|
let mut buffer = Self::Activating;
|
||||||
std::mem::swap(&mut*client.write().unwrap(), &mut buffer);
|
std::mem::swap(&mut*client.write().unwrap(), &mut buffer);
|
||||||
*client.write().unwrap() = Self::Active(Client::from(buffer).activate_async(events, frames)?);
|
*client.write().unwrap() = Self::Active(Client::from(buffer).activate_async(events, frames)?);
|
||||||
|
|
@ -101,7 +101,7 @@ pub trait Ports {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn register_ports<T: tek_core::jack::PortSpec + Copy>(
|
fn register_ports<T: PortSpec + Copy>(
|
||||||
client: &Client,
|
client: &Client,
|
||||||
names: Vec<String>,
|
names: Vec<String>,
|
||||||
spec: T,
|
spec: T,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use tek_core::midly::Smf;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
pub trait HasPhrases {
|
pub trait HasPhrases {
|
||||||
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>>;
|
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>>;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use tek_api::{JackActivate, ArrangerTracksApi, HasScenes};
|
use crate::*;
|
||||||
use tek_core::{*, clap::{self, Parser}};
|
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
ArrangerCli::parse().run()
|
ArrangerCli::parse().run()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use tek_api::JackActivate;
|
use crate::*;
|
||||||
use crate::{*, jack::{MidiIn, MidiOut}, clap::{self, Parser}};
|
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
SequencerCli::parse().run()
|
SequencerCli::parse().run()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use tek_api::JackActivate;
|
use crate::*;
|
||||||
use tek_core::{*, clap::{self, Parser}};
|
|
||||||
|
|
||||||
/// Application entrypoint.
|
/// Application entrypoint.
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
|
|
|
||||||
|
|
@ -67,16 +67,7 @@ impl<E: Engine, R: Render<E>> Render<E> for &R {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//impl<E: Engine> Render<E> for &dyn Render<E> {
|
impl<E: Engine> Render<E> for &dyn Render<E> {
|
||||||
//fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
|
||||||
//(*self).min_size(to)
|
|
||||||
//}
|
|
||||||
//fn render (&self, to: &mut E::Output) -> Usually<()> {
|
|
||||||
//(*self).render(to)
|
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
impl<E: Engine> Render<E> for &mut dyn Render<E> {
|
|
||||||
fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
||||||
(*self).min_size(to)
|
(*self).min_size(to)
|
||||||
}
|
}
|
||||||
|
|
@ -85,6 +76,15 @@ impl<E: Engine> Render<E> for &mut dyn Render<E> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//impl<E: Engine> Render<E> for &mut dyn Render<E> {
|
||||||
|
//fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
||||||
|
//(*self).min_size(to)
|
||||||
|
//}
|
||||||
|
//fn render (&self, to: &mut E::Output) -> Usually<()> {
|
||||||
|
//(*self).render(to)
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
|
||||||
impl<'a, E: Engine> Render<E> for Box<dyn Render<E> + 'a> {
|
impl<'a, E: Engine> Render<E> for Box<dyn Render<E> + 'a> {
|
||||||
fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
||||||
(**self).min_size(to)
|
(**self).min_size(to)
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,52 @@
|
||||||
pub(crate) use ratatui;
|
|
||||||
|
|
||||||
pub(crate) use jack;
|
|
||||||
pub(crate) use jack::{
|
|
||||||
Client, ProcessScope, Control, CycleTimes,
|
|
||||||
Port, MidiIn, MidiOut, AudioIn, AudioOut, Unowned,
|
|
||||||
Transport, TransportState, MidiIter, RawMidi
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) use midly;
|
|
||||||
pub(crate) use midly::{
|
|
||||||
*, live::LiveEvent, num::u7
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) use clap;
|
|
||||||
|
|
||||||
pub(crate) use std::sync::{Arc, Mutex, RwLock};
|
pub(crate) use std::sync::{Arc, Mutex, RwLock};
|
||||||
pub(crate) use std::sync::atomic::{Ordering, AtomicBool, AtomicUsize};
|
pub(crate) use std::sync::atomic::{Ordering, AtomicBool, AtomicUsize};
|
||||||
pub(crate) use std::collections::BTreeMap;
|
pub(crate) use std::collections::BTreeMap;
|
||||||
pub(crate) use std::marker::PhantomData;
|
pub(crate) use std::marker::PhantomData;
|
||||||
|
pub(crate) use std::thread::{spawn, JoinHandle};
|
||||||
|
pub(crate) use std::path::PathBuf;
|
||||||
|
pub(crate) use std::ffi::OsString;
|
||||||
|
pub(crate) use std::time::Duration;
|
||||||
|
pub(crate) use std::io::{Stdout, stdout};
|
||||||
pub(crate) use std::error::Error;
|
pub(crate) use std::error::Error;
|
||||||
|
|
||||||
|
pub(crate) use ratatui;
|
||||||
|
pub(crate) use ratatui::{
|
||||||
|
prelude::{Style, Color, Buffer},
|
||||||
|
style::{Stylize, Modifier},
|
||||||
|
backend::{Backend, CrosstermBackend, ClearType}
|
||||||
|
};
|
||||||
|
|
||||||
|
pub(crate) use jack;
|
||||||
|
pub(crate) use jack::{
|
||||||
|
Client, ProcessScope, Control, CycleTimes,
|
||||||
|
Port, PortSpec, MidiIn, MidiOut, AudioIn, AudioOut, Unowned,
|
||||||
|
Transport, TransportState, MidiIter, RawMidi,
|
||||||
|
contrib::ClosureProcessHandler,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub(crate) use midly;
|
||||||
|
pub(crate) use midly::{
|
||||||
|
Smf,
|
||||||
|
MidiMessage,
|
||||||
|
TrackEventKind,
|
||||||
|
live::LiveEvent,
|
||||||
|
num::u7
|
||||||
|
};
|
||||||
|
|
||||||
|
pub(crate) use palette::{
|
||||||
|
*,
|
||||||
|
convert::*,
|
||||||
|
okhsl::*
|
||||||
|
};
|
||||||
|
|
||||||
|
pub(crate) use clap;
|
||||||
|
|
||||||
pub(crate) use crossterm::{ExecutableCommand};
|
pub(crate) use crossterm::{ExecutableCommand};
|
||||||
pub(crate) use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen, enable_raw_mode, disable_raw_mode};
|
pub(crate) use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen, enable_raw_mode, disable_raw_mode};
|
||||||
pub(crate) use crossterm::event::{KeyCode, KeyModifiers, KeyEvent, KeyEventKind, KeyEventState};
|
pub(crate) use crossterm::event::{KeyCode, KeyModifiers, KeyEvent, KeyEventKind, KeyEventState};
|
||||||
pub(crate) use tek_core::midly::{num::u7, MidiMessage};
|
|
||||||
pub(crate) use std::sync::{Arc, RwLock};
|
|
||||||
pub(crate) use std::path::PathBuf;
|
|
||||||
pub(crate) use std::ffi::OsString;
|
|
||||||
pub(crate) use better_panic::{Settings, Verbosity};
|
pub(crate) use better_panic::{Settings, Verbosity};
|
||||||
pub(crate) use std::thread::{spawn, JoinHandle};
|
|
||||||
pub(crate) use std::time::Duration;
|
|
||||||
pub(crate) use ratatui::prelude::{Style, Color, Buffer};
|
|
||||||
pub(crate) use ratatui::style::{Stylize, Modifier};
|
|
||||||
pub(crate) use ratatui::backend::{Backend, CrosstermBackend, ClearType};
|
|
||||||
pub(crate) use std::io::{Stdout, stdout};
|
|
||||||
|
|
||||||
pub(crate) use atomic_float::*;
|
pub(crate) use atomic_float::*;
|
||||||
pub(crate) use palette::{*, convert::*, okhsl::*};
|
|
||||||
|
|
||||||
use std::ops::{Add, Sub, Mul, Div, Rem};
|
use std::ops::{Add, Sub, Mul, Div, Rem};
|
||||||
use std::cmp::{Ord, Eq, PartialEq};
|
use std::cmp::{Ord, Eq, PartialEq};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use tek_core::{*, clap::{self, Parser}};
|
use crate::*;
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
MixerCli::parse().run()
|
MixerCli::parse().run()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use tek_core::{*, clap::{self, Parser}};
|
use crate::*;
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
PluginCli::parse().run()
|
PluginCli::parse().run()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use tek_core::{*, clap::{self, Parser}};
|
use crate::*;
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
SamplerCli::parse().run()
|
SamplerCli::parse().run()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue