tek_tui -> tengri

This commit is contained in:
🪞👃🪞 2025-03-15 17:43:49 +02:00
parent 36f7c8bd48
commit 3d290a9beb
11 changed files with 150 additions and 41 deletions

109
Cargo.lock generated
View file

@ -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",
]

View file

@ -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. ██
//█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
//█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙█▙▙█▙▙▙██
//█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
//███████████████████████████████████████████████████
//█ ▀ ▀ ▀ █

View file

@ -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)); {

View file

@ -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 {

View file

@ -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}};

View file

@ -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" ]

View file

@ -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::*}};

View file

@ -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;

View file

@ -5,5 +5,5 @@ version = "0.2.0"
[dependencies]
tengri = { workspace = true }
tek_jack = { workspace = true }
atomic_float = { workspace = true }

View file

@ -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>>;

View file

@ -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);