Compare commits

..

3 commits

Author SHA1 Message Date
okay stopped screaming
cb989baf83 remove workspace
Some checks failed
/ build (push) Has been cancelled
2026-02-21 20:58:10 +02:00
stop screaming
236ee6b810 view* -> understand* 2026-02-21 18:48:53 +02:00
stop screaming
4aef21f60d closer and closer to testing it away 2026-02-21 18:13:36 +02:00
13 changed files with 2457 additions and 2312 deletions

580
Cargo.lock generated
View file

@ -140,9 +140,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.101" version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]] [[package]]
name = "approx" name = "approx"
@ -171,6 +171,29 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
[[package]]
name = "atk"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"
dependencies = [
"atk-sys",
"glib",
"libc",
]
[[package]]
name = "atk-sys"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
]
[[package]] [[package]]
name = "atomic-waker" name = "atomic-waker"
version = "1.1.2" version = "1.1.2"
@ -296,6 +319,31 @@ version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "cairo-rs"
version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
dependencies = [
"bitflags 2.11.0",
"cairo-sys-rs",
"glib",
"libc",
"once_cell",
"thiserror 1.0.69",
]
[[package]]
name = "cairo-sys-rs"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
dependencies = [
"glib-sys",
"libc",
"system-deps",
]
[[package]] [[package]]
name = "calloop" name = "calloop"
version = "0.13.0" version = "0.13.0"
@ -355,6 +403,16 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-expr"
version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
dependencies = [
"smallvec",
"target-lexicon",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "1.0.4" version = "1.0.4"
@ -395,10 +453,10 @@ version = "4.5.55"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
dependencies = [ dependencies = [
"heck", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -476,7 +534,7 @@ checksum = "eb0240417fe20ccf13397fa25e6f0a987dbbfaf27d9e13532419df7f593e65e8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
"unicode-xid", "unicode-xid",
] ]
@ -529,15 +587,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "crossbeam-channel"
version = "0.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
dependencies = [
"crossbeam-utils",
]
[[package]] [[package]]
name = "crossbeam-deque" name = "crossbeam-deque"
version = "0.8.6" version = "0.8.6"
@ -606,16 +655,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "ctor"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
dependencies = [
"quote",
"syn 2.0.116",
]
[[package]] [[package]]
name = "cursor-icon" name = "cursor-icon"
version = "1.2.0" version = "1.2.0"
@ -642,7 +681,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -653,7 +692,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -675,7 +714,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"rustc_version", "rustc_version",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -779,6 +818,16 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "field-offset"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
dependencies = [
"memoffset",
"rustc_version",
]
[[package]] [[package]]
name = "find-msvc-tools" name = "find-msvc-tools"
version = "0.1.9" version = "0.1.9"
@ -815,7 +864,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -880,7 +929,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -912,6 +961,64 @@ dependencies = [
"slab", "slab",
] ]
[[package]]
name = "gdk"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"
dependencies = [
"cairo-rs",
"gdk-pixbuf",
"gdk-sys",
"gio",
"glib",
"libc",
"pango",
]
[[package]]
name = "gdk-pixbuf"
version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
dependencies = [
"gdk-pixbuf-sys",
"gio",
"glib",
"libc",
"once_cell",
]
[[package]]
name = "gdk-pixbuf-sys"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
dependencies = [
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
]
[[package]]
name = "gdk-sys"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"pango-sys",
"pkg-config",
"system-deps",
]
[[package]] [[package]]
name = "gethostname" name = "gethostname"
version = "1.1.0" version = "1.1.0"
@ -964,6 +1071,148 @@ version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
[[package]]
name = "gio"
version = "0.18.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-util",
"gio-sys",
"glib",
"libc",
"once_cell",
"pin-project-lite",
"smallvec",
"thiserror 1.0.69",
]
[[package]]
name = "gio-sys"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"winapi",
]
[[package]]
name = "glib"
version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
dependencies = [
"bitflags 2.11.0",
"futures-channel",
"futures-core",
"futures-executor",
"futures-task",
"futures-util",
"gio-sys",
"glib-macros",
"glib-sys",
"gobject-sys",
"libc",
"memchr",
"once_cell",
"smallvec",
"thiserror 1.0.69",
]
[[package]]
name = "glib-macros"
version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
dependencies = [
"heck 0.4.1",
"proc-macro-crate 2.0.2",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "glib-sys"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
dependencies = [
"libc",
"system-deps",
]
[[package]]
name = "gobject-sys"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
dependencies = [
"glib-sys",
"libc",
"system-deps",
]
[[package]]
name = "gtk"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"
dependencies = [
"atk",
"cairo-rs",
"field-offset",
"futures-channel",
"gdk",
"gdk-pixbuf",
"gio",
"glib",
"gtk-sys",
"gtk3-macros",
"libc",
"pango",
"pkg-config",
]
[[package]]
name = "gtk-sys"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"
dependencies = [
"atk-sys",
"cairo-sys-rs",
"gdk-pixbuf-sys",
"gdk-sys",
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"pango-sys",
"system-deps",
]
[[package]]
name = "gtk3-macros"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"
dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]] [[package]]
name = "hashbrown" name = "hashbrown"
version = "0.15.5" version = "0.15.5"
@ -981,6 +1230,12 @@ version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]] [[package]]
name = "heck" name = "heck"
version = "0.5.0" version = "0.5.0"
@ -1046,7 +1301,7 @@ dependencies = [
"indoc", "indoc",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -1092,10 +1347,7 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
name = "jack" name = "jack"
version = "0.13.0" version = "0.13.0"
dependencies = [ dependencies = [
"approx",
"bitflags 2.11.0", "bitflags 2.11.0",
"crossbeam-channel",
"ctor",
"jack-sys", "jack-sys",
"lazy_static", "lazy_static",
"libc", "libc",
@ -1148,9 +1400,9 @@ dependencies = [
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.85" version = "0.3.87"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" checksum = "93f0862381daaec758576dcc22eb7bbf4d7efd67328553f3b45a412a51a3fb21"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"wasm-bindgen", "wasm-bindgen",
@ -1328,6 +1580,15 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "memoffset"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "midly" name = "midly"
version = "0.5.3" version = "0.5.3"
@ -1413,10 +1674,10 @@ version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate 3.4.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -1684,7 +1945,32 @@ dependencies = [
"by_address", "by_address",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
]
[[package]]
name = "pango"
version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
dependencies = [
"gio",
"glib",
"libc",
"once_cell",
"pango-sys",
]
[[package]]
name = "pango-sys"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
] ]
[[package]] [[package]]
@ -1777,7 +2063,7 @@ dependencies = [
"phf_shared", "phf_shared",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -1806,7 +2092,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -1851,7 +2137,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"syn 2.0.116", "syn 2.0.117",
]
[[package]]
name = "proc-macro-crate"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
"toml_edit 0.19.15",
]
[[package]]
name = "proc-macro-crate"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
dependencies = [
"toml_datetime 0.6.3",
"toml_edit 0.20.2",
] ]
[[package]] [[package]]
@ -1860,7 +2166,31 @@ version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983"
dependencies = [ dependencies = [
"toml_edit", "toml_edit 0.23.10+spec-1.0.0",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn 1.0.109",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2",
"quote",
"version_check",
] ]
[[package]] [[package]]
@ -1899,7 +2229,7 @@ checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -2253,7 +2583,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -2269,6 +2599,15 @@ dependencies = [
"zmij", "zmij",
] ]
[[package]]
name = "serde_spanned"
version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "serde_spanned" name = "serde_spanned"
version = "1.0.4" version = "1.0.4"
@ -2400,11 +2739,11 @@ version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [ dependencies = [
"heck", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"rustversion", "rustversion",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -2615,15 +2954,34 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.116" version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb" checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "system-deps"
version = "6.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
dependencies = [
"cfg-expr",
"heck 0.5.0",
"pkg-config",
"toml 0.8.2",
"version-compare",
]
[[package]]
name = "target-lexicon"
version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]] [[package]]
name = "tek" name = "tek"
version = "0.3.0" version = "0.3.0"
@ -2632,7 +2990,10 @@ dependencies = [
"atomic_float", "atomic_float",
"backtrace", "backtrace",
"builder-pattern", "builder-pattern",
"bumpalo",
"clap", "clap",
"dizzle",
"gtk",
"jack", "jack",
"konst", "konst",
"livi", "livi",
@ -2640,10 +3001,12 @@ dependencies = [
"palette", "palette",
"proptest", "proptest",
"proptest-derive", "proptest-derive",
"quanta",
"rand 0.8.5", "rand 0.8.5",
"symphonia", "symphonia",
"tek",
"tengri", "tengri",
"toml", "toml 0.9.12+spec-1.1.0",
"uuid", "uuid",
"wavers", "wavers",
"winit", "winit",
@ -2665,16 +3028,21 @@ dependencies = [
[[package]] [[package]]
name = "tengri" name = "tengri"
version = "0.14.0" version = "0.15.0"
dependencies = [ dependencies = [
"anyhow",
"atomic_float", "atomic_float",
"better-panic", "better-panic",
"crossterm 0.29.0", "crossterm 0.29.0",
"dizzle", "dizzle",
"heck 0.5.0",
"palette", "palette",
"proc-macro2",
"quanta", "quanta",
"quote",
"rand 0.8.5", "rand 0.8.5",
"ratatui", "ratatui",
"syn 2.0.117",
"unicode-width 0.2.0", "unicode-width 0.2.0",
] ]
@ -2704,7 +3072,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -2715,7 +3083,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]
@ -2743,6 +3111,18 @@ dependencies = [
"strict-num", "strict-num",
] ]
[[package]]
name = "toml"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
dependencies = [
"serde",
"serde_spanned 0.6.9",
"toml_datetime 0.6.3",
"toml_edit 0.20.2",
]
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.9.12+spec-1.1.0" version = "0.9.12+spec-1.1.0"
@ -2751,11 +3131,20 @@ checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"serde_core", "serde_core",
"serde_spanned", "serde_spanned 1.0.4",
"toml_datetime", "toml_datetime 0.7.5+spec-1.1.0",
"toml_parser", "toml_parser",
"toml_writer", "toml_writer",
"winnow", "winnow 0.7.14",
]
[[package]]
name = "toml_datetime"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
dependencies = [
"serde",
] ]
[[package]] [[package]]
@ -2767,6 +3156,30 @@ dependencies = [
"serde_core", "serde_core",
] ]
[[package]]
name = "toml_edit"
version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
"indexmap",
"toml_datetime 0.6.3",
"winnow 0.5.40",
]
[[package]]
name = "toml_edit"
version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
dependencies = [
"indexmap",
"serde",
"serde_spanned 0.6.9",
"toml_datetime 0.6.3",
"winnow 0.5.40",
]
[[package]] [[package]]
name = "toml_edit" name = "toml_edit"
version = "0.23.10+spec-1.0.0" version = "0.23.10+spec-1.0.0"
@ -2774,9 +3187,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"toml_datetime", "toml_datetime 0.7.5+spec-1.1.0",
"toml_parser", "toml_parser",
"winnow", "winnow 0.7.14",
] ]
[[package]] [[package]]
@ -2785,7 +3198,7 @@ version = "1.0.9+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
dependencies = [ dependencies = [
"winnow", "winnow 0.7.14",
] ]
[[package]] [[package]]
@ -2895,6 +3308,12 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "version-compare"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.5" version = "0.9.5"
@ -2946,9 +3365,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.108" version = "0.2.110"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" checksum = "1de241cdc66a9d91bd84f097039eb140cdc6eec47e0cdbaf9d932a1dd6c35866"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"once_cell", "once_cell",
@ -2959,9 +3378,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-futures" name = "wasm-bindgen-futures"
version = "0.4.58" version = "0.4.60"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" checksum = "a42e96ea38f49b191e08a1bab66c7ffdba24b06f9995b39a9dd60222e5b6f1da"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"futures-util", "futures-util",
@ -2973,9 +3392,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.108" version = "0.2.110"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" checksum = "e12fdf6649048f2e3de6d7d5ff3ced779cdedee0e0baffd7dff5cdfa3abc8a52"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@ -2983,22 +3402,22 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.108" version = "0.2.110"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" checksum = "0e63d1795c565ac3462334c1e396fd46dbf481c40f51f5072c310717bc4fb309"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.108" version = "0.2.110"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" checksum = "e9f9cdac23a5ce71f6bf9f8824898a501e511892791ea2a0c6b8568c68b9cb53"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -3161,9 +3580,9 @@ dependencies = [
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.85" version = "0.3.87"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" checksum = "f2c7c5718134e770ee62af3b6b4a84518ec10101aad610c024b64d6ff29bb1ff"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",
@ -3425,6 +3844,15 @@ dependencies = [
"xkbcommon-dl", "xkbcommon-dl",
] ]
[[package]]
name = "winnow"
version = "0.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.7.14" version = "0.7.14"
@ -3450,7 +3878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"heck", "heck 0.5.0",
"wit-parser", "wit-parser",
] ]
@ -3461,10 +3889,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"heck", "heck 0.5.0",
"indexmap", "indexmap",
"prettyplease", "prettyplease",
"syn 2.0.116", "syn 2.0.117",
"wasm-metadata", "wasm-metadata",
"wit-bindgen-core", "wit-bindgen-core",
"wit-component", "wit-component",
@ -3480,7 +3908,7 @@ dependencies = [
"prettyplease", "prettyplease",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
"wit-bindgen-core", "wit-bindgen-core",
"wit-bindgen-rust", "wit-bindgen-rust",
] ]
@ -3602,7 +4030,7 @@ checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.116", "syn 2.0.117",
] ]
[[package]] [[package]]

View file

@ -1,53 +1,84 @@
[workspace] [package]
resolver = "2" name = "tek"
members = [ "./app" ]
exclude = [ "./tengri", "./dizzle" ]
[workspace.package]
edition = "2024" edition = "2024"
version = "0.3.0" version = "0.3.0"
[lib]
path = "app/tek.rs"
[[bin]]
name = "tek"
path = "app/tek.rs"
[target.'cfg(target_os = "linux")']
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
[dependencies]
tengri = { path = "./tengri", features = [ "tui", "dsl" ] }
dizzle = { path = "./dizzle" }
jack = { path = "./rust-jack" }
ansi_term = { version = "0.12.1" }
atomic_float = { version = "1.0.0" }
backtrace = { version = "0.3.72" }
builder-pattern = { version = "0.4.2" }
bumpalo = { version = "3.19.0" }
konst = { version = "0.3.16", features = [ "rust_1_83" ] }
midly = { version = "0.5" }
palette = { version = "0.7.6", features = [ "random" ] }
quanta = { version = "0.12.3" }
rand = { version = "0.8.5" }
toml = { version = "0.9.2" }
xdg = { version = "3.0.0" }
clap = { optional = true, version = "4.5.4", features = [ "derive" ]}
livi = { optional = true, version = "0.7.4" }
symphonia = { optional = true, version = "0.5.4", features = [ "all" ] }
winit = { optional = true, version = "0.30.4", features = [ "x11" ]}
wavers = { optional = true, version = "1.4.3" }
uuid = { optional = true, version = "1.10.0", features = [ "v4" ] }
gtk = { optional = true, version = "0.18.1" }
#once_cell = "1.19.0"
#no_deadlocks = "1.3.2"
#suil-rs = { path = "../suil" }
#vst = "0.4.0"
#vst3 = "0.1.0"
[dev-dependencies]
tek = { path = "." }
proptest = { version = "^1" }
proptest-derive = { version = "^0.5.1" }
[features]
default = ["cli", "arranger", "sampler"]
arranger = ["port", "editor", "sequencer", "track", "scene", "clip", "select"]
browse = []
clap = []
cli = ["dep:clap"]
clip = []
clock = []
editor = []
host = ["lv2"]
lv2 = ["port", "livi"]
lv2_gui = ["lv2", "winit"]
meter = []
mixer = []
pool = []
port = []
sampler = ["port", "meter", "mixer", "browse", "symphonia", "wavers"]
scene = []
select = []
sequencer = ["port", "clock", "uuid", "pool"]
sf2 = []
track = []
vst2 = []
vst3 = []
[profile.release] [profile.release]
lto = true lto = true
[profile.coverage] [profile.coverage]
inherits = "test" inherits = "test"
lto = false lto = false
[workspace.dependencies.tengri]
path = "./tengri/tengri"
features = [ "tui", "dsl" ]
[workspace.dependencies.tengri_proc]
path = "./tengri/proc"
[workspace.dependencies.jack]
path = "./rust-jack"
[workspace.dependencies]
tek = { path = "./tek" }
atomic_float = { version = "1.0.0" }
backtrace = { version = "0.3.72" }
bumpalo = { version = "3.19.0" }
clap = { version = "4.5.4", features = [ "derive" ] }
gtk = { version = "0.18.1" }
konst = { version = "0.3.16", features = [ "rust_1_83" ] }
livi = { version = "0.7.4" }
midly = { version = "0.5" }
palette = { version = "0.7.6", features = [ "random" ] }
quanta = { version = "0.12.3" }
rand = { version = "0.8.5" }
symphonia = { version = "0.5.4", features = [ "all" ] }
toml = { version = "0.9.2" }
uuid = { version = "1.10.0", features = [ "v4" ] }
wavers = { version = "1.4.3" }
winit = { version = "0.30.4", features = [ "x11" ] }
xdg = { version = "3.0.0" }
#once_cell = "1.19.0"
#no_deadlocks = "1.3.2"
#suil-rs = { path = "../suil" }
#vst = "0.4.0"
#vst3 = "0.1.0"
proptest = { version = "^1" }
proptest-derive = { version = "^0.5.1" }

View file

@ -13,8 +13,8 @@ bacon:
check: check:
reset && cargo check reset && cargo check
test: test +ARGS="":
cargo test --workspace --exclude jack cargo test --workspace --exclude jack --exclude jack-sys {{ARGS}}
covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'" covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'"
grcov-binary := "--binary-path ./target/coverage/deps/" grcov-binary := "--binary-path ./target/coverage/deps/"
@ -130,3 +130,7 @@ plugin:
rg 'TODO' app/ | cat rg 'TODO' app/ | cat
rg 'TODO' app/ | wc -l rg 'TODO' app/ | wc -l
echo echo
new:
cargo build
target/debug/tek new

View file

@ -1076,3 +1076,64 @@
//} //}
//}; //};
//} //}
//take!(MidiInputCommand |state: Arrangement, iter|state.selected_midi_in().as_ref()
//.map(|t|Take::take(t, iter)).transpose().map(|x|x.flatten()));
//take!(MidiOutputCommand |state: Arrangement, iter|state.selected_midi_out().as_ref()
//.map(|t|Take::take(t, iter)).transpose().map(|x|x.flatten()));
//impl<T, U: Has<Option<T>>> MaybeHas<T> for U {
//fn get (&self) -> Option<&T> {
//Has::<Option<T>>::get(self).as_ref()
//}
//}
//
//// DRAW SAMPLE ADD:
//let area = to.area();
//to.make_dim();
//let area = center_box(
//area,
//64.max(area.w().saturating_sub(8)),
//20.max(area.w().saturating_sub(8)),
//);
//to.fill_fg(area, Color::Reset);
//to.fill_bg(area, Nord::bg_lo(true, true));
//to.fill_char(area, ' ');
//to.blit(&format!("{}", &self.dir.to_string_lossy()), area.x()+2, area.y()+1, Some(Style::default().bold()))?;
//to.blit(&"Select sample:", area.x()+2, area.y()+2, Some(Style::default().bold()))?;
//for (i, (is_dir, name)) in self.subdirs.iter()
//.map(|path|(true, path))
//.chain(self.files.iter().map(|path|(false, path)))
//.enumerate()
//.skip(self.offset)
//{
//if i >= area.h() as usize - 4 {
//break
//}
//let t = if is_dir { "" } else { "" };
//let line = format!("{t} {}", name.to_string_lossy());
//let line = &line[..line.len().min(area.w() as usize - 4)];
//to.blit(&line, area.x() + 2, area.y() + 3 + i as u16, Some(if i == self.cursor {
//Style::default().green()
//} else {
//Style::default().white()
//}))?;
//}
//Lozenge(Style::default()).draw(to)
//let cells_x = 8u16;
//let cells_y = 8u16;
//let cell_width = 10u16;
//let cell_height = 2u16;
//let width = cells_x * cell_width;
//let height = cells_y * cell_height;
//let cols = Map::east(
//cell_width,
//move||0..cells_x,
//move|x, _|Map::south(
//cell_height,
//move||0..cells_y,
//move|y, _|self.view_grid_cell("........", x, y, cell_width, cell_height)
//)
//);
//cols
//Thunk::new(|to: &mut TuiOut|{
//})

View file

@ -1,63 +0,0 @@
[package]
name = "tek"
edition = { workspace = true }
version = { workspace = true }
[lib]
path = "tek.rs"
[[bin]]
name = "tek"
path = "tek.rs"
[target.'cfg(target_os = "linux")']
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
[dependencies]
ansi_term = "0.12.1"
atomic_float = { workspace = true }
backtrace = { workspace = true }
builder-pattern = "0.4.2"
clap = { workspace = true, optional = true }
jack = { workspace = true }
konst = { workspace = true }
livi = { workspace = true, optional = true }
midly = { workspace = true }
palette = { workspace = true }
rand = { workspace = true }
symphonia = { workspace = true, optional = true }
tengri = { workspace = true }
toml = { workspace = true }
uuid = { workspace = true, optional = true }
wavers = { workspace = true, optional = true }
winit = { workspace = true, optional = true }
xdg = { workspace = true }
[dev-dependencies]
proptest = { workspace = true }
proptest-derive = { workspace = true }
[features]
arranger = ["port", "editor", "sequencer", "editor", "track", "scene", "clip", "select"]
browse = []
clap = []
cli = ["dep:clap"]
clip = []
clock = []
default = ["cli", "arranger", "sampler", "lv2"]
editor = []
host = ["lv2"]
lv2 = ["port", "livi"]
lv2_gui = ["lv2", "winit"]
meter = []
mixer = []
pool = []
port = []
sampler = ["port", "meter", "mixer", "browse", "symphonia", "wavers"]
scene = []
select = []
sequencer = ["port", "clock", "uuid", "pool"]
sf2 = []
track = []
vst2 = []
vst3 = []

View file

@ -1,16 +1,14 @@
#![allow(clippy::unit_arg)] #![allow(clippy::unit_arg)]
#![feature(adt_const_params, #![feature(
associated_type_defaults, adt_const_params, associated_type_defaults, closure_lifetime_binder,
closure_lifetime_binder, impl_trait_in_assoc_type, trait_alias, type_alias_impl_trait, type_changing_struct_update
if_let_guard, )]
impl_trait_in_assoc_type,
trait_alias,
type_alias_impl_trait,
type_changing_struct_update)]
mod tek_struct; pub use self::tek_struct::*; mod tek_struct; pub use self::tek_struct::*;
mod tek_trait; pub use self::tek_trait::*; mod tek_trait; pub use self::tek_trait::*;
mod tek_type; pub use self::tek_type::*; mod tek_type; pub use self::tek_type::*;
mod tek_impls; mod tek_impls;
extern crate xdg; extern crate xdg;
pub(crate) use ::xdg::BaseDirectories; pub(crate) use ::xdg::BaseDirectories;
pub extern crate atomic_float; pub extern crate atomic_float;
@ -22,6 +20,10 @@ pub(crate) use ::midly::{Smf, TrackEventKind, MidiMessage, Error as MidiError, n
pub extern crate tengri; pub extern crate tengri;
pub(crate) use tengri::{ pub(crate) use tengri::{
*, *,
dizzle::{
self,
*
},
ratatui::{ ratatui::{
self, self,
prelude::{Rect, Style, Stylize, Buffer, Modifier, buffer::Cell, Color::{self, *}}, prelude::{Rect, Style, Stylize, Buffer, Modifier, buffer::Cell, Color::{self, *}},
@ -76,9 +78,10 @@ pub(crate) use JackState::*;
/// ///
/// ``` /// ```
/// let jack = tek::Jack::new(&"test_tek").expect("failed to connect to jack"); /// let jack = tek::Jack::new(&"test_tek").expect("failed to connect to jack");
/// let proj = Default::default(); /// let proj = tek::Arrangement::default();
/// let conf = Default::default(); /// let mut conf = tek::Config::default();
/// let tek = tek::tek(&jack, proj, conf, "mode-doctest"); /// conf.add("(mode hello)");
/// let tek = tek::tek(&jack, proj, conf, "hello");
/// ``` /// ```
pub fn tek ( pub fn tek (
jack: &Jack<'static>, project: Arrangement, config: Config, mode: impl AsRef<str> jack: &Jack<'static>, project: Arrangement, config: Config, mode: impl AsRef<str>
@ -124,55 +127,24 @@ fn tek_dec (state: &mut App, axis: &ControlAxis) -> Perhaps<AppCommand> {
}) })
} }
pub fn load_view (views: &Views, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> { pub(crate) fn load_view (views: &Views, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> {
views.write().unwrap().insert(name.as_ref().into(), body.src()?.unwrap_or_default().into()); views.write().unwrap().insert(name.as_ref().into(), body.src()?.unwrap_or_default().into());
Ok(()) Ok(())
} }
pub fn load_mode (modes: &Modes, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> { pub(crate) fn load_mode (modes: &Modes, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> {
let mut mode = Mode::default(); let mut mode = Mode::default();
body.each(|item|mode.add(item))?; body.each(|item|mode.add(item))?;
modes.write().unwrap().insert(name.as_ref().into(), Arc::new(mode)); modes.write().unwrap().insert(name.as_ref().into(), Arc::new(mode));
Ok(()) Ok(())
} }
pub fn load_bind (binds: &Binds, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> { pub(crate) fn load_bind (binds: &Binds, name: &impl AsRef<str>, body: &impl Language) -> Usually<()> {
let mut map = Bind::new(); binds.write().unwrap().insert(name.as_ref().into(), Bind::load(body)?);
body.each(|item|if item.expr().head() == Ok(Some("see")) {
// TODO
Ok(())
} else if let Ok(Some(_word)) = item.expr().head().word() {
if let Some(key) = TuiEvent::from_dsl(item.expr()?.head()?)? {
map.add(key, Binding {
commands: [item.expr()?.tail()?.unwrap_or_default().into()].into(),
condition: None,
description: None,
source: None
});
Ok(())
} else if Some(":char") == item.expr()?.head()? {
// TODO
return Ok(())
} else {
return Err(format!("Config::load_bind: invalid key: {:?}", item.expr()?.head()?).into())
}
} else {
return Err(format!("Config::load_bind: unexpected: {item:?}").into())
})?;
binds.write().unwrap().insert(name.as_ref().into(), map);
Ok(()) Ok(())
} }
/// CLI banner. fn collect_commands (app: &App, input: &TuiIn) -> Usually<Vec<AppCommand>> {
pub(crate) const HEADER: &'static str = r#"
~ ~~~ ~ ~ ~~ ~ ~ ~ ~~ ~ ~ ~ ~
~ v0.4.0, 2026 winter (or is it) ~
~ ~ ~~~ ~ ~ ~ ~ ~~~ ~~~ ~ ~~ "#;
fn collect_commands (
app: &App, input: &TuiIn
) -> Usually<Vec<AppCommand>> {
let mut commands = vec![]; let mut commands = vec![];
for id in app.mode.keys.iter() { for id in app.mode.keys.iter() {
if let Some(event_map) = app.config.binds.clone().read().unwrap().get(id.as_ref()) if let Some(event_map) = app.config.binds.clone().read().unwrap().get(id.as_ref())
@ -335,42 +307,6 @@ pub fn tek_print_status (project: &Arrangement) {
// TODO dawvert integration // TODO dawvert integration
} }
pub const DEFAULT_PPQ: f64 = 96.0;
/// FIXME: remove this and use PPQ from timebase everywhere:
pub const PPQ: usize = 96;
/// (pulses, name), assuming 96 PPQ
pub const NOTE_DURATIONS: [(usize, &str);26] = [
(1, "1/384"), (2, "1/192"),
(3, "1/128"), (4, "1/96"),
(6, "1/64"), (8, "1/48"),
(12, "1/32"), (16, "1/24"),
(24, "1/16"), (32, "1/12"),
(48, "1/8"), (64, "1/6"),
(96, "1/4"), (128, "1/3"),
(192, "1/2"), (256, "2/3"),
(384, "1/1"), (512, "4/3"),
(576, "3/2"), (768, "2/1"),
(1152, "3/1"), (1536, "4/1"),
(2304, "6/1"), (3072, "8/1"),
(3456, "9/1"), (6144, "16/1"),
];
pub const NOTE_NAMES: [&str; 128] = [
"C0", "C#0", "D0", "D#0", "E0", "F0", "F#0", "G0", "G#0", "A0", "A#0", "B0",
"C1", "C#1", "D1", "D#1", "E1", "F1", "F#1", "G1", "G#1", "A1", "A#1", "B1",
"C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2",
"C3", "C#3", "D3", "D#3", "E3", "F3", "F#3", "G3", "G#3", "A3", "A#3", "B3",
"C4", "C#4", "D4", "D#4", "E4", "F4", "F#4", "G4", "G#4", "A4", "A#4", "B4",
"C5", "C#5", "D5", "D#5", "E5", "F5", "F#5", "G5", "G#5", "A5", "A#5", "B5",
"C6", "C#6", "D6", "D#6", "E6", "F6", "F#6", "G6", "G#6", "A6", "A#6", "B6",
"C7", "C#7", "D7", "D#7", "E7", "F7", "F#7", "G7", "G#7", "A7", "A#7", "B7",
"C8", "C#8", "D8", "D#8", "E8", "F8", "F#8", "G8", "G#8", "A8", "A#8", "B8",
"C9", "C#9", "D9", "D#9", "E9", "F9", "F#9", "G9", "G#9", "A9", "A#9", "B9",
"C10", "C#10", "D10", "D#10", "E10", "F10", "F#10", "G10",
];
/// Return boxed iterator of MIDI events /// Return boxed iterator of MIDI events
pub fn parse_midi_input <'a> (input: ::jack::MidiIter<'a>) pub fn parse_midi_input <'a> (input: ::jack::MidiIter<'a>)
-> Box<dyn Iterator<Item=(usize, LiveEvent<'a>, &'a [u8])> + 'a> -> Box<dyn Iterator<Item=(usize, LiveEvent<'a>, &'a [u8])> + 'a>
@ -1231,7 +1167,7 @@ mod view {
&connect.info))))))))) &connect.info)))))))))
} }
pub fn draw_header (state: &Lv2, to: &mut TuiOut, x: u16, y: u16, w: u16) { #[cfg(feature = "lv2")] pub fn draw_header (state: &Lv2, to: &mut TuiOut, x: u16, y: u16, w: u16) {
let style = Style::default().gray(); let style = Style::default().gray();
let label1 = format!(" {}", state.name); let label1 = format!(" {}", state.name);
to.blit(&label1, x + 1, y, Some(style.white().bold())); to.blit(&label1, x + 1, y, Some(style.white().bold()));
@ -1261,15 +1197,49 @@ mod view {
} }
} }
pub(crate) fn sampler_jack_process (
state: &mut Sampler, _: &Client, scope: &ProcessScope
) -> Control {
if let Some(midi_in) = &state.midi_in {
for midi in midi_in.port().iter(scope) {
sampler_midi_in(&state.samples, &state.voices, midi)
}
}
state.process_audio_out(scope);
state.process_audio_in(scope);
Control::Continue
}
/// Create [Voice]s from [Sample]s in response to MIDI input.
pub(crate) fn sampler_midi_in (
samples: &SampleKit<128>, voices: &Arc<RwLock<Vec<Voice>>>, RawMidi { time, bytes }: RawMidi
) {
if let Ok(LiveEvent::Midi { message, .. }) = LiveEvent::parse(bytes) {
match message {
MidiMessage::NoteOn { ref key, ref vel } => {
if let Some(sample) = samples.get(key.as_int() as usize) {
voices.write().unwrap().push(Sample::play(sample, time as usize, vel));
}
},
MidiMessage::Controller { controller: _, value: _ } => {
// TODO
}
_ => {}
}
}
}
#[cfg(test)] mod test_view_meter { #[cfg(test)] mod test_view_meter {
use super::*; use super::*;
use proptest::prelude::*; use proptest::prelude::*;
proptest! { proptest! {
#[test] fn proptest_view_meter ( #[test] fn proptest_view_meter (
label in "\\PC*", value in f32::MIN..f32::MAX label in "\\PC*", value in f32::MIN..f32::MAX
) { ) {
let _ = view_meter(&label, value); let _ = view_meter(&label, value);
} }
#[test] fn proptest_view_meters ( #[test] fn proptest_view_meters (
value1 in f32::MIN..f32::MAX, value1 in f32::MIN..f32::MAX,
value2 in f32::MIN..f32::MAX value2 in f32::MIN..f32::MAX
@ -1278,3 +1248,46 @@ mod view {
} }
} }
} }
pub const DEFAULT_PPQ: f64 = 96.0;
/// FIXME: remove this and use PPQ from timebase everywhere:
pub const PPQ: usize = 96;
/// (pulses, name), assuming 96 PPQ
pub const NOTE_DURATIONS: [(usize, &str);26] = [
(1, "1/384"), (2, "1/192"),
(3, "1/128"), (4, "1/96"),
(6, "1/64"), (8, "1/48"),
(12, "1/32"), (16, "1/24"),
(24, "1/16"), (32, "1/12"),
(48, "1/8"), (64, "1/6"),
(96, "1/4"), (128, "1/3"),
(192, "1/2"), (256, "2/3"),
(384, "1/1"), (512, "4/3"),
(576, "3/2"), (768, "2/1"),
(1152, "3/1"), (1536, "4/1"),
(2304, "6/1"), (3072, "8/1"),
(3456, "9/1"), (6144, "16/1"),
];
pub const NOTE_NAMES: [&str; 128] = [
"C0", "C#0", "D0", "D#0", "E0", "F0", "F#0", "G0", "G#0", "A0", "A#0", "B0",
"C1", "C#1", "D1", "D#1", "E1", "F1", "F#1", "G1", "G#1", "A1", "A#1", "B1",
"C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2",
"C3", "C#3", "D3", "D#3", "E3", "F3", "F#3", "G3", "G#3", "A3", "A#3", "B3",
"C4", "C#4", "D4", "D#4", "E4", "F4", "F#4", "G4", "G#4", "A4", "A#4", "B4",
"C5", "C#5", "D5", "D#5", "E5", "F5", "F#5", "G5", "G#5", "A5", "A#5", "B5",
"C6", "C#6", "D6", "D#6", "E6", "F6", "F#6", "G6", "G#6", "A6", "A#6", "B6",
"C7", "C#7", "D7", "D#7", "E7", "F7", "F#7", "G7", "G#7", "A7", "A#7", "B7",
"C8", "C#8", "D8", "D#8", "E8", "F8", "F#8", "G8", "G#8", "A8", "A#8", "B8",
"C9", "C#9", "D9", "D#9", "E9", "F9", "F#9", "G9", "G#9", "A9", "A#9", "B9",
"C10", "C#10", "D10", "D#10", "E10", "F10", "F#10", "G10",
];
/// CLI banner.
pub(crate) const HEADER: &'static str = r#"
~ ~~~ ~ ~ ~~ ~ ~ ~ ~~ ~ ~ ~ ~
~ v0.4.0, 2026 winter (or is it) ~
~ ~ ~~~ ~ ~ ~ ~ ~~~ ~~~ ~ ~~ "#;

File diff suppressed because it is too large Load diff

View file

@ -147,10 +147,13 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
pub modes: Modes, pub modes: Modes,
} }
/// An input binding. /// An map of input events (e.g. [TuiEvent]) to [Binding]s.
/// ///
/// ``` /// ```
/// let bind = tek::Bind::<(), ()>::default(); /// let lang = "(@x (nop)) (@y (nop) (nop))";
/// let bind = tek::Bind::<tek::tengri::TuiEvent, std::sync::Arc<str>>::load(&lang).unwrap();
/// assert_eq!(bind.query(&'x'.into()).map(|x|x.len()), Some(1));
/// //assert_eq!(bind.query(&'y'.into()).map(|x|x.len()), Some(2));
/// ``` /// ```
#[derive(Debug)] pub struct Bind<E, C>( #[derive(Debug)] pub struct Bind<E, C>(
/// Map of each event (e.g. key combination) to /// Map of each event (e.g. key combination) to
@ -159,10 +162,12 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
pub BTreeMap<E, Vec<Binding<C>>> pub BTreeMap<E, Vec<Binding<C>>>
); );
/// An input binding. /// A sequence of zero or more commands (e.g. [AppCommand]),
/// optionally filtered by [Condition] to form layers.
/// ///
/// ``` /// ```
/// let binding: tek::Binding<()> = Default::default(); /// //FIXME: Why does it overflow?
/// //let binding: Binding<()> = tek::Binding { ..Default::default() };
/// ``` /// ```
#[derive(Debug, Clone)] pub struct Binding<C> { #[derive(Debug, Clone)] pub struct Binding<C> {
pub commands: Arc<[C]>, pub commands: Arc<[C]>,
@ -302,7 +307,7 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
/// Temporal resolutions: sample rate, tempo, MIDI pulses per quaver (beat) /// Temporal resolutions: sample rate, tempo, MIDI pulses per quaver (beat)
/// ///
/// ``` /// ```
/// /// let _ = tek::Timebase::default();
/// ``` /// ```
#[derive(Debug, Clone)] pub struct Timebase { #[derive(Debug, Clone)] pub struct Timebase {
/// Audio samples per second /// Audio samples per second
@ -316,15 +321,28 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
/// Iterator that emits subsequent ticks within a range. /// Iterator that emits subsequent ticks within a range.
/// ///
/// ``` /// ```
/// let iter = tek::TicksIterator::default(); /// let iter = tek::Ticker::default();
/// ``` /// ```
#[derive(Debug, Default)] pub struct TicksIterator { #[derive(Debug, Default)] pub struct Ticker {
pub spp: f64, pub spp: f64,
pub sample: usize, pub sample: usize,
pub start: usize, pub start: usize,
pub end: usize, pub end: usize,
} }
///
/// ```
/// let _ = tek::MidiCursor::default();
/// ```
#[derive(Debug, Clone)] pub struct MidiCursor {
/// Time coordinate of cursor
pub time_pos: Arc<AtomicUsize>,
/// Note coordinate of cursor
pub note_pos: Arc<AtomicUsize>,
/// Length of note that will be inserted, in pulses
pub note_len: Arc<AtomicUsize>,
}
/// ///
/// ``` /// ```
/// use tek::{TimeRange, NoteRange}; /// use tek::{TimeRange, NoteRange};
@ -341,19 +359,6 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
/// let _ = model.get_note_axis(); /// let _ = model.get_note_axis();
/// let _ = model.get_note_hi(); /// let _ = model.get_note_hi();
/// ``` /// ```
#[derive(Debug, Clone)] pub struct MidiCursor {
/// Time coordinate of cursor
pub time_pos: Arc<AtomicUsize>,
/// Note coordinate of cursor
pub note_pos: Arc<AtomicUsize>,
/// Length of note that will be inserted, in pulses
pub note_len: Arc<AtomicUsize>,
}
///
/// ```
///
/// ```
#[derive(Debug, Clone, Default)] pub struct MidiSelection { #[derive(Debug, Clone, Default)] pub struct MidiSelection {
pub time_len: Arc<AtomicUsize>, pub time_len: Arc<AtomicUsize>,
/// Length of visible time axis /// Length of visible time axis
@ -373,7 +378,7 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
/// A point in time in all time scales (microsecond, sample, MIDI pulse) /// A point in time in all time scales (microsecond, sample, MIDI pulse)
/// ///
/// ``` /// ```
/// /// let _ = tek::Moment::default();
/// ``` /// ```
#[derive(Debug, Default, Clone)] pub struct Moment { #[derive(Debug, Default, Clone)] pub struct Moment {
pub timebase: Arc<Timebase>, pub timebase: Arc<Timebase>,
@ -387,7 +392,7 @@ pub struct JackNotify<T: Fn(JackEvent) + Send>(pub T);
/// ///
/// ``` /// ```
/// /// let _ = tek::Moment2::default();
/// ``` /// ```
#[derive(Debug, Clone, Default)] pub enum Moment2 { #[derive(Debug, Clone, Default)] pub enum Moment2 {
#[default] None, #[default] None,
@ -834,28 +839,18 @@ pub struct PoolView<'a>(pub &'a Pool);
pub name: Arc<str>, pub name: Arc<str>,
/// Device color. /// Device color.
pub color: ItemTheme, pub color: ItemTheme,
/// Audio input ports. Samples get recorded here.
#[cfg(feature = "port")] pub audio_ins: Vec<AudioInput>,
/// Audio input meters.
#[cfg(feature = "meter")] pub input_meters: Vec<f32>,
/// Sample currently being recorded. /// Sample currently being recorded.
pub recording: Option<(usize, Option<Arc<RwLock<Sample>>>)>, pub recording: Option<(usize, Option<Arc<RwLock<Sample>>>)>,
/// Recording buffer. /// Recording buffer.
pub buffer: Vec<Vec<f32>>, pub buffer: Vec<Vec<f32>>,
/// Samples mapped to MIDI notes. /// Samples mapped to MIDI notes.
pub samples: SampleKit<128>, pub samples: SampleKit<128>,
/// Samples that are not mapped to MIDI notes.
pub unmapped: Vec<Arc<RwLock<Sample>>>,
/// Sample currently being edited.
pub editing: Option<Arc<RwLock<Sample>>>,
/// MIDI input port. Triggers sample playback.
#[cfg(feature = "port")] pub midi_in: Option<MidiInput>,
/// Collection of currently playing instances of samples. /// Collection of currently playing instances of samples.
pub voices: Arc<RwLock<Vec<Voice>>>, pub voices: Arc<RwLock<Vec<Voice>>>,
/// Audio output ports. Voices get played here. /// Samples that are not mapped to MIDI notes.
#[cfg(feature = "port")] pub audio_outs: Vec<AudioOutput>, pub unmapped: Vec<Arc<RwLock<Sample>>>,
/// Audio output meters. /// Sample currently being edited.
#[cfg(feature = "meter")] pub output_meters: Vec<f32>, pub editing: Option<Arc<RwLock<Sample>>>,
/// How to mix the voices. /// How to mix the voices.
pub mixing_mode: MixingMode, pub mixing_mode: MixingMode,
/// How to meter the inputs and outputs. /// How to meter the inputs and outputs.
@ -872,6 +867,16 @@ pub struct PoolView<'a>(pub &'a Pool);
pub note_pt: AtomicUsize, pub note_pt: AtomicUsize,
/// Selected note as row/col. /// Selected note as row/col.
pub cursor: (AtomicUsize, AtomicUsize), pub cursor: (AtomicUsize, AtomicUsize),
/// Audio input meters.
#[cfg(feature = "meter")] pub input_meters: Vec<f32>,
/// Audio input ports. Samples are recorded from here.
#[cfg(feature = "port")] pub audio_ins: Vec<AudioInput>,
/// MIDI input port. Sampler are triggered from here.
#[cfg(feature = "port")] pub midi_in: Option<MidiInput>,
/// Audio output ports. Voices are played into here.
#[cfg(feature = "port")] pub audio_outs: Vec<AudioOutput>,
/// Audio output meters.
#[cfg(feature = "meter")] pub output_meters: Vec<f32>,
} }
/// Collection of samples, one per slot, fixed number of slots. /// Collection of samples, one per slot, fixed number of slots.
@ -909,7 +914,7 @@ pub struct PoolView<'a>(pub &'a Pool);
pub velocity: f32, pub velocity: f32,
} }
pub struct AddSampleModal { #[derive(Default, Debug)] pub struct SampleAdd {
pub exited: bool, pub exited: bool,
pub dir: PathBuf, pub dir: PathBuf,
pub subdirs: Vec<OsString>, pub subdirs: Vec<OsString>,

View file

@ -318,9 +318,14 @@ pub trait HasScenes: Has<Vec<Scene>> + Send + Sync {
/// ``` /// ```
/// use tek::{MidiEditor, HasEditor, tengri::Has}; /// use tek::{MidiEditor, HasEditor, tengri::Has};
/// struct TestEditorHost(Option<MidiEditor>); ///
/// tek::tengri::has!(Option<MidiEditor>: |self: TestEditorHost|self.0);
/// let mut host = TestEditorHost(Some(MidiEditor::default())); /// let mut host = TestEditorHost(Some(MidiEditor::default()));
/// struct TestEditorHost(Option<MidiEditor>);
/// impl Has<Option<MidiEditor>> for TestEditorHost {
/// fn get (&self) -> &Option<MidiEditor> { &self.0 }
/// fn get_mut (&mut self) -> &mut Option<MidiEditor> { &mut self.0 }
/// }
///
/// let _ = host.editor(); /// let _ = host.editor();
/// let _ = host.editor_mut(); /// let _ = host.editor_mut();
/// let _ = host.is_editing(); /// let _ = host.is_editing();

View file

@ -24,7 +24,7 @@ command = ["cargo", "clippy", "--all-targets"]
need_stdout = false need_stdout = false
watch = ["dizzle", "tengri", "app"] watch = ["dizzle", "tengri", "app"]
[jobs.test] [jobs.test]
command = ["cargo", "test", "--workspace", "--exclude", "jack"] command = ["cargo", "test", "--workspace", "--exclude", "jack", "--exclude", "jack-sys"]
need_stdout = true need_stdout = true
watch = ["dizzle", "tengri", "app"] watch = ["dizzle", "tengri", "app"]
[jobs.nextest] [jobs.nextest]

2
dizzle

@ -1 +1 @@
Subproject commit 624ac97274fbf974f1196864bb93093c31cb0fd7 Subproject commit 89260648ff828ab3c55b566368007a7b83fc3fc8

View file

@ -11,30 +11,38 @@
pkgs.cloc pkgs.cloc
]; ];
buildInputs = [ buildInputs = [
pkgs.libclang
pkgs.jack2 pkgs.jack2
pkgs.lilv pkgs.lilv
pkgs.serd pkgs.serd
pkgs.libclang
#pkgs.glib
#pkgs.atk
#pkgs.gdk
#pkgs.pango
]; ];
VST3_SDK_DIR = "/home/user/Lab/Music/tek/vst3sdk/"; VST3_SDK_DIR = "/home/user/Lab/Music/tek/vst3sdk/";
LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib"; LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.pipewire.jack pkgs.pipewire.jack
# for ChowKick.lv2: # for ChowKick.lv2:
pkgs.freetype #pkgs.freetype
pkgs.libgcc.lib #pkgs.libgcc.lib
# for Panagement # for Panagement
pkgs.xorg.libX11 #pkgs.xorg.libX11
pkgs.xorg.libXcursor #pkgs.xorg.libXcursor
pkgs.xorg.libXi #pkgs.xorg.libXi
pkgs.libxkbcommon #pkgs.libxkbcommon
pkgs.lilv #pkgs.lilv
pkgs.serd #pkgs.serd
#suil #suil
# for Helm: # for Helm:
pkgs.alsa-lib #pkgs.alsa-lib
pkgs.curl #pkgs.curl
pkgs.libglvnd #pkgs.libglvnd
#xorg_sys_opengl #xorg_sys_opengl
]; ];
in pkgs.mkShell.override { in pkgs.mkShell.override {

2
tengri

@ -1 +1 @@
Subproject commit c1011ddb7f8061c5fe242b6eab62a66537ae671b Subproject commit 06f8ed3ae3a5d0458036ba816f244df11c6b1277