Skip to main content

Module exec

Module exec 

Source
Expand description

The executor: runs one op with resolved args, handling batches, --mix, fx chains, dry runs, idempotent outputs, output encoding overrides, and sidecars. The CLI, the pipeline runner, and the MCP server all go through Runtime::invoke.

Structs§

Invocation
One request to run a command.
Outcome
What invoke returns: the envelope plus any bytes destined for stdout (-o -).
Runtime

Functions§

apply_spec
Run a Transform spec with generic dry/wet handling.
blend
dry + m·(wet − dry), matching lengths and channels to the wet signal.
build_args
Build Args for a named op from pairs (defaults applied), for composite ops.
chain_stages
Parse fx stages from --fx strings (and/or chain JSON from pipelines).
conform_output
Apply --sample-rate and --channels overrides.
default_ext
Default output extension: same as the input when this build can encode it, else wav.
run_nested
Run any registered op as a nested step, with its own inputs and output path. Returns the op’s result value and the outputs it wrote. Warnings and models are merged.
run_transform
Convenience for composite ops: run_transform(ctx, "compress", &[("ratio", "1.5:1")], buf).
run_transform_pairs
Run a named transform with raw pairs (used by fx chains, pipelines, and composite ops).
stage_from_json
{ "op": "compress", "preset": "vocal", "ratio": "4:1" } or {op, args: {...}}.

Type Aliases§

PresetLookup
Looks up user presets: (command, preset name) → values.