mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46: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",
|
||||||
"proptest-derive",
|
"proptest-derive",
|
||||||
"rand",
|
"rand",
|
||||||
"tek_jack",
|
"tek_device",
|
||||||
"tek_midi",
|
"tek_engine",
|
||||||
"tek_plugin",
|
|
||||||
"tek_sampler",
|
|
||||||
"tek_time",
|
|
||||||
"tengri",
|
"tengri",
|
||||||
"toml",
|
"toml",
|
||||||
]
|
]
|
||||||
|
|
@ -1536,53 +1533,25 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tek_jack"
|
name = "tek_device"
|
||||||
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"
|
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"livi",
|
"livi",
|
||||||
"tek_jack",
|
|
||||||
"tek_midi",
|
|
||||||
"tek_time",
|
|
||||||
"tengri",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tek_sampler"
|
|
||||||
version = "0.2.1"
|
|
||||||
dependencies = [
|
|
||||||
"symphonia",
|
"symphonia",
|
||||||
"tek_jack",
|
"tek_engine",
|
||||||
"tek_midi",
|
|
||||||
"tek_time",
|
|
||||||
"tengri",
|
"tengri",
|
||||||
"wavers",
|
"wavers",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tek_time"
|
name = "tek_engine"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic_float",
|
"atomic_float",
|
||||||
"tek_jack",
|
"jack",
|
||||||
|
"midly",
|
||||||
"tengri",
|
"tengri",
|
||||||
|
"uuid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
18
Cargo.toml
18
Cargo.toml
|
|
@ -5,13 +5,10 @@ version = "0.2.1"
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
|
"./crates/engine",
|
||||||
|
"./crates/device",
|
||||||
"./crates/app",
|
"./crates/app",
|
||||||
"./crates/cli",
|
"./crates/cli",
|
||||||
"./crates/jack",
|
|
||||||
"./crates/midi",
|
|
||||||
"./crates/plugin",
|
|
||||||
"./crates/sampler",
|
|
||||||
"./crates/time"
|
|
||||||
]
|
]
|
||||||
exclude = [
|
exclude = [
|
||||||
"./deps/tengri"
|
"./deps/tengri"
|
||||||
|
|
@ -37,13 +34,10 @@ path = "./deps/rust-jack"
|
||||||
#default-features = false
|
#default-features = false
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
tek = { path = "./crates/app" }
|
tek_device = { path = "./crates/device" }
|
||||||
tek_cli = { path = "./crates/cli" }
|
tek_engine = { path = "./crates/engine" }
|
||||||
tek_jack = { path = "./crates/jack" }
|
tek = { path = "./crates/app" }
|
||||||
tek_midi = { path = "./crates/midi" }
|
tek_cli = { path = "./crates/cli" }
|
||||||
tek_plugin = { path = "./crates/plugin", default-features = false }
|
|
||||||
tek_sampler = { path = "./crates/sampler" }
|
|
||||||
tek_time = { path = "./crates/time" }
|
|
||||||
|
|
||||||
atomic_float = { version = "1.0.0" }
|
atomic_float = { version = "1.0.0" }
|
||||||
backtrace = { version = "0.3.72" }
|
backtrace = { version = "0.3.72" }
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,8 @@ version = { workspace = true }
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tengri = { workspace = true }
|
tengri = { workspace = true }
|
||||||
|
|
||||||
tek_jack = { workspace = true }
|
tek_engine = { workspace = true }
|
||||||
tek_time = { workspace = true }
|
tek_device = { workspace = true }
|
||||||
tek_midi = { workspace = true }
|
|
||||||
tek_sampler = { workspace = true }
|
|
||||||
tek_plugin = { workspace = true, optional = true }
|
|
||||||
|
|
||||||
backtrace = { workspace = true }
|
backtrace = { workspace = true }
|
||||||
clap = { workspace = true, optional = true }
|
clap = { workspace = true, optional = true }
|
||||||
|
|
@ -25,4 +22,4 @@ proptest-derive = { workspace = true }
|
||||||
[features]
|
[features]
|
||||||
default = ["cli"]
|
default = ["cli"]
|
||||||
cli = ["clap"]
|
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 {
|
fn output_froms (&'a self) -> impl Content<TuiOut> + 'a {
|
||||||
Tryptich::top(2)
|
let label = Align::ne("Next clip:");
|
||||||
.left(self.width_side, Align::ne("Next clip:"))
|
Tryptich::top(2).left(self.width_side, label).middle(self.width_mid, per_track_top(
|
||||||
.middle(self.width_mid, per_track_top(
|
self.width_mid, ||self.tracks_with_sizes_scrolled(), |t, track|{
|
||||||
self.width_mid,
|
let queued = track.player.next_clip.is_some();
|
||||||
||self.tracks_with_sizes_scrolled(),
|
let queued_blank = Thunk::new(||Tui::bg(Reset, " ------ "));
|
||||||
|t, track|Either(
|
let queued_clip = Thunk::new(||{
|
||||||
track.player.next_clip.is_some(),
|
let title = if let Some((_, clip)) = track.player.next_clip.as_ref() {
|
||||||
Thunk::new(||Tui::bg(Reset, format!("{:?}",
|
if let Some(clip) = clip {
|
||||||
track.player.next_clip.as_ref()
|
clip.read().unwrap().name.as_ref().clone()
|
||||||
.map(|(moment, clip)|clip.as_ref()
|
} else {
|
||||||
.map(|clip|clip.read().unwrap().name.clone()))
|
"Stop"
|
||||||
.flatten().as_ref()))),
|
}
|
||||||
Thunk::new(||Tui::bg(Reset, " ------ "))
|
} else {
|
||||||
)))
|
""
|
||||||
|
};
|
||||||
|
Tui::bg(Reset, title)
|
||||||
|
});
|
||||||
|
Either(queued, queued_clip, queued_blank)
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn output_ports (&'a self) -> impl Content<TuiOut> + 'a {
|
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