diff --git a/Cargo.lock b/Cargo.lock index b5fb2a09..5d300edf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -303,7 +303,7 @@ dependencies = [ "bitflags 2.9.0", "crossterm_winapi", "mio", - "parking_lot", + "parking_lot 0.12.3", "rustix 0.38.44", "signal-hook", "signal-hook-mio", @@ -512,6 +512,15 @@ dependencies = [ "syn", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -626,6 +635,27 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "lilv" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e14c13e0d64ed27265d0cc41563b131cd8499cde811618b646dd309763906d" +dependencies = [ + "lilv-sys", + "lv2_raw", + "parking_lot 0.11.2", + "pkg-config", +] + +[[package]] +name = "lilv-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee56a6fdb8db62d01819f171d579c65fb0e03bcd077e1ea4509e06b6d58f53c" +dependencies = [ + "lv2_raw", +] + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -638,6 +668,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +[[package]] +name = "livi" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ea5b22748e1759210a4f78b4bc4b6a1cf02d6916c08c137bf704dd9f246306" +dependencies = [ + "lilv", + "log", + "lv2-sys", + "lv2_raw", + "ringbuf", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -663,6 +706,21 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lv2-sys" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd0f9e7de3649dcec348de51cbf611ab88688b97c0ce038f8c07b996b2a8e30" + +[[package]] +name = "lv2_raw" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573ce7231f64fe795ad80134913f88f2e7f7f550527f6bd54d690a56cabf6a48" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.7.4" @@ -748,6 +806,17 @@ dependencies = [ "syn", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.3" @@ -755,7 +824,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -766,7 +849,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.10", "smallvec", "windows-targets", ] @@ -993,6 +1076,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.5.10" @@ -1008,6 +1100,15 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "ringbuf" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79abed428d1fd2a128201cec72c5f6938e2da607c6f3745f769fabea399d950a" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "rustc-demangle" version = "0.1.24" @@ -1430,6 +1531,7 @@ dependencies = [ name = "tek_plugin" version = "0.2.0" dependencies = [ + "livi", "tek_jack", "tek_midi", "tek_time", @@ -1452,6 +1554,7 @@ dependencies = [ name = "tek_time" version = "0.2.0" dependencies = [ + "atomic_float", "tek_jack", "tengri", ] diff --git a/app/src/lib.rs b/app/src/lib.rs index 4370703c..f7d8947e 100644 --- a/app/src/lib.rs +++ b/app/src/lib.rs @@ -1,3 +1,10 @@ +// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ +//██Let me play the world's tiniest piano for you. ██ +//█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ +//█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙██ +//█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ +//███████████████████████████████████████████████████ +//█ ▀ ▀ ▀ █ #![allow(unused)] #![allow(clippy::unit_arg)] #![feature(adt_const_params)] @@ -22,18 +29,22 @@ pub use ::tek_jack::{self, *, jack::*}; pub use ::tek_midi::{self, *, midly::{MidiMessage, num::*, live::*}}; pub use ::tek_sampler::{self, *}; pub use ::tek_plugin::{self, *}; -pub use ::tek_tui::{ - *, tek_edn::*, tek_input::*, tek_output::*, - ratatui, ratatui::{prelude::{Color::{self, *}, Style, Stylize, Buffer, Modifier}, buffer::Cell}, - crossterm, crossterm::event::{ - Event, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers, KeyCode::{self, *}, +pub use ::tengri::{ + dsl::*, + input::*, + output::*, + tui::{ + *, + ratatui::{ + self, + prelude::{Color::{self, *}, Style, Stylize, Buffer, Modifier}, buffer::Cell + }, + crossterm::{ + self, + event::{ + Event, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers, KeyCode::{self, *}, + }, + }, }, }; pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicBool, Ordering::Relaxed}}; -// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ -//██Let me play the world's tiniest piano for you. ██ -//█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ -//█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙██ -//█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ -//███████████████████████████████████████████████████ -//█ ▀ ▀ ▀ █ diff --git a/app/src/view.rs b/app/src/view.rs index a53bb255..fb118ce9 100644 --- a/app/src/view.rs +++ b/app/src/view.rs @@ -12,7 +12,7 @@ mod view_input; pub use self::view_input::*; mod view_output; pub use self::view_output::*; mod view_layout; pub use self::view_layout::*; pub(crate) use std::fmt::Write; -pub(crate) use ::tek_tui::ratatui::prelude::Position; +pub(crate) use ::tengri::tui::ratatui::prelude::Position; pub(crate) trait ScenesColors<'a> = Iterator<Item=SceneWithColor<'a>>; pub(crate) type SceneWithColor<'a> = (usize, &'a Scene, usize, usize, Option<ItemPalette>); view!(TuiOut: |self: Tek| self.size.of(View(self, self.view)); { diff --git a/midi/examples/midi-import.rs b/midi/examples/midi-import.rs index 72cea99f..f27beb2b 100644 --- a/midi/examples/midi-import.rs +++ b/midi/examples/midi-import.rs @@ -1,5 +1,5 @@ use tek_midi::*; -use tek_tui::tek_input::*; +use tengri::input::*; use std::sync::*; struct ExampleClips(Arc<RwLock<Vec<Arc<RwLock<MidiClip>>>>>); impl HasClips for ExampleClips { diff --git a/midi/src/lib.rs b/midi/src/lib.rs index dc109783..8954960a 100644 --- a/midi/src/lib.rs +++ b/midi/src/lib.rs @@ -14,12 +14,14 @@ mod piano_v; pub use self::piano_v::*; pub(crate) use ::tek_time::*; pub(crate) use ::tek_jack::{*, jack::*}; -pub(crate) use ::tek_tui::{ - *, - tek_input::*, - tek_output::*, - tek_edn::*, - ratatui::style::{Style, Stylize, Color} +pub(crate) use ::tengri::{ + input::*, + output::*, + dsl::*, + tui::{ + *, + ratatui::style::{Style, Stylize, Color} + } }; pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicUsize, AtomicBool, Ordering::Relaxed}}; diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml index 6865e0e0..8405940e 100644 --- a/plugin/Cargo.toml +++ b/plugin/Cargo.toml @@ -9,3 +9,9 @@ tengri = { workspace = true } tek_jack = { workspace = true } tek_time = { workspace = true } tek_midi = { workspace = true } + +livi = { workspace = true, optional = true } + +[features] +default = [ "lv2" ] +lv2 = [ "livi" ] diff --git a/plugin/src/lib.rs b/plugin/src/lib.rs index 2dae9c2d..40825854 100644 --- a/plugin/src/lib.rs +++ b/plugin/src/lib.rs @@ -5,11 +5,4 @@ pub(crate) use std::fmt::{Debug, Formatter}; pub(crate) use std::sync::{Arc, RwLock}; pub(crate) use std::thread::JoinHandle; pub(crate) use ::tek_jack::{*, jack::*}; -pub(crate) use ::tek_tui::{ - *, - tek_output::*, - //tek_input::*, - //tek_edn::*, - ratatui::prelude::*, - //crossterm::event::*, -}; +pub(crate) use ::tengri::{output::*, tui::{*, ratatui::prelude::*}}; diff --git a/sampler/src/lib.rs b/sampler/src/lib.rs index 2d69a917..797a2d08 100644 --- a/sampler/src/lib.rs +++ b/sampler/src/lib.rs @@ -3,12 +3,7 @@ mod sampler; pub use self::sampler::*; pub(crate) use ::tek_jack::{*, jack::*}; pub(crate) use ::tek_midi::{*, midly::{*, live::*, num::*}}; -pub(crate) use ::tek_tui::*; -pub(crate) use ::tek_tui::tek_output::*; -pub(crate) use ::tek_tui::tek_input::*; -pub(crate) use ::tek_tui::tek_edn::*; -pub(crate) use ::tek_tui::ratatui::prelude::*; -//pub(crate) use ::tek_tui::crossterm::event::*; +pub(crate) use ::tengri::{dsl::*, input::*, output::*, tui::{*, ratatui::prelude::*}}; pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicUsize, Ordering::Relaxed}}; pub(crate) use std::fs::File; pub(crate) use std::path::PathBuf; diff --git a/time/Cargo.toml b/time/Cargo.toml index 8bbac671..3ff04e1c 100644 --- a/time/Cargo.toml +++ b/time/Cargo.toml @@ -5,5 +5,5 @@ version = "0.2.0" [dependencies] tengri = { workspace = true } - tek_jack = { workspace = true } +atomic_float = { workspace = true } diff --git a/time/src/lib.rs b/time/src/lib.rs index 405d9063..281b0419 100644 --- a/time/src/lib.rs +++ b/time/src/lib.rs @@ -12,9 +12,8 @@ mod unit; pub use self::unit::*; pub(crate) use ::tek_jack::{*, jack::{*, contrib::*}}; pub(crate) use std::sync::{Arc, RwLock, atomic::{AtomicBool, AtomicUsize, Ordering::*}}; pub(crate) use std::ops::{Add, Sub, Mul, Div, Rem}; +pub(crate) use ::tengri::{input::*, dsl::*}; pub use ::atomic_float; pub(crate) use atomic_float::*; -pub(crate) use ::tek_edn::*; -pub(crate) use ::tek_input::*; /// Standard result type. pub(crate) type Usually<T> = Result<T, Box<dyn std::error::Error>>; diff --git a/time/src/perf.rs b/time/src/perf.rs index 58f40689..c435fdff 100644 --- a/time/src/perf.rs +++ b/time/src/perf.rs @@ -1,5 +1,5 @@ use crate::*; -use tek_tui::PerfModel; +use tengri::tui::PerfModel; pub trait JackPerfModel { fn update_from_jack_scope (&self, t0: Option<u64>, scope: &ProcessScope);