Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Generate test signals, clicks or room impulse responses

audio_generate
Destructive

Synthesize tones, chirps, white or pink noise, metronome clicks, silence, synthetic room impulse responses, or audio from exported feature matrices for testing, playback, and convolution reverb.

Instructions

Synthesizes audio from scratch: a sine tone, a frequency sweep (chirp), white or pink noise (seeded), a metronome click track with accented downbeats at a BPM and time signature, silence, a synthetic room impulse response from room size, absorption or wall material, source and listener positions (or imitating the room of a recording with 'like'), or audio rebuilt from a feature matrix exported by audio_features (fromFeatures). The default sample rate is 48000 Hz and the file is mono. Use it for test signals, a click to play along to, or an IR for convolution reverb. Do not use it to render MIDI or a project (use project_render) or to process existing audio (use audio_edit or audio_process). Example: {"kind": "click", "tempo_bpm": 100, "time_signature": {"numerator": 3, "denominator": 4}, "bar_count": 8}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>"
    },
    "name": "audio_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesSignal: tone (sine), chirp (sweep), noise (white or pink), click (metronome with accented downbeats), silence, roomIr (synthetic room impulse response) or fromFeatures (audio rebuilt from a feature matrix saved by audio_features with aggregate 'export').
likeNoroomIr: a recording made in the room to imitate; its size and absorption are estimated from the audio. Replaces length_m, width_m, height_m, absorption and material_preset; 'source' and 'listener' still place the positions.
seedNonoise, roomIr: random seed 0..4294967295 (default 0); the same seed gives the same audio.
colorNonoise: 'white' (default) or 'pink' (1/f).
gammaNofromFeatures vqt: bandwidth offset of the transform (default: the library's).
n_fftNofromFeatures stft / mel / mfcc: FFT size of the features (stft default: (rows - 1) * 2; mel and mfcc default 2048).
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
formatNoOutput format: wav, flac, ogg (Vorbis), opus, mp3, aiff, or m4a (AAC, needs ffmpeg). Default: the explicit output's extension, else the input's format, else wav.
linearNochirp: linear sweep when true, logarithmic when false (default).
n_iterNofromFeatures: phase-reconstruction iterations; more is smoother and slower (default 32).
n_melsNofromFeatures mfcc: number of mel bins the coefficients came from (default 128).
outputNoOutput file path. Default: an auto-named new file '<input stem>.<tool>.<ext>' in the output directory.
sourceNoroomIr: [x, y, z] of the sound source in meters, inside the room (default: the same relative spot as in the default room).
dry_runNoReport the resolved output plan and paths without processing or writing.
fmax_hzNochirp: end frequency in Hz (default 20000), below Nyquist.
fmin_hzNochirp: start frequency in Hz (default 20). fromFeatures mel / mfcc / cqt / vqt: lowest frequency of the features (default 0 for mel and mfcc, 32.7 for cqt and vqt).
qualityNoLossy encoder setting for ogg/opus/mp3, 0..1 (soundfile compression_level, variable bit rate): 0 = best quality, 1 = smallest file. On 48 kHz stereo music, mp3 0 / 0.3 / 1 is about 192 / 120 / 55 kbit/s (no 320 kbit/s setting), ogg about 330 / 150 / 45 and opus about 510 / 360 / 13. Default 0.3. Excludes bit_depth.
width_mNoroomIr: room width in meters (default 5).
height_mNoroomIr: room height in meters (default 3).
length_mNoroomIr: room length in meters (default 7).
listenerNoroomIr: [x, y, z] of the listener in meters, inside the room (default: the same relative spot as in the default room).
accent_dbNoclick: extra level in dB on the first beat of each bar (default 6).
amplitudeNotone, chirp, noise: peak level 0..1 (default 0.5).
bar_countNoclick: number of bars (default: fill duration_sec).
bit_depthNoPCM bit depth for wav/flac/aiff: 16, 24 or 'float32' (32-bit float; not flac). Default: the input's depth, else 24. Excludes quality.
overwriteNoReplace an existing output file. Without it an existing file is an error.
tempo_bpmNoclick: tempo in quarter notes per minute (default 120).
absorptionNoroomIr: average wall absorption coefficient (default 0.2); lower is more reverberant.
hop_lengthNofromFeatures: hop of the features in samples (default: n_fft / 4 for stft, mel and mfcc; 512 for cqt and vqt).
sample_rateNoSample rate in Hz of the generated audio and the file (default 48000). For fromFeatures: the rate the features were computed at.
duration_secNoLength in seconds, at least 0.001. Required for every kind except click (default: 'bar_count' bars), roomIr (default: the response's natural length; a given value trims or zero-pads it) and fromFeatures (the matrix sets the length).
feature_kindNofromFeatures: what the matrix is: 'stft' (magnitude spectrogram), 'mel' (mel power spectrogram), 'mfcc', 'cqt' or 'vqt' (magnitude).
frequency_hzNotone: frequency in Hz (default 440), below Nyquist.
features_pathNofromFeatures: a .npy file with a 2-D float matrix (rows x frames), as audio_features writes with aggregate 'export'.
time_signatureNoclick: the meter; one click per beat unit, accented on each downbeat, so 6/8 clicks eighth notes in bars of six (default 4/4).
bins_per_octaveNofromFeatures cqt / vqt: bins per octave of the features (default 12).
material_presetNoroomIr: wall material whose frequency-dependent absorption replaces 'absorption': none (default), concrete, wood, curtain, carpet or glass.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the mutation profile is known. The description adds genuinely new information — default 48000 Hz, mono output, and seed-determined reproducibility for noise/roomIr — but does not warn about replacing existing files or about the ffmpeg dependency for m4a, both of which matter for a destructive writer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The kind enumeration is front-loaded, followed by use cases, exclusions and an example — a sound order with no filler. It is a long run-on first sentence, however, and the trailing example only covers the click path, leaving six other kinds unillustrated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 37-parameter, kind-branching generator with no output schema, the description conveys the branching model, per-kind defaults and the routing rules an agent needs. It stops short of explaining what the tool returns (file path, summary fields) or how the 'like' and fromFeatures paths interact with the file system.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter already documents its own defaults and valid ranges, so the baseline applies. The description adds the mono/sample-rate convention and one worked example that shows how kind-conditional params combine, which is useful but limited against 37 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ("Synthesizes") and then enumerates every supported signal kind — sine tone, chirp, white/pink noise, metronome click, silence, synthetic room IR, and fromFeatures reconstruction — with the parameters that shape each. An agent can distinguish this from audio_edit/audio_process/project_render on the strength of the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the three intended use cases (test signals, a click to play along to, an IR for convolution reverb) and then states exclusions with the correct alternative for each: MIDI/project rendering goes to project_render, existing-audio work goes to audio_edit or audio_process. This is the when/when-not/alternative pattern.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.