crosspad_midi
Send MIDI notes, SysEx frames, echo timing tests, or routing queries to a CrossPad device or PC simulator to validate hardware and simulated workflows.
Instructions
[PC sim | ESP HW] Send MIDI to a CrossPad board (target='device', through the crosspad-hil daemon) or to the running PC simulator (target='sim', over its TCP remote control). Device actions: note (on/off), sysex (one raw frame 'F0 7D … F7', manufacturer 0x7D is CrossPad's), echo_rtt (n echo frames, returns {sent, received, lost, rtt_ms:{p50,p90,max}}), query_route (the audio routing state, same as crosspad_audio_route action='query'). role='esp' (default) is the ESP's native USB MIDI, the only port that answers queries; role='stm' is the STM32 bridge port. Sim: type 'note_on'|'note_off' need note; 'cc' and 'program_change' are not implemented by the sim and fail fast. USB profile switches go through crosspad_usb_mode, not a hand-built 0x1B frame.
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": {
"target": "<target>"
},
"name": "crosspad_midi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | device/echo_rtt: how many echo frames to send (default 20). | |
| on | No | device/note: true = note on, false = note off. | |
| vel | No | device/note: velocity 0-127 (default 100, applied by the daemon). | |
| note | No | MIDI note number 0-127. | |
| role | No | Which MIDI endpoint: 'esp' (default) = the ESP's native USB MIDI, the only port that answers queries; 'stm' = the STM32 bridge port ('CrossPad MIDI+Serial'). | |
| type | No | target='sim': event type. note_on/note_off need `note`; cc and program_change are not implemented by the sim and fail fast. | |
| frame | No | Raw SysEx frame as hex bytes, e.g. 'F0 7D 1D 10 F7'. Manufacturer 0x7D is CrossPad's; the daemon refuses the host-denylisted frames. | |
| value | No | sim/cc: controller value. | |
| action | No | target='device': note = one note on/off; sysex = one raw frame; echo_rtt = round-trip timing over SysEx echo; query_route = read the audio routing state. | |
| cc_num | No | sim/cc: controller number. | |
| device | No | Device id (dev_xxxx) or one of its port paths; omit when exactly one CrossPad is connected. | |
| target | Yes | 'device' = a connected CrossPad through the crosspad-hil daemon; 'sim' = the running PC simulator. Required — no default. | |
| channel | No | MIDI channel 0-15 (default 0). | |
| program | No | sim/program_change: program number. | |
| velocity | No | sim: velocity (default 127 for note_on, 0 for note_off). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| docs | No | ||
| hint | No | ||
| next | No | ||
| role | No | ||
| tool | No | ||
| type | No | ||
| error | No | ||
| action | No | ||
| device | No | ||
| notice | No | ||
| result | No | ||
| target | No | ||
| channel | No | ||
| details | No | ||
| outcome | No | ||
| success | Yes | ||
| elicitation | No | ||
| confirmation | No |