├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md └── src ├── audio.rs ├── audio_files.rs ├── cpal_utils.rs ├── crossfade.rs ├── duration_parser.rs ├── fft.rs ├── hotswapper.rs ├── lib.rs ├── main.rs ├── math.rs ├── mixer.rs ├── player_processor.rs ├── power.rs ├── recorder.rs ├── recorder_processor.rs ├── resampler.rs ├── runtime_setup.rs ├── signal_flow.rs ├── signal_flow └── node.rs ├── slices.rs ├── stretcher.rs ├── stretcher_processor.rs ├── test_utils.rs └── windows.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | 4 | **/*.wav 5 | **/*.mp3 6 | **/*.ogg 7 | 8 | samples 9 | perf.data* 10 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.1.3" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "alsa" 16 | version = "0.9.1" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" 19 | dependencies = [ 20 | "alsa-sys", 21 | "bitflags 2.9.0", 22 | "cfg-if", 23 | "libc", 24 | ] 25 | 26 | [[package]] 27 | name = "alsa-sys" 28 | version = "0.3.1" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" 31 | dependencies = [ 32 | "libc", 33 | "pkg-config", 34 | ] 35 | 36 | [[package]] 37 | name = "ansi_term" 38 | version = "0.12.1" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 41 | dependencies = [ 42 | "winapi", 43 | ] 44 | 45 | [[package]] 46 | name = "anyhow" 47 | version = "1.0.98" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 50 | 51 | [[package]] 52 | name = "atty" 53 | version = "0.2.14" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 56 | dependencies = [ 57 | "hermit-abi", 58 | "libc", 59 | "winapi", 60 | ] 61 | 62 | [[package]] 63 | name = "autocfg" 64 | version = "1.4.0" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 67 | 68 | [[package]] 69 | name = "bindgen" 70 | version = "0.70.1" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" 73 | dependencies = [ 74 | "bitflags 2.9.0", 75 | "cexpr", 76 | "clang-sys", 77 | "itertools", 78 | "proc-macro2", 79 | "quote", 80 | "regex", 81 | "rustc-hash", 82 | "shlex", 83 | "syn 2.0.101", 84 | ] 85 | 86 | [[package]] 87 | name = "bitflags" 88 | version = "1.3.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 91 | 92 | [[package]] 93 | name = "bitflags" 94 | version = "2.9.0" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 97 | 98 | [[package]] 99 | name = "bumpalo" 100 | version = "3.17.0" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 103 | 104 | [[package]] 105 | name = "bytes" 106 | version = "1.10.1" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 109 | 110 | [[package]] 111 | name = "cc" 112 | version = "1.2.22" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" 115 | dependencies = [ 116 | "jobserver", 117 | "libc", 118 | "shlex", 119 | ] 120 | 121 | [[package]] 122 | name = "cesu8" 123 | version = "1.1.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 126 | 127 | [[package]] 128 | name = "cexpr" 129 | version = "0.6.0" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 132 | dependencies = [ 133 | "nom", 134 | ] 135 | 136 | [[package]] 137 | name = "cfg-if" 138 | version = "1.0.0" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 141 | 142 | [[package]] 143 | name = "cfg_aliases" 144 | version = "0.2.1" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 147 | 148 | [[package]] 149 | name = "clang-sys" 150 | version = "1.8.1" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 153 | dependencies = [ 154 | "glob", 155 | "libc", 156 | "libloading", 157 | ] 158 | 159 | [[package]] 160 | name = "clap" 161 | version = "2.34.0" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 164 | dependencies = [ 165 | "ansi_term", 166 | "atty", 167 | "bitflags 1.3.2", 168 | "strsim", 169 | "textwrap", 170 | "unicode-width", 171 | "vec_map", 172 | ] 173 | 174 | [[package]] 175 | name = "combine" 176 | version = "4.6.7" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 179 | dependencies = [ 180 | "bytes", 181 | "memchr", 182 | ] 183 | 184 | [[package]] 185 | name = "core-foundation-sys" 186 | version = "0.8.7" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 189 | 190 | [[package]] 191 | name = "coreaudio-rs" 192 | version = "0.11.3" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" 195 | dependencies = [ 196 | "bitflags 1.3.2", 197 | "core-foundation-sys", 198 | "coreaudio-sys", 199 | ] 200 | 201 | [[package]] 202 | name = "coreaudio-sys" 203 | version = "0.2.16" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b" 206 | dependencies = [ 207 | "bindgen", 208 | ] 209 | 210 | [[package]] 211 | name = "cpal" 212 | version = "0.15.3" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" 215 | dependencies = [ 216 | "alsa", 217 | "core-foundation-sys", 218 | "coreaudio-rs", 219 | "dasp_sample", 220 | "jni", 221 | "js-sys", 222 | "libc", 223 | "mach2", 224 | "ndk", 225 | "ndk-context", 226 | "oboe", 227 | "wasm-bindgen", 228 | "wasm-bindgen-futures", 229 | "web-sys", 230 | "windows", 231 | ] 232 | 233 | [[package]] 234 | name = "crossbeam-channel" 235 | version = "0.5.15" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" 238 | dependencies = [ 239 | "crossbeam-utils", 240 | ] 241 | 242 | [[package]] 243 | name = "crossbeam-utils" 244 | version = "0.8.21" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 247 | 248 | [[package]] 249 | name = "ctrlc" 250 | version = "3.4.7" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" 253 | dependencies = [ 254 | "nix", 255 | "windows-sys 0.59.0", 256 | ] 257 | 258 | [[package]] 259 | name = "dasp_sample" 260 | version = "0.11.0" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" 263 | 264 | [[package]] 265 | name = "deranged" 266 | version = "0.4.0" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" 269 | dependencies = [ 270 | "powerfmt", 271 | ] 272 | 273 | [[package]] 274 | name = "either" 275 | version = "1.15.0" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 278 | 279 | [[package]] 280 | name = "equivalent" 281 | version = "1.0.2" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 284 | 285 | [[package]] 286 | name = "errno" 287 | version = "0.3.11" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" 290 | dependencies = [ 291 | "libc", 292 | "windows-sys 0.59.0", 293 | ] 294 | 295 | [[package]] 296 | name = "fastrand" 297 | version = "2.3.0" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 300 | 301 | [[package]] 302 | name = "fuchsia-cprng" 303 | version = "0.1.1" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 306 | 307 | [[package]] 308 | name = "fwatch" 309 | version = "0.1.5" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "408ca97abc5e16c9c4dd8dcdca3845e2c37d622e61cafaf8dd1775ced69096dc" 312 | 313 | [[package]] 314 | name = "getrandom" 315 | version = "0.2.16" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 318 | dependencies = [ 319 | "cfg-if", 320 | "libc", 321 | "wasi 0.11.0+wasi-snapshot-preview1", 322 | ] 323 | 324 | [[package]] 325 | name = "getrandom" 326 | version = "0.3.3" 327 | source = "registry+https://github.com/rust-lang/crates.io-index" 328 | checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" 329 | dependencies = [ 330 | "cfg-if", 331 | "libc", 332 | "r-efi", 333 | "wasi 0.14.2+wasi-0.2.4", 334 | ] 335 | 336 | [[package]] 337 | name = "glob" 338 | version = "0.3.2" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 341 | 342 | [[package]] 343 | name = "hashbrown" 344 | version = "0.15.3" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" 347 | 348 | [[package]] 349 | name = "heck" 350 | version = "0.3.3" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 353 | dependencies = [ 354 | "unicode-segmentation", 355 | ] 356 | 357 | [[package]] 358 | name = "hermit-abi" 359 | version = "0.1.19" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 362 | dependencies = [ 363 | "libc", 364 | ] 365 | 366 | [[package]] 367 | name = "hound" 368 | version = "3.5.1" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" 371 | 372 | [[package]] 373 | name = "indexmap" 374 | version = "2.9.0" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 377 | dependencies = [ 378 | "equivalent", 379 | "hashbrown", 380 | ] 381 | 382 | [[package]] 383 | name = "itertools" 384 | version = "0.13.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 387 | dependencies = [ 388 | "either", 389 | ] 390 | 391 | [[package]] 392 | name = "itoa" 393 | version = "1.0.15" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 396 | 397 | [[package]] 398 | name = "jni" 399 | version = "0.21.1" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 402 | dependencies = [ 403 | "cesu8", 404 | "cfg-if", 405 | "combine", 406 | "jni-sys", 407 | "log", 408 | "thiserror", 409 | "walkdir", 410 | "windows-sys 0.45.0", 411 | ] 412 | 413 | [[package]] 414 | name = "jni-sys" 415 | version = "0.3.0" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 418 | 419 | [[package]] 420 | name = "jobserver" 421 | version = "0.1.33" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" 424 | dependencies = [ 425 | "getrandom 0.3.3", 426 | "libc", 427 | ] 428 | 429 | [[package]] 430 | name = "js-sys" 431 | version = "0.3.77" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 434 | dependencies = [ 435 | "once_cell", 436 | "wasm-bindgen", 437 | ] 438 | 439 | [[package]] 440 | name = "lazy_static" 441 | version = "1.5.0" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 444 | 445 | [[package]] 446 | name = "libc" 447 | version = "0.2.172" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 450 | 451 | [[package]] 452 | name = "libloading" 453 | version = "0.8.7" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c" 456 | dependencies = [ 457 | "cfg-if", 458 | "windows-targets 0.53.0", 459 | ] 460 | 461 | [[package]] 462 | name = "linux-raw-sys" 463 | version = "0.9.4" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 466 | 467 | [[package]] 468 | name = "log" 469 | version = "0.4.27" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 472 | 473 | [[package]] 474 | name = "mach" 475 | version = "0.3.2" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 478 | dependencies = [ 479 | "libc", 480 | ] 481 | 482 | [[package]] 483 | name = "mach2" 484 | version = "0.4.2" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" 487 | dependencies = [ 488 | "libc", 489 | ] 490 | 491 | [[package]] 492 | name = "memchr" 493 | version = "2.7.4" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 496 | 497 | [[package]] 498 | name = "minimal-lexical" 499 | version = "0.2.1" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 502 | 503 | [[package]] 504 | name = "minimp3" 505 | version = "0.5.1" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" 508 | dependencies = [ 509 | "minimp3-sys", 510 | "slice-deque", 511 | "thiserror", 512 | ] 513 | 514 | [[package]] 515 | name = "minimp3-sys" 516 | version = "0.3.2" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90" 519 | dependencies = [ 520 | "cc", 521 | ] 522 | 523 | [[package]] 524 | name = "ndk" 525 | version = "0.8.0" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" 528 | dependencies = [ 529 | "bitflags 2.9.0", 530 | "jni-sys", 531 | "log", 532 | "ndk-sys", 533 | "num_enum", 534 | "thiserror", 535 | ] 536 | 537 | [[package]] 538 | name = "ndk-context" 539 | version = "0.1.1" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 542 | 543 | [[package]] 544 | name = "ndk-sys" 545 | version = "0.5.0+25.2.9519653" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" 548 | dependencies = [ 549 | "jni-sys", 550 | ] 551 | 552 | [[package]] 553 | name = "nix" 554 | version = "0.30.1" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" 557 | dependencies = [ 558 | "bitflags 2.9.0", 559 | "cfg-if", 560 | "cfg_aliases", 561 | "libc", 562 | ] 563 | 564 | [[package]] 565 | name = "nom" 566 | version = "7.1.3" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 569 | dependencies = [ 570 | "memchr", 571 | "minimal-lexical", 572 | ] 573 | 574 | [[package]] 575 | name = "num" 576 | version = "0.1.43" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "c9bdb1fb680e609c2e0930c1866cafdd0be7e7c7a1ecf92aec71ed8d99d3e133" 579 | dependencies = [ 580 | "num-bigint", 581 | "num-complex 0.1.44", 582 | "num-integer", 583 | "num-iter", 584 | "num-rational", 585 | "num-traits", 586 | ] 587 | 588 | [[package]] 589 | name = "num-bigint" 590 | version = "0.1.45" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "1357c02fa1d647dd0769ef5bc2bf86281f064231c09c192a46c71246e3ec9258" 593 | dependencies = [ 594 | "autocfg", 595 | "num-integer", 596 | "num-traits", 597 | "rand 0.4.6", 598 | "rustc-serialize", 599 | ] 600 | 601 | [[package]] 602 | name = "num-complex" 603 | version = "0.1.44" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "17cf384bef067563c44d41028840dbecc7f06f2aa5d7881a81dfb0fc7c72f202" 606 | dependencies = [ 607 | "autocfg", 608 | "num-traits", 609 | "rustc-serialize", 610 | ] 611 | 612 | [[package]] 613 | name = "num-complex" 614 | version = "0.4.6" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 617 | dependencies = [ 618 | "num-traits", 619 | ] 620 | 621 | [[package]] 622 | name = "num-conv" 623 | version = "0.1.0" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 626 | 627 | [[package]] 628 | name = "num-derive" 629 | version = "0.4.2" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" 632 | dependencies = [ 633 | "proc-macro2", 634 | "quote", 635 | "syn 2.0.101", 636 | ] 637 | 638 | [[package]] 639 | name = "num-integer" 640 | version = "0.1.46" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 643 | dependencies = [ 644 | "num-traits", 645 | ] 646 | 647 | [[package]] 648 | name = "num-iter" 649 | version = "0.1.45" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 652 | dependencies = [ 653 | "autocfg", 654 | "num-integer", 655 | "num-traits", 656 | ] 657 | 658 | [[package]] 659 | name = "num-rational" 660 | version = "0.1.43" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "fbfff0773e8a07fb033d726b9ff1327466709820788e5298afce4d752965ff1e" 663 | dependencies = [ 664 | "autocfg", 665 | "num-bigint", 666 | "num-integer", 667 | "num-traits", 668 | "rustc-serialize", 669 | ] 670 | 671 | [[package]] 672 | name = "num-traits" 673 | version = "0.2.19" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 676 | dependencies = [ 677 | "autocfg", 678 | ] 679 | 680 | [[package]] 681 | name = "num_enum" 682 | version = "0.7.3" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" 685 | dependencies = [ 686 | "num_enum_derive", 687 | ] 688 | 689 | [[package]] 690 | name = "num_enum_derive" 691 | version = "0.7.3" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" 694 | dependencies = [ 695 | "proc-macro-crate", 696 | "proc-macro2", 697 | "quote", 698 | "syn 2.0.101", 699 | ] 700 | 701 | [[package]] 702 | name = "num_threads" 703 | version = "0.1.7" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" 706 | dependencies = [ 707 | "libc", 708 | ] 709 | 710 | [[package]] 711 | name = "oboe" 712 | version = "0.6.1" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" 715 | dependencies = [ 716 | "jni", 717 | "ndk", 718 | "ndk-context", 719 | "num-derive", 720 | "num-traits", 721 | "oboe-sys", 722 | ] 723 | 724 | [[package]] 725 | name = "oboe-sys" 726 | version = "0.6.1" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" 729 | dependencies = [ 730 | "cc", 731 | ] 732 | 733 | [[package]] 734 | name = "once_cell" 735 | version = "1.21.3" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 738 | 739 | [[package]] 740 | name = "pkg-config" 741 | version = "0.3.32" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 744 | 745 | [[package]] 746 | name = "powerfmt" 747 | version = "0.2.0" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 750 | 751 | [[package]] 752 | name = "ppv-lite86" 753 | version = "0.2.21" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 756 | dependencies = [ 757 | "zerocopy", 758 | ] 759 | 760 | [[package]] 761 | name = "primal-check" 762 | version = "0.3.4" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08" 765 | dependencies = [ 766 | "num-integer", 767 | ] 768 | 769 | [[package]] 770 | name = "proc-macro-crate" 771 | version = "3.3.0" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" 774 | dependencies = [ 775 | "toml_edit", 776 | ] 777 | 778 | [[package]] 779 | name = "proc-macro-error" 780 | version = "1.0.4" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 783 | dependencies = [ 784 | "proc-macro-error-attr", 785 | "proc-macro2", 786 | "quote", 787 | "syn 1.0.109", 788 | "version_check", 789 | ] 790 | 791 | [[package]] 792 | name = "proc-macro-error-attr" 793 | version = "1.0.4" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 796 | dependencies = [ 797 | "proc-macro2", 798 | "quote", 799 | "version_check", 800 | ] 801 | 802 | [[package]] 803 | name = "proc-macro2" 804 | version = "1.0.95" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 807 | dependencies = [ 808 | "unicode-ident", 809 | ] 810 | 811 | [[package]] 812 | name = "quote" 813 | version = "1.0.40" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 816 | dependencies = [ 817 | "proc-macro2", 818 | ] 819 | 820 | [[package]] 821 | name = "r-efi" 822 | version = "5.2.0" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 825 | 826 | [[package]] 827 | name = "rand" 828 | version = "0.4.6" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" 831 | dependencies = [ 832 | "fuchsia-cprng", 833 | "libc", 834 | "rand_core 0.3.1", 835 | "rdrand", 836 | "winapi", 837 | ] 838 | 839 | [[package]] 840 | name = "rand" 841 | version = "0.8.5" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 844 | dependencies = [ 845 | "libc", 846 | "rand_chacha", 847 | "rand_core 0.6.4", 848 | ] 849 | 850 | [[package]] 851 | name = "rand_chacha" 852 | version = "0.3.1" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 855 | dependencies = [ 856 | "ppv-lite86", 857 | "rand_core 0.6.4", 858 | ] 859 | 860 | [[package]] 861 | name = "rand_core" 862 | version = "0.3.1" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 865 | dependencies = [ 866 | "rand_core 0.4.2", 867 | ] 868 | 869 | [[package]] 870 | name = "rand_core" 871 | version = "0.4.2" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 874 | 875 | [[package]] 876 | name = "rand_core" 877 | version = "0.6.4" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 880 | dependencies = [ 881 | "getrandom 0.2.16", 882 | ] 883 | 884 | [[package]] 885 | name = "rdrand" 886 | version = "0.4.0" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 889 | dependencies = [ 890 | "rand_core 0.3.1", 891 | ] 892 | 893 | [[package]] 894 | name = "regex" 895 | version = "1.11.1" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 898 | dependencies = [ 899 | "aho-corasick", 900 | "memchr", 901 | "regex-automata", 902 | "regex-syntax", 903 | ] 904 | 905 | [[package]] 906 | name = "regex-automata" 907 | version = "0.4.9" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 910 | dependencies = [ 911 | "aho-corasick", 912 | "memchr", 913 | "regex-syntax", 914 | ] 915 | 916 | [[package]] 917 | name = "regex-syntax" 918 | version = "0.8.5" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 921 | 922 | [[package]] 923 | name = "rocoder" 924 | version = "0.4.0" 925 | dependencies = [ 926 | "anyhow", 927 | "cpal", 928 | "crossbeam-channel", 929 | "ctrlc", 930 | "fwatch", 931 | "hound", 932 | "libc", 933 | "libloading", 934 | "log", 935 | "minimp3", 936 | "num-traits", 937 | "rand 0.8.5", 938 | "rustfft", 939 | "simplelog", 940 | "slice-deque", 941 | "slice_ring_buf", 942 | "stopwatch", 943 | "structopt", 944 | "tempfile", 945 | "test-case", 946 | ] 947 | 948 | [[package]] 949 | name = "rustc-hash" 950 | version = "1.1.0" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 953 | 954 | [[package]] 955 | name = "rustc-serialize" 956 | version = "0.3.25" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" 959 | 960 | [[package]] 961 | name = "rustfft" 962 | version = "6.3.0" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "f266ff9b0cfc79de11fd5af76a2bc672fe3ace10c96fa06456740fa70cb1ed49" 965 | dependencies = [ 966 | "num-complex 0.4.6", 967 | "num-integer", 968 | "num-traits", 969 | "primal-check", 970 | "strength_reduce", 971 | "transpose", 972 | "version_check", 973 | ] 974 | 975 | [[package]] 976 | name = "rustix" 977 | version = "1.0.7" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" 980 | dependencies = [ 981 | "bitflags 2.9.0", 982 | "errno", 983 | "libc", 984 | "linux-raw-sys", 985 | "windows-sys 0.59.0", 986 | ] 987 | 988 | [[package]] 989 | name = "rustversion" 990 | version = "1.0.20" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 993 | 994 | [[package]] 995 | name = "same-file" 996 | version = "1.0.6" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 999 | dependencies = [ 1000 | "winapi-util", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "serde" 1005 | version = "1.0.219" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1008 | dependencies = [ 1009 | "serde_derive", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "serde_derive" 1014 | version = "1.0.219" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1017 | dependencies = [ 1018 | "proc-macro2", 1019 | "quote", 1020 | "syn 2.0.101", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "shlex" 1025 | version = "1.3.0" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1028 | 1029 | [[package]] 1030 | name = "simplelog" 1031 | version = "0.12.2" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" 1034 | dependencies = [ 1035 | "log", 1036 | "termcolor", 1037 | "time", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "slice-deque" 1042 | version = "0.3.0" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25" 1045 | dependencies = [ 1046 | "libc", 1047 | "mach", 1048 | "winapi", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "slice_ring_buf" 1053 | version = "0.2.7" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "b8c4361c250fd000889a89f4ca721808588f0eaeb3b1d6efd7201a21ae8ee469" 1056 | 1057 | [[package]] 1058 | name = "stopwatch" 1059 | version = "0.0.7" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "3d04b5ebc78da44d3a456319d8bc2783e7d8cc7ccbb5cb4dc3f54afbd93bf728" 1062 | dependencies = [ 1063 | "num", 1064 | ] 1065 | 1066 | [[package]] 1067 | name = "strength_reduce" 1068 | version = "0.2.4" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" 1071 | 1072 | [[package]] 1073 | name = "strsim" 1074 | version = "0.8.0" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1077 | 1078 | [[package]] 1079 | name = "structopt" 1080 | version = "0.3.26" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" 1083 | dependencies = [ 1084 | "clap", 1085 | "lazy_static", 1086 | "structopt-derive", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "structopt-derive" 1091 | version = "0.4.18" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 1094 | dependencies = [ 1095 | "heck", 1096 | "proc-macro-error", 1097 | "proc-macro2", 1098 | "quote", 1099 | "syn 1.0.109", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "syn" 1104 | version = "1.0.109" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1107 | dependencies = [ 1108 | "proc-macro2", 1109 | "quote", 1110 | "unicode-ident", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "syn" 1115 | version = "2.0.101" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 1118 | dependencies = [ 1119 | "proc-macro2", 1120 | "quote", 1121 | "unicode-ident", 1122 | ] 1123 | 1124 | [[package]] 1125 | name = "tempfile" 1126 | version = "3.20.0" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" 1129 | dependencies = [ 1130 | "fastrand", 1131 | "getrandom 0.3.3", 1132 | "once_cell", 1133 | "rustix", 1134 | "windows-sys 0.59.0", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "termcolor" 1139 | version = "1.4.1" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 1142 | dependencies = [ 1143 | "winapi-util", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "test-case" 1148 | version = "3.3.1" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" 1151 | dependencies = [ 1152 | "test-case-macros", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "test-case-core" 1157 | version = "3.3.1" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" 1160 | dependencies = [ 1161 | "cfg-if", 1162 | "proc-macro2", 1163 | "quote", 1164 | "syn 2.0.101", 1165 | ] 1166 | 1167 | [[package]] 1168 | name = "test-case-macros" 1169 | version = "3.3.1" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" 1172 | dependencies = [ 1173 | "proc-macro2", 1174 | "quote", 1175 | "syn 2.0.101", 1176 | "test-case-core", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "textwrap" 1181 | version = "0.11.0" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1184 | dependencies = [ 1185 | "unicode-width", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "thiserror" 1190 | version = "1.0.69" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1193 | dependencies = [ 1194 | "thiserror-impl", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "thiserror-impl" 1199 | version = "1.0.69" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1202 | dependencies = [ 1203 | "proc-macro2", 1204 | "quote", 1205 | "syn 2.0.101", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "time" 1210 | version = "0.3.41" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" 1213 | dependencies = [ 1214 | "deranged", 1215 | "itoa", 1216 | "libc", 1217 | "num-conv", 1218 | "num_threads", 1219 | "powerfmt", 1220 | "serde", 1221 | "time-core", 1222 | "time-macros", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "time-core" 1227 | version = "0.1.4" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" 1230 | 1231 | [[package]] 1232 | name = "time-macros" 1233 | version = "0.2.22" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" 1236 | dependencies = [ 1237 | "num-conv", 1238 | "time-core", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "toml_datetime" 1243 | version = "0.6.9" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" 1246 | 1247 | [[package]] 1248 | name = "toml_edit" 1249 | version = "0.22.26" 1250 | source = "registry+https://github.com/rust-lang/crates.io-index" 1251 | checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" 1252 | dependencies = [ 1253 | "indexmap", 1254 | "toml_datetime", 1255 | "winnow", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "transpose" 1260 | version = "0.2.3" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" 1263 | dependencies = [ 1264 | "num-integer", 1265 | "strength_reduce", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "unicode-ident" 1270 | version = "1.0.18" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1273 | 1274 | [[package]] 1275 | name = "unicode-segmentation" 1276 | version = "1.12.0" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 1279 | 1280 | [[package]] 1281 | name = "unicode-width" 1282 | version = "0.1.14" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 1285 | 1286 | [[package]] 1287 | name = "vec_map" 1288 | version = "0.8.2" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1291 | 1292 | [[package]] 1293 | name = "version_check" 1294 | version = "0.9.5" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1297 | 1298 | [[package]] 1299 | name = "walkdir" 1300 | version = "2.5.0" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 1303 | dependencies = [ 1304 | "same-file", 1305 | "winapi-util", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "wasi" 1310 | version = "0.11.0+wasi-snapshot-preview1" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1313 | 1314 | [[package]] 1315 | name = "wasi" 1316 | version = "0.14.2+wasi-0.2.4" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 1319 | dependencies = [ 1320 | "wit-bindgen-rt", 1321 | ] 1322 | 1323 | [[package]] 1324 | name = "wasm-bindgen" 1325 | version = "0.2.100" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 1328 | dependencies = [ 1329 | "cfg-if", 1330 | "once_cell", 1331 | "rustversion", 1332 | "wasm-bindgen-macro", 1333 | ] 1334 | 1335 | [[package]] 1336 | name = "wasm-bindgen-backend" 1337 | version = "0.2.100" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 1340 | dependencies = [ 1341 | "bumpalo", 1342 | "log", 1343 | "proc-macro2", 1344 | "quote", 1345 | "syn 2.0.101", 1346 | "wasm-bindgen-shared", 1347 | ] 1348 | 1349 | [[package]] 1350 | name = "wasm-bindgen-futures" 1351 | version = "0.4.50" 1352 | source = "registry+https://github.com/rust-lang/crates.io-index" 1353 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 1354 | dependencies = [ 1355 | "cfg-if", 1356 | "js-sys", 1357 | "once_cell", 1358 | "wasm-bindgen", 1359 | "web-sys", 1360 | ] 1361 | 1362 | [[package]] 1363 | name = "wasm-bindgen-macro" 1364 | version = "0.2.100" 1365 | source = "registry+https://github.com/rust-lang/crates.io-index" 1366 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 1367 | dependencies = [ 1368 | "quote", 1369 | "wasm-bindgen-macro-support", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "wasm-bindgen-macro-support" 1374 | version = "0.2.100" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 1377 | dependencies = [ 1378 | "proc-macro2", 1379 | "quote", 1380 | "syn 2.0.101", 1381 | "wasm-bindgen-backend", 1382 | "wasm-bindgen-shared", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "wasm-bindgen-shared" 1387 | version = "0.2.100" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 1390 | dependencies = [ 1391 | "unicode-ident", 1392 | ] 1393 | 1394 | [[package]] 1395 | name = "web-sys" 1396 | version = "0.3.77" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 1399 | dependencies = [ 1400 | "js-sys", 1401 | "wasm-bindgen", 1402 | ] 1403 | 1404 | [[package]] 1405 | name = "winapi" 1406 | version = "0.3.9" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1409 | dependencies = [ 1410 | "winapi-i686-pc-windows-gnu", 1411 | "winapi-x86_64-pc-windows-gnu", 1412 | ] 1413 | 1414 | [[package]] 1415 | name = "winapi-i686-pc-windows-gnu" 1416 | version = "0.4.0" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1419 | 1420 | [[package]] 1421 | name = "winapi-util" 1422 | version = "0.1.9" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 1425 | dependencies = [ 1426 | "windows-sys 0.59.0", 1427 | ] 1428 | 1429 | [[package]] 1430 | name = "winapi-x86_64-pc-windows-gnu" 1431 | version = "0.4.0" 1432 | source = "registry+https://github.com/rust-lang/crates.io-index" 1433 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1434 | 1435 | [[package]] 1436 | name = "windows" 1437 | version = "0.54.0" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" 1440 | dependencies = [ 1441 | "windows-core", 1442 | "windows-targets 0.52.6", 1443 | ] 1444 | 1445 | [[package]] 1446 | name = "windows-core" 1447 | version = "0.54.0" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" 1450 | dependencies = [ 1451 | "windows-result", 1452 | "windows-targets 0.52.6", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "windows-result" 1457 | version = "0.1.2" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" 1460 | dependencies = [ 1461 | "windows-targets 0.52.6", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "windows-sys" 1466 | version = "0.45.0" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1469 | dependencies = [ 1470 | "windows-targets 0.42.2", 1471 | ] 1472 | 1473 | [[package]] 1474 | name = "windows-sys" 1475 | version = "0.59.0" 1476 | source = "registry+https://github.com/rust-lang/crates.io-index" 1477 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1478 | dependencies = [ 1479 | "windows-targets 0.52.6", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "windows-targets" 1484 | version = "0.42.2" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1487 | dependencies = [ 1488 | "windows_aarch64_gnullvm 0.42.2", 1489 | "windows_aarch64_msvc 0.42.2", 1490 | "windows_i686_gnu 0.42.2", 1491 | "windows_i686_msvc 0.42.2", 1492 | "windows_x86_64_gnu 0.42.2", 1493 | "windows_x86_64_gnullvm 0.42.2", 1494 | "windows_x86_64_msvc 0.42.2", 1495 | ] 1496 | 1497 | [[package]] 1498 | name = "windows-targets" 1499 | version = "0.52.6" 1500 | source = "registry+https://github.com/rust-lang/crates.io-index" 1501 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1502 | dependencies = [ 1503 | "windows_aarch64_gnullvm 0.52.6", 1504 | "windows_aarch64_msvc 0.52.6", 1505 | "windows_i686_gnu 0.52.6", 1506 | "windows_i686_gnullvm 0.52.6", 1507 | "windows_i686_msvc 0.52.6", 1508 | "windows_x86_64_gnu 0.52.6", 1509 | "windows_x86_64_gnullvm 0.52.6", 1510 | "windows_x86_64_msvc 0.52.6", 1511 | ] 1512 | 1513 | [[package]] 1514 | name = "windows-targets" 1515 | version = "0.53.0" 1516 | source = "registry+https://github.com/rust-lang/crates.io-index" 1517 | checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" 1518 | dependencies = [ 1519 | "windows_aarch64_gnullvm 0.53.0", 1520 | "windows_aarch64_msvc 0.53.0", 1521 | "windows_i686_gnu 0.53.0", 1522 | "windows_i686_gnullvm 0.53.0", 1523 | "windows_i686_msvc 0.53.0", 1524 | "windows_x86_64_gnu 0.53.0", 1525 | "windows_x86_64_gnullvm 0.53.0", 1526 | "windows_x86_64_msvc 0.53.0", 1527 | ] 1528 | 1529 | [[package]] 1530 | name = "windows_aarch64_gnullvm" 1531 | version = "0.42.2" 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" 1533 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1534 | 1535 | [[package]] 1536 | name = "windows_aarch64_gnullvm" 1537 | version = "0.52.6" 1538 | source = "registry+https://github.com/rust-lang/crates.io-index" 1539 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1540 | 1541 | [[package]] 1542 | name = "windows_aarch64_gnullvm" 1543 | version = "0.53.0" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 1546 | 1547 | [[package]] 1548 | name = "windows_aarch64_msvc" 1549 | version = "0.42.2" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1552 | 1553 | [[package]] 1554 | name = "windows_aarch64_msvc" 1555 | version = "0.52.6" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1558 | 1559 | [[package]] 1560 | name = "windows_aarch64_msvc" 1561 | version = "0.53.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" 1564 | 1565 | [[package]] 1566 | name = "windows_i686_gnu" 1567 | version = "0.42.2" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1570 | 1571 | [[package]] 1572 | name = "windows_i686_gnu" 1573 | version = "0.52.6" 1574 | source = "registry+https://github.com/rust-lang/crates.io-index" 1575 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1576 | 1577 | [[package]] 1578 | name = "windows_i686_gnu" 1579 | version = "0.53.0" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 1582 | 1583 | [[package]] 1584 | name = "windows_i686_gnullvm" 1585 | version = "0.52.6" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1588 | 1589 | [[package]] 1590 | name = "windows_i686_gnullvm" 1591 | version = "0.53.0" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 1594 | 1595 | [[package]] 1596 | name = "windows_i686_msvc" 1597 | version = "0.42.2" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1600 | 1601 | [[package]] 1602 | name = "windows_i686_msvc" 1603 | version = "0.52.6" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1606 | 1607 | [[package]] 1608 | name = "windows_i686_msvc" 1609 | version = "0.53.0" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 1612 | 1613 | [[package]] 1614 | name = "windows_x86_64_gnu" 1615 | version = "0.42.2" 1616 | source = "registry+https://github.com/rust-lang/crates.io-index" 1617 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1618 | 1619 | [[package]] 1620 | name = "windows_x86_64_gnu" 1621 | version = "0.52.6" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1624 | 1625 | [[package]] 1626 | name = "windows_x86_64_gnu" 1627 | version = "0.53.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 1630 | 1631 | [[package]] 1632 | name = "windows_x86_64_gnullvm" 1633 | version = "0.42.2" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1636 | 1637 | [[package]] 1638 | name = "windows_x86_64_gnullvm" 1639 | version = "0.52.6" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1642 | 1643 | [[package]] 1644 | name = "windows_x86_64_gnullvm" 1645 | version = "0.53.0" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 1648 | 1649 | [[package]] 1650 | name = "windows_x86_64_msvc" 1651 | version = "0.42.2" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1654 | 1655 | [[package]] 1656 | name = "windows_x86_64_msvc" 1657 | version = "0.52.6" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1660 | 1661 | [[package]] 1662 | name = "windows_x86_64_msvc" 1663 | version = "0.53.0" 1664 | source = "registry+https://github.com/rust-lang/crates.io-index" 1665 | checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 1666 | 1667 | [[package]] 1668 | name = "winnow" 1669 | version = "0.7.10" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" 1672 | dependencies = [ 1673 | "memchr", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "wit-bindgen-rt" 1678 | version = "0.39.0" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 1681 | dependencies = [ 1682 | "bitflags 2.9.0", 1683 | ] 1684 | 1685 | [[package]] 1686 | name = "zerocopy" 1687 | version = "0.8.25" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" 1690 | dependencies = [ 1691 | "zerocopy-derive", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "zerocopy-derive" 1696 | version = "0.8.25" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" 1699 | dependencies = [ 1700 | "proc-macro2", 1701 | "quote", 1702 | "syn 2.0.101", 1703 | ] 1704 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rocoder" 3 | version = "0.4.0" 4 | authors = ["Andrew Yoon "] 5 | repository = "https://github.com/ajyoon/rocoder" 6 | edition = "2021" 7 | description = "A live-codeable phase vocoder" 8 | license = "CC0-1.0" 9 | keywords = ["audio", "synthesizer", "live-code"] 10 | categories = ["multimedia::audio"] 11 | homepage = "https://github.com/ajyoon/rocoder" 12 | readme = "README.md" 13 | 14 | [lib] 15 | name = "rocoder" 16 | path = "src/lib.rs" 17 | 18 | [profile.release] 19 | debug = true # keep debug symbols in release build for profiling 20 | 21 | [dependencies] 22 | rustfft = "^6.1.0" 23 | num-traits = "^0.2.17" 24 | hound = "^3.5.1" 25 | rand = "^0.8.5" 26 | stopwatch = "^0.0.7" 27 | log = "^0.4.20" 28 | simplelog = "^0.12.1" 29 | structopt = "^0.3.26" 30 | minimp3 = "^0.5.1" 31 | cpal = "^0.15.2" 32 | libc = "^0.2.151" 33 | ctrlc = "^3.4.2" 34 | anyhow = "^1.0.77" 35 | libloading = "^0.8.1" 36 | tempfile = "^3.9.0" 37 | crossbeam-channel = "^0.5.10" 38 | fwatch = "^0.1.5" 39 | slice-deque = "^0.3.0" 40 | slice_ring_buf = "^0.2.7" 41 | 42 | [dev-dependencies] 43 | test-case = "^3.3.1" 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rocoder 2 | 3 | A live-codeable phase vocoder written in Rust. 4 | 5 | Rocoder is a digital instrument command line program that transforms audio by slowing or speeding it and applying live-codeable frequency kernels. It can: 6 | 7 | - Change audio speed 8 | - Pitch shift (though only along harmonics and subharmonics) 9 | - Apply arbitrary code transformations to frequency-domain audio representations (Mac and Linux only) 10 | - Live compile and reload transformation code 11 | - Read and write audio files 12 | - Do direct audio input and playback 13 | 14 | ## Installing 15 | 16 | 1. If you don't have it, install a Rust toolchain at https://rustup.rs/ 17 | 2. Install this tool by running `cargo install rocoder` 18 | 3. Run `rocoder -h` to get started! 19 | 20 | ## How it works 21 | 22 | The rocoder is a fairly naive, and probably not quite correct, [phase vocoder](https://en.wikipedia.org/wiki/Phase_vocoder). It processes audio using a 3 step process, and understanding the basics is necessary for advanced use, especially working with frequency kernels. 23 | 24 | 1. **Analysis**: Input audio is analyzed in overlapping [Hanning windows](https://en.wikipedia.org/wiki/Hann_function) using [FFTs](https://en.wikipedia.org/wiki/Fast_Fourier_transform). Each window analysis emits a frequency domain representation of its audio window, encoded as a buffer of complex numbers. 25 | 2. **Processing**: If a frequency kernel is provided, each frequency domain window buffer is then passed to it for arbitrary code-defined processing. 26 | 3. **Resynthesis**: The processed frequency domain buffers are then passed to an inverse FFT to be resynthesized. Resynthesis is done in such a way to allow both pitch shifting and speed changing. 27 | 28 | ## Usage 29 | 30 | The rocoder is controlled using a series of command line arguments. Run `rocoder -h` to list them. 31 | 32 | ### `-r`, `--record` 33 | 34 | Get audio input from your default audio input device. When set, the rocoder will start by recording input until you press Enter. It will automatically attempt to trim the audio start/end to cut out dead noise. 35 | 36 | ### `--rotate-channels` 37 | 38 | Rotate the input audio channels by 1. For stereo input this swaps left and right channels. 39 | 40 | ### `-a`, `--amplitude` `` 41 | 42 | An output amplitude multiplier. Defaults to `1`; 43 | 44 | ### `-b`, `--buffer` `` 45 | 46 | The maximum duration of audio to process ahead of time. This is mostly useful if you want to alter the response time of live code changes. The value is specified in seconds, e.g. `-b 1.5` for 1.5 seconds. 47 | 48 | ### `-d`, `--duration` `` 49 | 50 | The amount of audio to read from the input source, starting from the starting time if provided. Specified as a duration string `hh:mm:ss.ss` where larger divisions may be omitted, e.g. `1:0:0` for 1 hour, `1:30` for 90 seconds, `1.5` for 1.5 seconds. 51 | 52 | ### `-f`, `--factor` `` 53 | 54 | The stretch factor; e.g. 5 to slow 5x and 0.2 to speed up 5x. Defaults to `1` (no speed change). 55 | 56 | ### `-x`, `--fade` `` 57 | 58 | Duration of a fade in/out to apply to the output audio. See `--duration` for specification format. Defaults to `1` (1 second). 59 | 60 | ### `--freq-kernel` `` 61 | 62 | Path to a rust frequency kernel. 63 | 64 | ### `-i`, `--input` `` 65 | 66 | Path to an audio file to read from. Currently supports `.wav` (8, 16, 24, 32 bit integer and 32 bit float formats) and `.mp3`. 67 | 68 | ### `-o`, `--output` `` 69 | 70 | Path to an audio output file. If set, output is not played to a device; instead the rocoder will run as fast as possible and persist the output to disk. 71 | 72 | This only supports `.wav` output in 32-bit float format. 73 | 74 | Due to a hacky implementation, this requires the entire output file fits in memory before being written to disk. 75 | 76 | ### `-p`, `--pitch-multiple` `` 77 | 78 | A non-zero integer pitch multiplier. Positive numbers above 1 are used to pitch shift along the [harmonic series](https://en.wikipedia.org/wiki/Harmonic_series_(music)), while negative numbers below -1 are used to shift along the [subharmonic series](https://en.wikipedia.org/wiki/Undertone_series). 79 | 80 | | arg | result | 81 | |------|--------------------------------| 82 | | `1` | No pitch shift | 83 | | `2` | Up an octave | 84 | | `3` | Up an octave and a fifth | 85 | | `4` | Up 2 octaves | 86 | | `5` | up 2 octaves and a major third | 87 | | `-1` | No pitch shift | 88 | | `-2` | Down an octave | 89 | | `-3` | Down and octave and a fifth | 90 | | `0` | [Invalid] | 91 | 92 | Defaults to `1` (no pitch shift). 93 | 94 | ### `-s`, `--start` `` 95 | 96 | Start time in the input audio. (See `--duration` for argument format) 97 | 98 | ### `-w`, `--window` `` 99 | 100 | The size of processing windows. Small values cause distortion while large values cause smearing. Powers of 2 are recommended for optimal performance. Defaults to `16384`. 101 | 102 | ## Live coding 103 | 104 | **Frequency kernels are only supported on Mac and Linux. Contributions to support Windows are welcome.** 105 | 106 | Frequency kernels modify frequency-domain data before resynthesis, allowing you to perform very powerful transformations on your sounds. Kernels are defined in Rust files and must conform to the following signature: 107 | 108 | ```rs 109 | #[no_mangle] 110 | pub fn apply(elapsed_ms: usize, input: Vec<(f32, f32)>) -> Vec<(f32, f32)> { 111 | todo!() // Your code here 112 | } 113 | ``` 114 | 115 | Both the `no_mangle` directive and the name `apply` are required. 116 | 117 | The input is a buffer of complex numbers representing the frequency domain of a given audio window. By default, windows are ~16k samples long. The function's output is a transformed copy of the input. 118 | 119 | Here is a simple kernel which simply increases the amplitude of the input audio by multiplying the input by a constant: 120 | 121 | ```rs 122 | #[no_mangle] 123 | pub fn apply(elapsed_ms: usize, input: Vec<(f32, f32)>) -> Vec<(f32, f32)> { 124 | return input 125 | .iter() 126 | .map(|(real, im)| (real * 2.0, im * 2.0)) 127 | .collect(); 128 | } 129 | ``` 130 | 131 | If this is saved in a file `kernel.rs`, it can be used with: 132 | 133 | ```sh 134 | cargo run --release -- \ 135 | -r -f 1 --freq-kernel path/to/kernel.rs 136 | ``` 137 | 138 | When the rocoder is running live and playing audio back (not writing to a file), it will watch this file for changes and automatically compile and hotswap it into the process on the fly. Simply edit the file and save to live code on your kernel! 139 | 140 | ## The library 141 | 142 | Various pieces of functionality from this tool are exposed in a crate library, but this API is currently undocumented and very unstable. 143 | 144 | ## Credits 145 | 146 | The basic implementation of the phase vocoder algorithm is been adapted from [Paulstretch](https://github.com/paulnasca/paulstretch_python). 147 | -------------------------------------------------------------------------------- /src/audio.rs: -------------------------------------------------------------------------------- 1 | use crate::math; 2 | use anyhow::Result; 3 | use crossbeam_channel::{unbounded, Receiver, RecvTimeoutError, Sender}; 4 | use num_traits::Num; 5 | use std::ops::MulAssign; 6 | use std::time::Duration; 7 | 8 | pub trait Sample: Sized + Num + Copy + MulAssign + Send + 'static { 9 | fn from_i8(n: i8) -> Self; 10 | fn from_i16(n: i16) -> Self; 11 | // Rust doesn't have i24, so this assumes the i24 has been stored in an i32 12 | fn from_i24(n: i32) -> Self; 13 | fn from_i32(n: i32) -> Self; 14 | } 15 | 16 | impl Sample for f32 { 17 | fn from_i8(n: i8) -> Self { 18 | n as f32 / i8::max_value() as f32 19 | } 20 | fn from_i16(n: i16) -> Self { 21 | n as f32 / i16::max_value() as f32 22 | } 23 | fn from_i24(n: i32) -> Self { 24 | n as f32 / 8388608.0 25 | } 26 | fn from_i32(n: i32) -> Self { 27 | n as f32 / i32::max_value() as f32 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug)] 32 | pub struct AudioSpec { 33 | /// Number of audio channels (e.g. 2 for stereo) 34 | pub channels: u16, 35 | /// Number of samples per second 36 | pub sample_rate: u32, 37 | } 38 | 39 | #[derive(Debug)] 40 | pub struct Audio { 41 | pub data: Vec>, 42 | pub spec: AudioSpec, 43 | } 44 | 45 | impl Audio { 46 | pub fn from_spec(spec: &AudioSpec) -> Audio { 47 | let data = (0..spec.channels).map(|_| Vec::new()).collect(); 48 | Audio { data, spec: *spec } 49 | } 50 | 51 | pub fn duration(&self) -> Duration { 52 | Duration::from_nanos( 53 | ((self.data[0].len() as f32 / self.spec.sample_rate as f32) * 1_000_000_000.0) as u64, 54 | ) 55 | } 56 | 57 | pub fn clip_in_place(&mut self, start_offset: Option, duration: Option) { 58 | let start_sample_pos = self.resolve_start_sample_pos(start_offset); 59 | let end_sample_pos = self.resolve_end_sample_pos(start_sample_pos, duration); 60 | for channel in self.data.iter_mut() { 61 | *channel = channel[start_sample_pos..end_sample_pos].to_vec(); 62 | } 63 | } 64 | 65 | pub fn amplify_in_place(&mut self, factor: f32) { 66 | for channel in self.data.iter_mut() { 67 | for i in 0..channel.len() { 68 | channel[i] *= factor; 69 | } 70 | } 71 | } 72 | 73 | pub fn rotate_channels(&mut self) { 74 | self.data.rotate_right(1); 75 | } 76 | 77 | pub fn fade_in(&mut self, start: Duration, dur: Duration) { 78 | self.fade_in_at_sample(self.duration_to_sample(start), self.duration_to_sample(dur)) 79 | } 80 | 81 | fn fade_in_at_sample(&mut self, start: usize, dur: usize) { 82 | if start + dur > self.data[0].len() { 83 | warn!("Fade in parameters out of bounds, ignoring."); 84 | return; 85 | } 86 | for channel in self.data.iter_mut() { 87 | for i in 0..start { 88 | channel[i] = 0.0; 89 | } 90 | for p in 0..dur { 91 | channel[start + p] *= math::sqrt_interp(0.0, 1.0, p as f32 / dur as f32) 92 | } 93 | } 94 | } 95 | 96 | pub fn fade_out(&mut self, start: Duration, dur: Duration) { 97 | self.fade_out_at_sample(self.duration_to_sample(start), self.duration_to_sample(dur)) 98 | } 99 | 100 | fn fade_out_at_sample(&mut self, start: usize, dur: usize) { 101 | if start + dur > self.data[0].len() { 102 | warn!("Fade out parameters out of bounds, ignoring."); 103 | return; 104 | } 105 | for channel in self.data.iter_mut() { 106 | for i in start + dur..channel.len() { 107 | channel[i] = 0.0; 108 | } 109 | for p in 0..dur { 110 | channel[start + p] *= math::sqrt_interp(1.0, 0.0, p as f32 / dur as f32) 111 | } 112 | } 113 | } 114 | 115 | fn resolve_start_sample_pos(&self, start_offset: Option) -> usize { 116 | match start_offset { 117 | Some(offset) => (offset.as_secs_f64() * self.spec.sample_rate as f64) as usize, 118 | None => 0, 119 | } 120 | } 121 | 122 | fn resolve_end_sample_pos(&self, start_sample_pos: usize, duration: Option) -> usize { 123 | match duration { 124 | Some(dur) => { 125 | let dur_in_samples = (dur.as_secs_f64() * self.spec.sample_rate as f64) as usize; 126 | start_sample_pos + dur_in_samples 127 | } 128 | None => self.data.get(0).unwrap().len(), 129 | } 130 | } 131 | 132 | pub fn duration_to_sample(&self, duration: Duration) -> usize { 133 | (duration.as_secs_f32() * self.spec.sample_rate as f32) as usize 134 | } 135 | 136 | pub fn sample_to_duration(&self, sample: usize) -> Duration { 137 | Duration::from_secs_f32(sample as f32 / self.spec.sample_rate as f32) 138 | } 139 | } 140 | 141 | #[derive(Debug)] 142 | pub struct AudioBus { 143 | pub spec: AudioSpec, 144 | pub channels: Vec>>, 145 | pub expected_total_samples: Option, 146 | } 147 | 148 | const INTO_AUDIO_DRAIN_TIMEOUT: Duration = Duration::from_millis(5); 149 | 150 | impl AudioBus { 151 | /// quick and dirty collapse into audio 152 | pub fn into_audio(self) -> Audio { 153 | assert!(self.channels.len() as u16 == self.spec.channels); 154 | let mut out: Vec> = vec![vec![]; self.spec.channels as usize]; 155 | loop { 156 | let mut disconnected_count = 0; 157 | for (i, channel) in self.channels.iter().enumerate() { 158 | match channel.recv_timeout(INTO_AUDIO_DRAIN_TIMEOUT) { 159 | Ok(chunk) => out[i].extend(chunk), 160 | Err(RecvTimeoutError::Timeout) => {} 161 | Err(RecvTimeoutError::Disconnected) => disconnected_count += 1, 162 | } 163 | } 164 | if disconnected_count == self.spec.channels { 165 | break; 166 | } 167 | } 168 | Audio { 169 | spec: self.spec, 170 | data: out, 171 | } 172 | } 173 | 174 | pub fn from_audio(audio: Audio) -> Self { 175 | let spec = audio.spec; 176 | let expected_total_samples = Some(audio.data[0].len()); 177 | let channels: Vec>> = audio 178 | .data 179 | .into_iter() 180 | .map(|channel| { 181 | let (tx, rx) = unbounded(); 182 | tx.send(channel).unwrap(); 183 | rx 184 | }) 185 | .collect(); 186 | AudioBus { 187 | spec, 188 | expected_total_samples, 189 | channels, 190 | } 191 | } 192 | 193 | pub fn from_spec( 194 | spec: AudioSpec, 195 | expected_total_samples: Option, 196 | ) -> (Self, Vec>>) { 197 | let mut senders = vec![]; 198 | let mut receivers = vec![]; 199 | for _ in 0..spec.channels { 200 | let (tx, rx) = unbounded(); 201 | senders.push(tx); 202 | receivers.push(rx); 203 | } 204 | ( 205 | AudioBus { 206 | spec, 207 | expected_total_samples, 208 | channels: receivers, 209 | }, 210 | senders, 211 | ) 212 | } 213 | 214 | pub fn collect_chunk(&mut self) -> Result