
2026/03/02 0:52
**Show HN:** *エージェント用オーディオ・ツールキット*
RSS: https://news.ycombinator.com/rss
要約▶
Japanese Translation:
Summary:
SAS Audio Processor は、コマンドラインから実行できる25のオーディオ処理ユーティリティをまとめたツールキットであり、AI支援によるコーディングや音楽制作のために DeclarAgent の Machine‑Code Production (MCP) ワークフローへ統合できます。各ツールは CLI サブコマンドとして表現され、WAV ファイルを受け取り JSON 形式で結果を出力します。
master-track のような複合コマンドにより、ユーザーは一度に複数の操作をチェーンできます。このプロセッサは "sas-audio" エントリを追加して MCP サーバーへ接続し、DeclarAgent プランを指すことで Claude Code がドラムループを自動的に分析する例などが可能です。macOS 上で pyinstaller を使用して構築され、事前ビルド済みのバイナリとして配布されるため簡単にインストールできます。現在のリリースは WAV ファイルのみをサポートし macOS 専用ですが、将来的にはより多くのファイル形式やクロスプラットフォームのバイナリが追加される可能性があります。これにより、音声解析とマスタリングをコードエディタや AI アシスタントに直接埋め込みたい開発者やミュージシャンにとって有益であり、サウンドデザイン、ポッドキャスト編集、自動化された音楽制作ワークフローのスピードアップにつながります。
Summary Skeleton
What the text is mainly trying to say (main message)
SAS Audio Processor は、DeclarAgent を通じて AI 支援によるコーディングと音楽制作のために MCP ツールとして使用できる 25 のオーディオ処理ツールの集合です。
Evidence / reasoning (why this is said)
プロセッサは各ツールを CLI サブコマンドで公開し、WAV ファイルを受け取り JSON を返すほか、
master-track のような複合コマンドで操作をチェーンできる点が説明されています。
Related cases / background (context, past events, surrounding info)
MCP サーバーに
"sas-audio" エントリを追加して DeclarAgent プランへ接続し、Claude Code がドラムループを分析する例などで統合されていること。macOS 上で pyinstaller を使って構築し、事前ビルド済みバイナリとして配布されている点が背景です。
What may happen next (future developments / projections written in the text)
将来のリリースではサポートするファイル形式を拡張したりクロスプラットフォームのバイナリを追加する可能性がありますが、現時点では WAV のみで macOS 専用です。
What impacts this could have (users / companies / industry)
開発者やミュージシャンはコードエディタや AI アシスタント内で音声解析とマスタリングを迅速に行うことができ、サウンドデザイン、ポッドキャスト編集、自動化された音楽制作ワークフローの効率化につながります。
本文
SAS Audio Processor(サス・オーディオ・プロセッサ)
「Signals & Sorcery(シグナルズ&ソーサリー)」という音楽制作アプリケーションのコンポーネント。
25 個のオーディオ処理ツール(トリム、ノーマライズ、コンプレッション、EQ、リバーブ、ピッチシフト、タイムストレッチ、キー検出、MIDI抽出など)を DeclarAgent 経由で MCP ツールとして公開しています。
何が得られるか
| カテゴリ | ツール |
|---|---|
| Processing | trim, time‑stretch, convert, mono, silence‑remove, split‑bars |
| Effects | normalize, gain, compress, eq, reverb, limit, filter, pitch‑shift |
| Analysis | analyze, detect‑key, loudness, onset‑detect |
| MIDI | melody‑to‑midi |
| Composite | master‑track, sample‑prep, tempo‑match, full‑analysis, melody‑extract |
すべてのツールは WAV ファイルを入力として受け取り、構造化された JSON を出力します。
クイックスタート(Claude Code)
-
DeclarAgent のインストール
go install github.com/stevehiehn/declaragent@latest -
sas‑audio‑processor のインストール
ソースから:
git clone https://github.com/stevehiehn/sas-audio-processor.git cd sas-audio-processor python3 -m venv venv && source venv/bin/activate pip install -r requirements.txt && pip install -e .あるいは、事前にビルドしたバイナリ(macOS のみ):
./build.sh # バイナリ: dist/sas-processor/sas-processor -
MCP 設定の追加
に追記:~/.claude/settings.json{ "mcpServers": { "sas-audio": { "command": "declaragent", "args": ["--plans-dir", "/path/to/sas-audio-processor/plans"] } } } -
使用例
You: Analyze this drum loop and tell me the BPM Claude: [calls analyze tool] The drum loop is at 128 BPM, 44100 Hz, stereo, 8.2 s long. You: Trim it to 4 bars and normalize to -14 LUFS Claude: [calls trim → normalize] Done — trimmed to 4 bars starting at the downbeat, normalized to -14 LUFS. You: Now master it Claude: [calls master‑track] Applied normalize → compress → limit chain. Output saved.
クイックスタート(その他の MCP クライアント)
-
Claude Desktop
に追記:claude_desktop_config.json{ "mcpServers": { "sas-audio": { "command": "declaragent", "args": ["--plans-dir", "/path/to/sas-audio-processor/plans"] } } } -
Cursor / Windsurf / Copilot
同じ MCP サーバー設定をエディタの MCP 設定に追加します。
コマンドと引数は同一で、ファイル位置のみ異なります。
動作概要
MCP Client (Claude Code, Claude Desktop 等) │ └─► DeclarAgent (plans ディレクトリ内の YAML を読み込み) │ └─► sas-processor <subcommand> --input … --output … │ └─► stdout: JSON 結果
plans/ 内の各 YAML ファイルは一つの MCP ツールを定義します。DeclarAgent はこれらのツールを MCP クライアントへ公開し、呼び出されると背後で
sas-processor CLI を実行します。
利用可能なツール
Processing(処理)
| Tool | Description |
|---|---|
| trim | ダウンビートを検出して指定バー数にオーディオをトリム |
| time‑stretch | ピッチを保ったままテンポを変更 |
| convert | サンプルレートと/またはビット深度を変換 |
| mono | ステレオをモノラルへ変換 |
| silence‑remove | 開始・終了の無音部分をトリム |
| split‑bars | オーディオを N バー単位で分割 |
Effects(エフェクト)
| Tool | Description |
|---|---|
| normalize | LUFS あるいはピークレベルへ正規化 |
| gain | dB 単位で音量変更 |
| compress | スレッショルド/比率/アタック/リリースを設定したダイナミクス圧縮 |
| eq | 周波数別パラメトリック EQ バンド(ブースト/カット) |
| reverb | アルゴリズム的リバーブ(部屋サイズ、ウェット/ドライ比) |
| limit | ブリックウォールリミッター |
| filter | ハイパスまたはローパスフィルタ |
| pitch‑shift | 半音単位でピッチシフト |
Analysis(解析)
| Tool | Description |
|---|---|
| analyze | BPM、再生時間、サンプルレート、チャンネル数を検出 |
| detect‑key | 音楽キーとモード(メジャー/マイナー)を判定 |
| loudness | 統合 LUFS とピーク dB を測定 |
| onset‑detect | 発生点/トランジェントの時間を検出 |
MIDI
| Tool | Description |
|---|---|
| melody‑to‑midi | モノフォニックメロディーを MIDI ファイルへ抽出 |
Composite(マルチステップ)
| Tool | Description |
|---|---|
| master‑track | normalize → compress → limit のチェーン適用 |
| sample‑prep | analyze → trim → normalize → convert を実行 |
| tempo‑match | analyze → time‑stretch で目標 BPM に合わせる |
| full‑analysis | analyze + detect‑key + loudness を統合 |
| melody‑extract | normalize → melody‑to‑midi |
CLI リファレンス
すべてのサブコマンドは行区切り JSON を stdout に出力し、エラーは stderr に JSON として送出します。
sas-processor <subcommand> [options]
ping
ヘルスチェック — バージョンとステータスを返す。
analyze
sas-processor analyze --input <file>
BPM、再生時間、サンプルレート、チャンネル数を返します。
trim
sas-processor trim --input <file> --output <file> --bpm <float> --bars <int> [--meter 4] [--verbose]
ダウンビートを検出し指定バー数にトリムします。
time‑stretch
sas-processor time-stretch --input <file> --output <file> --source-bpm <float> --target-bpm <float>
ピッチ保持でテンポ変更。
normalize
sas-processor normalize --input <file> --output <file> [--mode lufs|peak] [--target-lufs -14] [--target-peak -1]
gain
sas-processor gain --input <file> --output <file> --db <float>
mono
sas-processor mono --input <file> --output <file>
convert
sas-processor convert --input <file> --output <file> [--sample-rate <int>] [--bit-depth 16|24|32]
silence‑remove
sas-processor silence-remove --input <file> --output <file> [--top-db 30]
compress
sas-processor compress --input <file> --output <file> [--threshold -20] [--ratio 4] [--attack 1.0] [--release 100]
eq
sas-processor eq --input <file> --output <file> --freq <float> --gain-db <float> [--q 1.0]
reverb
sas-processor reverb --input <file> --output <file> [--room-size 0.5] [--damping 0.5] [--wet-level 0.33]
limit
sas-processor limit --input <file> --output <file> [--threshold -1]
filter
sas-processor filter --input <file> --output <file> --type highpass|lowpass --cutoff-hz <float>
pitch‑shift
sas-processor pitch-shift --input <file> --output <file> --semitones <float>
detect-key
sas-processor detect-key --input <file>
キー、モード(メジャー/マイナー)、信頼度スコアを返します。
loudness
sas-processor loudness --input <file>
統合 LUFS とピーク dB を返します。
onset‑detect
sas-processor onset-detect --input <file>
発生回数と秒単位の時間を返します。
split-bars
sas-processor split-bars --input <file> --output-dir <dir> --bpm <float> [--bars-per-chunk 1] [--meter 4]
melody‑to‑midi
sas-processor melody-to-midi --input <file> --output <file.mid>
ソースからビルド
前提条件
- macOS 10.15+
- Python 3.9+
手順
git clone https://github.com/stevehiehn/sas-audio-processor.git cd sas-audio-processor python3 -m venv venv && source venv/bin/activate pip install -r requirements.txt && pip install -e .
自己完結型バイナリ:
pyinstaller sas-processor.spec --clean --noconfirm # 出力先: dist/sas-processor/
クロスアーキテクチャビルド(Apple Silicon & Intel):
# Apple Silicon (ARM64) pyinstaller sas-processor.spec --clean --noconfirm mv dist/sas-processor dist/sas-processor-arm64 # Intel (x86_64) arch -x86_64 /bin/bash -c " python3 -m venv venv-x64 source venv-x64/bin/activate pip install -r requirements.txt pyinstaller sas-processor.spec --clean --noconfirm " mv dist/sas-processor dist/sas-processor-x86_64
テスト実行
source venv/bin/activate # 全テスト pytest tests/ -v # E2E サブコマンドテストのみ pytest tests/test_plans_e2e.py -v # カバレッジ付き pytest tests/ -v --cov=sas_processor
JSON 出力形式
すべてのサブコマンドは行区切り JSON を stdout に出力します。
Result (stdout)
{"type":"<subcommand>","success":true,"output":"/path/to/output.wav",…}
Progress Events(trim のみ、stdout)
{"type":"progress","stage":"loading","percent":0} {"type":"progress","stage":"detecting","percent":30} {"type":"progress","stage":"trimming","percent":60} {"type":"progress","stage":"complete","percent":100}
Errors (stderr)
{ "type":"error", "code":"FILE_NOT_FOUND", "message":"Input file not found: /path/to/file.wav", "severity":"fatal" }
制限事項
- WAV のみ – MP3、FLAC 等のフォーマットは非対応。
- バイナリビルドは macOS 限定(CLI は Python が動く環境ならどこでも使用可)。
- バイナリサイズは NumPy/Scipy/Librosa 依存で約 220 MB。
ライセンス: MIT