Skip to main content
Glama

Learn control (MIDI/OSC learn)

learn_control

Learn a hardware control's channel by taking a snapshot of all input channels, then wiggling the control. Binds the target parameter to the moved channel with optional 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
Behavior4/5

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

The description discloses the stateful and experimental nature, including the snapshot storage in parent COMP and the live binding. Annotations confirm readOnlyHint=false and openWorldHint=true, and the description adds context about the two-step process and potential side effects. No contradiction exists, but it could mention more about the expression mode switching.

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

Conciseness5/5

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

The description is a single focused paragraph that front-loads the core concept and efficiently covers all necessary details without redundancy. Every sentence contributes to understanding the tool's procedure and requirements.

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 the tool's complexity (two-step stateful process) and the absence of an output schema, the description adequately explains the workflow and parameter semantics. It mentions a report from the tool, but does not detail its structure or error cases, which would make it more complete.

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 coverage is 100%, so baseline is 3. The description adds significant value by explaining the overall workflow, the min_delta normalization logic, and how parameters interact. It goes beyond the schema descriptions, providing practical usage context.

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 it's an experimental two-step 'MIDI learn' process. It distinguishes itself from sibling tools like 'bind_to_channel' or 'create_midi_map' by specifying the snapshot and bind modes, making its purpose very specific and actionable.

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

Usage Guidelines4/5

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

The description explicitly instructs the user to call with mode:'snapshot' first, then wiggle a control and call with mode:'bind'. It also details the required source CHOP and the stateful storage. However, it does not explicitly state when to avoid using this tool or compare it to alternative approaches, so it lacks full exclusion guidance.

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