Skip to main content
Glama

Learn control (MIDI/OSC learn)

learn_control

Bind a hardware knob or fader to any parameter by taking a snapshot, moving the control, then auto-detecting the moved channel and linking it via expression with optional scaling.

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.
scaleNoMultiply the matched channel value (mapping gain).
offsetNoAdd to the scaled value (mapping offset).
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.
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
source_chopYesAbsolute path of the input CHOP carrying the hardware controls (e.g. a midiin/oscin CHOP or a Null fed by one).
Behavior5/5

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

Annotations only indicate non-read-only, non-destructive, open-world behavior. The description adds significant behavioral context: it's stateful (snapshot stored in parent COMP), requires two calls, binds via expression, and is experimental. It also warns to verify the matched channel, which is important for correctness. No contradiction with annotations.

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 dense paragraph that front-loads the experimental nature and core purpose. Every sentence is informative, but it's somewhat run-on and could be broken into steps for easier parsing. Still, no wasted words.

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

Completeness5/5

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

For a complex, stateful tool with no output schema, the description covers the workflow, statefulness, prerequisites, and a sanity check (verify channel). It also references failure handling (min_delta warning) indirectly. The description is sufficiently complete for an agent to invoke it correctly.

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 description coverage is 100%, so baseline is 3. The overall description does not add parameter-specific semantics beyond what the schema already provides; it merely mentions 'optional scale/offset' and references the source CHOP and target generically, which are already detailed in the schema.

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 a specific two-step process ('snapshot' then 'bind') with precise verbs: record, diff, find, bind. It identifies the resource (input CHOP, target parameter) and distinguishes itself from typical MIDI learn tools by the stateful snapshot approach and experimental status.

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?

Provides explicit step-by-step instructions: call with mode:'snapshot' first, wiggle a control, then call with mode:'bind'. It clarifies prerequisites (input CHOP, controls at rest) and warns to verify the matched channel. However, it doesn't mention alternatives or when not to use this tool, so it's clear context without explicit exclusions.

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/lucasmaher-hash/touch-designer-mcp'

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