Skip to main content
Glama

Learn control (MIDI/OSC learn)

learn_control

Take a snapshot of all input channels, then wiggle a hardware control to auto-bind its channel to a parameter with scale and offset.

Instructions

EXPERIMENTAL two-step 'MIDI learn'. Call once with mode:'snapshot' (controls at rest) to record every channel of an input CHOP (a midiin/oscin CHOP or a Null fed by one); then wiggle one hardware knob/fader and call again with mode:'bind' — it diffs against the snapshot, finds the channel that moved the most, and binds your target parameter to it by expression (with optional scale/offset). The snapshot is kept in the parent COMP's storage between the two calls. This is live/stateful: verify the matched channel in the report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYessnapshot: record the current value of every channel of source_chop. bind: re-read source_chop, find the channel that moved the most since the snapshot, and bind target to it. Call snapshot first (controls at rest), wiggle one hardware control, then call bind.
source_chopYesAbsolute path of the input CHOP carrying the hardware controls (e.g. a midiin/oscin CHOP or a Null fed by one).
targetNoParameter to drive, written as 'nodePath.parName' (e.g. '/project1/sys/transform1.scale'). Required for mode:'bind'; switched to expression mode so it tracks the matched channel live.
scaleNoMultiply the matched channel value (mapping gain).
offsetNoAdd to the scaled value (mapping offset).
min_deltaNomode:'bind' minimum NORMALIZED movement (default 0.05). The winning channel's delta is normalized by max(|old|, |new|, epsilon) — a unit-free relative change — so a 0–127 MIDI CC and a 0–1 OSC float compare fairly. If the top channel moved less than this, nothing is bound and you're told to wiggle the control harder. Raise it to reject controller jitter; lower it for very small/slow knobs.
parent_pathNoCOMP whose storage persists the snapshot between the snapshot and bind calls (defaults to /project1)./project1
Behavior5/5

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

The description goes beyond the annotations by explaining that the tool is experimental, stateful (snapshot stored in parent COMP's storage), and performs live diffs between calls. It warns that the agent should verify the matched channel in the report, adding important behavioral context not captured by readOnlyHint=false or destructiveHint=false.

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 description is a single paragraph that packs necessary detail without superfluous text. It front-loads the experimental nature and two-step process. While it's effective, a slightly more structured format (e.g., bullet points for steps) could improve clarity, but it remains appropriately sized for the complexity.

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?

Given 7 parameters with 100% schema coverage and no output schema, the description covers the core behavioral aspects of the two-step process. It explains the stateful interaction and the min_delta constraint. However, it lacks details about the return value/report structure, which would help an agent verify success. This is a minor gap.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds value by explaining the two-step process and elaborating on min_delta's normalization for fair comparison between MIDI and OSC values. It doesn't repeat all schema details but enriches understanding of how parameters interact.

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?

The description clearly states the tool's purpose: a two-step MIDI/OSC learn process that records a snapshot of channels and then binds a parameter to the channel that moved. It specifically mentions the two modes ('snapshot' and 'bind') and distinguishes itself from sibling tools like 'bind_to_channel' by describing the diff-based channel detection.

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?

The description provides explicit, step-by-step usage instructions: call snapshot first with controls at rest, wiggle a hardware control, then call bind. It also explains the mode parameter choices and the prerequisite ordering. This is comprehensive guidance for using the tool correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server