Files
soundcraft/crates/dsp/examples/plugin_bench.rs
T
Brandon ThomasandClaude Opus 5.5 a28e15210c Parallel mixer, Setup windows, clip gain lines, folders, mix-strip sections, docs
- mix: independent strips process in parallel (rayon, native), parameter
  pushes cached, plugin sync/routing order cached per session structure;
  plugin and render benchmarks
- UI: Playback Engine, I/O Setup (bus rename/delete), Keyboard Shortcuts
  windows; clip gain line + info; folder open/close; tempo changes from the
  ruler; Inserts/Sends F-J, EQ curve and comments sections in the Mix window
- docs: control protocol and MCP guides

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:14:48 -04:00

29 lines
957 B
Rust

//! Per-plugin realtime cost: `cargo run --release -p soundcraft-dsp --example plugin_bench`
use std::time::Instant;
fn main() {
let sr = 48_000.0;
let secs = 10usize;
for info in soundcraft_dsp::plugins() {
let Some(mut p) = soundcraft_dsp::create(info.id) else { continue };
p.prepare(sr, 512, 2);
let mut io = vec![vec![0.0f32; 512]; 2];
let t0 = Instant::now();
let mut ph = 0.0f32;
for _ in 0..(secs * 48_000 / 512) {
for c in io.iter_mut() {
for x in c.iter_mut() {
ph += 0.031;
*x = ph.sin() * 0.3;
}
}
if info.is_instrument {
p.note_on(0, 60, 100);
}
p.process(&mut io, 512);
}
let el = t0.elapsed().as_secs_f64();
println!("{:<20} {:>7.3}% of one core (stereo, 48 kHz)", info.id, el / secs as f64 * 100.0);
}
}