بنقرة واحدة
daw-master-batch-processor
Batch audio processor — apply daw-master pipelines to directories of files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Batch audio processor — apply daw-master pipelines to directories of files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | daw-master:batch-processor |
| description | Batch audio processor — apply daw-master pipelines to directories of files |
| version | 0.1.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["audio","batch","parallel","orchestration","pipeline"],"related_skills":["daw-master:sox-engine","daw-master:ffmpeg-audio","daw-master:dawdreamer","daw-master:rubber-band-engine"]}} |
Orchestrates daw-master skill engines to process entire directories of audio files.
This skill provides the "batch" layer on top of individual transform skills, handling:
**/*.wav, **/*.mp3)# Check
python -c "import daw_master.batch_processor; print('OK')"
No extra installation — it uses the installed daw-master skills. Ensure at least one engine is available:
# Recommended: install SoX (fast, always available)
sudo apt install sox
# Or for advanced processing
pip install dawdreamer
from daw_master.batch_processor import process_directory
# Process all WAV files under samples/ with a normalize + trim pipeline
stats = process_directory(
input_dir="samples/",
output_dir="processed/",
pipeline=[
{"op": "normalize", "peak": -0.1},
{"op": "trim", "start": 0, "length": 30}
],
engine="sox", # sox | ffmpeg | dawdreamer | rubberband
pattern="**/*.wav", # glob pattern relative to input_dir
overwrite=False, # skip existing outputs
max_workers=4, # parallel jobs (1 = serial)
manifest_path="batch_manifest.json" # optional per-file report
)
print(f"Processed {stats['processed']}/{stats['total']}, "
f"skipped {stats['skipped']}, failed {stats['failed']}")
process_directory
input_dir – directory tree to scanoutput_dir – where to write processed files (mirrors input structure)pipeline – list of op dicts, exactly as passed to the underlying transform skillengine – which daw-master engine to use. Choices:
"sox" or "sox-engine" — fastest, most portable"ffmpeg" or "ffmpeg-audio" — codec support, EBU R128"dawdreamer" — VST plugins, multi-track, high-quality effects"rubberband" or "rubberband-engine" — pristine time-stretch & pitch-shiftpattern – glob for which files to process; default "**/*.wav" matches recursivelydry_run – if True, log what would happen without touching filesoverwrite – if False, skip files where output already existsmax_workers – number of parallel processes; default 4. Increase for I/O-bound workloads on SSDs, decrease on HDDsmanifest_path – write a JSON manifest recording per-file results and errorsprocess_file (lower-level): Process a single file; returns dict {success, input, output, error?, skipped?}.
Success summary:
{
"processed": 42, # successfully written
"skipped": 5, # already existed when overwrite=False
"failed": 2, # errors encountered
"total": 49, # matched by glob
"errors": [ # only present if failed > 0
{"file": "path/to/bad.wav", "error": "..."},
...
]
}
If manifest_path is set, an additional JSON file is written with full per-file records.
from daw_master.batch_processor import process_directory
stats = process_directory(
input_dir="~/sample-library/",
output_dir="~/sample-library-normalized/",
pipeline=[{"op": "normalize", "peak": -0.1}],
engine="sox",
pattern="**/*.wav",
max_workers=8
)
print(f"Done: {stats}")
from daw_master.batch_processor import process_directory
stats = process_directory(
input_dir="stems/vocals_raw/",
output_dir="stems/vocals_processed/",
pipeline=[
{"op": "load_vst", "path": "/usr/local/vst/ValhallaRoom.vst3"},
{"op": "set_param", "plugin_idx": 0, "param": "RoomSize", "value": 0.7},
{"op": "set_param", "plugin_idx": 0, "param": "Wet", "value": 0.4},
{"op": "normalize"},
],
engine="dawdreamer",
pattern="**/*.wav",
overwrite=False
)
stats = process_directory(
input_dir="raw_recordings/",
output_dir="cleaned/",
pipeline=[
{"op": "highpass", "cutoff": 80}, # remove rumble
{"op": "time_stretch", "factor": 1.0}, # placeholder — adjust per file after analysis
{"op": "normalize", "peak": -0.5},
],
engine="ffmpeg-audio",
pattern="**/*.flac"
)
stats = process_directory(
input_dir="samples/",
output_dir="out/",
pipeline=[{"op": "gain", "amount_db": 3}],
engine="sox",
manifest_path="out/manifest.json"
)
# Later: inspect which files succeeded/failed
import json
m = json.load(open("out/manifest.json"))
for rec in m["files"]:
if not rec["success"]:
print(f"FAILED: {rec['input']} → {rec.get('error')}")
stats = process_directory(
input_dir="big_library/",
output_dir="out/",
pipeline=[{"op": "normalize"}],
engine="sox",
pattern="**/*.wav",
dry_run=True # prints plan, no files written
)
Output:
[DRY-RUN] Process 1247 files with engine 'sox'
Input: /path/big_library
Output: /path/out
Pattern: **/*.wav
Pipeline: [
{"op": "normalize", "peak": -0.1}
]
max_workers=1 — serial (simpler debugging, predictable ordering)max_workers=4 (default) — balanced parallelismmax_workers=multiprocessing.cpu_count() — CPU-bound engines like dawdreamerParallel execution uses concurrent.futures.ProcessPoolExecutor. Each worker process gets its own engine instance, which is safe for SoX/FFmpeg/DawDreamer (all spawn external processes).
Failed files are collected in the errors list; processing continues for all files. A non-zero failed count does not raise an exception — check stats["failed"] after the call. Per-file error messages include the underlying skill's error string.
To fail fast on first error, inspect immediately and raise:
stats = process_directory(...)
if stats["failed"] > 0:
raise RuntimeError(f"Batch failed: {stats['failed']} files had errors")
overwrite=False means already-existing outputs are skipped.output_dir and any subdirectories are created automatically.Use skill daw-master:batch-processor process_directory
input_dir="samples/"
output_dir="processed/"
pipeline=[{"op": "normalize"}]
engine="sox"
Or from Python:
from daw_master.batch_processor import process_directory
process_directory(...)
This skill is the batch execution layer. Compose it upstream with analysis:
# 1. Analyze directory to decide pipeline
from daw_master.audio_analyzer import extract_batch
features = extract_batch("samples/", output_format="json")
# 2. Build conditional pipeline per file
# (see example 4 in the docstring of pipeline.py for full pattern)
# 3. Apply to entire directory
process_directory(
input_dir="samples/",
output_dir="normalized/",
pipeline=[{"op": "normalize"}],
engine="sox"
)
max_workers to 1–2 when using the dawdreamer engine.process_directory by setting overwrite=False to resume interrupted batches..json files for reproducible workflows.Use when working with the Sleepy Circuits Hypno 2 video synthesizer/resampler — 2-channel video mixer/looper, shader engine, MIDI CC mapping, CV/modulation, sampler. Firmware v0.0.163+.
Hardware instrument skills — reference guides for each device in the music studio setup.
GLSL fragment shader techniques adapted for the Hypno 2 video synthesizer — single-pass generative visuals and video effects optimized for Raspberry Pi 5, 5-uniform limit, CC-mapped parameters
Korg KAOSS DJ — USB DJ controller with X-Y touchpad, Serato DJ Intro integration, KAOSS effects, EQ, crossfader, and MIDI on Linux
Korg KAOSSILATOR dynamic phrase synthesizer (2007 model) — X-Y touchpad, 100 programs, gate arpeggiator, phrase loop recording, USB MIDI on Linux
Use when working with the Korg kaossilator 2S dynamic phrase synthesizer — X-Y touchpad, 150 programs, 50 arp patterns, loop recording, audio player, master recorder, microSD storage, and USB MIDI on Linux.