mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 03:36:41 +01:00
wip: refactor into fewer crates
This commit is contained in:
parent
c367a0444e
commit
77703d83a5
105 changed files with 64 additions and 131 deletions
47
Cargo.lock
generated
47
Cargo.lock
generated
|
|
@ -1518,11 +1518,8 @@ dependencies = [
|
|||
"proptest",
|
||||
"proptest-derive",
|
||||
"rand",
|
||||
"tek_jack",
|
||||
"tek_midi",
|
||||
"tek_plugin",
|
||||
"tek_sampler",
|
||||
"tek_time",
|
||||
"tek_device",
|
||||
"tek_engine",
|
||||
"tengri",
|
||||
"toml",
|
||||
]
|
||||
|
|
@ -1536,53 +1533,25 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "tek_jack"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"jack",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tek_midi"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"midly",
|
||||
"tek_jack",
|
||||
"tek_time",
|
||||
"tengri",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tek_plugin"
|
||||
name = "tek_device"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"livi",
|
||||
"tek_jack",
|
||||
"tek_midi",
|
||||
"tek_time",
|
||||
"tengri",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tek_sampler"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"symphonia",
|
||||
"tek_jack",
|
||||
"tek_midi",
|
||||
"tek_time",
|
||||
"tek_engine",
|
||||
"tengri",
|
||||
"wavers",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tek_time"
|
||||
name = "tek_engine"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"atomic_float",
|
||||
"tek_jack",
|
||||
"jack",
|
||||
"midly",
|
||||
"tengri",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
18
Cargo.toml
18
Cargo.toml
|
|
@ -5,13 +5,10 @@ version = "0.2.1"
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"./crates/engine",
|
||||
"./crates/device",
|
||||
"./crates/app",
|
||||
"./crates/cli",
|
||||
"./crates/jack",
|
||||
"./crates/midi",
|
||||
"./crates/plugin",
|
||||
"./crates/sampler",
|
||||
"./crates/time"
|
||||
]
|
||||
exclude = [
|
||||
"./deps/tengri"
|
||||
|
|
@ -37,13 +34,10 @@ path = "./deps/rust-jack"
|
|||
#default-features = false
|
||||
|
||||
[workspace.dependencies]
|
||||
tek = { path = "./crates/app" }
|
||||
tek_cli = { path = "./crates/cli" }
|
||||
tek_jack = { path = "./crates/jack" }
|
||||
tek_midi = { path = "./crates/midi" }
|
||||
tek_plugin = { path = "./crates/plugin", default-features = false }
|
||||
tek_sampler = { path = "./crates/sampler" }
|
||||
tek_time = { path = "./crates/time" }
|
||||
tek_device = { path = "./crates/device" }
|
||||
tek_engine = { path = "./crates/engine" }
|
||||
tek = { path = "./crates/app" }
|
||||
tek_cli = { path = "./crates/cli" }
|
||||
|
||||
atomic_float = { version = "1.0.0" }
|
||||
backtrace = { version = "0.3.72" }
|
||||
|
|
|
|||
|
|
@ -6,11 +6,8 @@ version = { workspace = true }
|
|||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
|
||||
tek_jack = { workspace = true }
|
||||
tek_time = { workspace = true }
|
||||
tek_midi = { workspace = true }
|
||||
tek_sampler = { workspace = true }
|
||||
tek_plugin = { workspace = true, optional = true }
|
||||
tek_engine = { workspace = true }
|
||||
tek_device = { workspace = true }
|
||||
|
||||
backtrace = { workspace = true }
|
||||
clap = { workspace = true, optional = true }
|
||||
|
|
@ -25,4 +22,4 @@ proptest-derive = { workspace = true }
|
|||
[features]
|
||||
default = ["cli"]
|
||||
cli = ["clap"]
|
||||
host = ["tek_plugin"]
|
||||
host = ["tek_device/lv2"]
|
||||
|
|
|
|||
|
|
@ -382,20 +382,25 @@ impl<'a> ArrangerView<'a> {
|
|||
}
|
||||
|
||||
fn output_froms (&'a self) -> impl Content<TuiOut> + 'a {
|
||||
Tryptich::top(2)
|
||||
.left(self.width_side, Align::ne("Next clip:"))
|
||||
.middle(self.width_mid, per_track_top(
|
||||
self.width_mid,
|
||||
||self.tracks_with_sizes_scrolled(),
|
||||
|t, track|Either(
|
||||
track.player.next_clip.is_some(),
|
||||
Thunk::new(||Tui::bg(Reset, format!("{:?}",
|
||||
track.player.next_clip.as_ref()
|
||||
.map(|(moment, clip)|clip.as_ref()
|
||||
.map(|clip|clip.read().unwrap().name.clone()))
|
||||
.flatten().as_ref()))),
|
||||
Thunk::new(||Tui::bg(Reset, " ------ "))
|
||||
)))
|
||||
let label = Align::ne("Next clip:");
|
||||
Tryptich::top(2).left(self.width_side, label).middle(self.width_mid, per_track_top(
|
||||
self.width_mid, ||self.tracks_with_sizes_scrolled(), |t, track|{
|
||||
let queued = track.player.next_clip.is_some();
|
||||
let queued_blank = Thunk::new(||Tui::bg(Reset, " ------ "));
|
||||
let queued_clip = Thunk::new(||{
|
||||
let title = if let Some((_, clip)) = track.player.next_clip.as_ref() {
|
||||
if let Some(clip) = clip {
|
||||
clip.read().unwrap().name.as_ref().clone()
|
||||
} else {
|
||||
"Stop"
|
||||
}
|
||||
} else {
|
||||
""
|
||||
};
|
||||
Tui::bg(Reset, title)
|
||||
});
|
||||
Either(queued, queued_clip, queued_blank)
|
||||
}))
|
||||
}
|
||||
|
||||
fn output_ports (&'a self) -> impl Content<TuiOut> + 'a {
|
||||
|
|
|
|||
17
crates/device/Cargo.toml
Normal file
17
crates/device/Cargo.toml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[package]
|
||||
name = "tek_device"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
tek_engine = { workspace = true }
|
||||
livi = { workspace = true, optional = true }
|
||||
symphonia = { workspace = true, optional = true }
|
||||
wavers = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
default = [ "sequencer", "sampler" ]
|
||||
lv2 = [ "livi" ]
|
||||
sampler = [ "symphonia", "wavers" ]
|
||||
sequencer = []
|
||||
0
crates/device/src/lib.rs
Normal file
0
crates/device/src/lib.rs
Normal file
11
crates/engine/Cargo.toml
Normal file
11
crates/engine/Cargo.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "tek_engine"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
jack = { workspace = true }
|
||||
midly = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
atomic_float = { workspace = true }
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[package]
|
||||
name = "tek_jack"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
jack = { workspace = true }
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[package]
|
||||
name = "tek_midi"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
|
||||
tek_jack = { workspace = true }
|
||||
tek_time = { workspace = true }
|
||||
|
||||
midly = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[package]
|
||||
name = "tek_plugin"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
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" ]
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[package]
|
||||
name = "tek_sampler"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
|
||||
tek_jack = { workspace = true }
|
||||
tek_time = { workspace = true }
|
||||
tek_midi = { workspace = true }
|
||||
|
||||
symphonia = { workspace = true }
|
||||
wavers = { workspace = true }
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[package]
|
||||
name = "tek_time"
|
||||
edition = { workspace = true }
|
||||
version = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
tengri = { workspace = true }
|
||||
tek_jack = { workspace = true }
|
||||
atomic_float = { workspace = true }
|
||||
0
crates/plugin/vst/LICENSE → deps/vst/LICENSE
vendored
0
crates/plugin/vst/LICENSE → deps/vst/LICENSE
vendored
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue