Describing a device's settings in SyntHub's format
SyntHub holds a catalogue of devices that any agent can read. When the settings of a device are missing, the person who owns it can complete them: you record what each setting is, write it in the Open Synth Descriptors format (version 0.7, documented on the /osd/ page) and send it. Every other person with that device then gets it.
What to record
For each setting of the device:
- The message that sets it: a Control Change (CC), an NRPN or RPN, or a SysEx parameter. Record its numbers, and the channel when it is fixed.
- The range: the lowest and highest value the message carries.
- The named values: when values have a name (a waveform, a filter type, a mode), each value with its name.
- The role: what the setting does, in the words every device shares (a path of parts ending in a setting, such as filter then cutoff). State the vocabulary in
role_vocabulary. A reader refuses a term the vocabulary does not hold: leave the role out when no term fits, never invent one. - The notes: what a person should know and the other fields cannot say (a limit, a doubt, a condition, a firmware difference).
For the device itself, record its MIDI identity: the maker's SysEx id, family and member from its reply to the Identity Request, and the names of its MIDI ports. Record the firmware you observed.
Record only what you have read or observed. A value you guessed stays out.
Where to find it
- The manual of the maker, above all its MIDI implementation chart and its parameter or SysEx tables.
- The device itself, listened to with osc-bridge:
detect_hardwarein learn mode (learn: true) gives its identity reply, ports and the controls the person moves; through the hosted server's relay,relay_listenshows what each moved control sends.
Never send a SysEx message that can overwrite the memory of the device without the person's explicit agreement.
Credit where the facts come from: the maker and its manual, with the address of the document and its licence (NOASSERTION when it states none). Never copy the code or the files of another program.
How to write it
A driver is one JSON document. Here is a whole example, with a CC, an NRPN and a SysEx setting:
{
"$schema": "https://w3id.org/osd/0.7/device.schema.json",
"role_vocabulary": "2",
"device": { "name": "Wavebox", "vendor": "Examplecraft", "kind": "hardware", "osc_prefix": "/wavebox" },
"identity": {
"manufacturerId": [125],
"family": [1, 0],
"member": [2, 0],
"ports": [{ "operator": "contains", "value": "Wavebox" }]
},
"sources": [
{
"type": "vendor-doc",
"url": "https://example.org/wavebox/midi-implementation.pdf",
"license": "NOASSERTION",
"author": "Examplecraft",
"firmware": "1.2"
}
],
"cc_params": {
"entries": [
{
"osc": "/filter/cutoff",
"title": "Cutoff",
"role": { "parts": [{ "part": "filter" }], "setting": "cutoff" },
"ways": [{ "ctrlType": "cc", "ctrlIndex": [74], "range": [0, 127] }],
"notes": "Acts on the sound while it plays."
},
{
"osc": "/oscillator/1/waveform",
"title": "Oscillator 1 waveform",
"role": { "parts": [{ "part": "oscillator", "index": 1 }], "setting": "waveform" },
"ways": [{ "ctrlType": "nrpn", "ctrlIndex": [0, 12], "value_bits": 7, "range": [0, 2] }],
"values": [
{ "value": 0, "title": "Sine" },
{ "value": 1, "title": "Sawtooth" },
{ "value": 2, "title": "Square" }
]
}
]
},
"params": {
"get_frame": [240, 125, 16, { "arg": "p" }, 247],
"set_frame": [240, 125, 17, { "arg": "p" }, { "arg": "val" }, 247],
"value_type": "u7",
"entries": [
{
"osc": "/filter/resonance",
"title": "Resonance",
"role": { "parts": [{ "part": "filter" }], "setting": "resonance" },
"ways": [{ "ctrlType": "sysex", "p": 5, "range": [0, 127] }],
"description": "Read and written by SysEx only."
}
]
}
}
device.nameanddevice.vendorare written as the maker writes them;device.osc_prefixstarts the device's addresses.- A CC, NRPN or RPN setting goes in
cc_params.entries, its messages inways(ctrlType,ctrlIndex: the CC number, or the MSB then LSB of the parameter;value_bitsis required for an NRPN or RPN). - A SysEx parameter goes in
params.entries;get_frameandset_framegive the maker's message shape once, byte by byte. - Named values go in
values. Notes go innoteson acc_paramsentry and indescriptionon aparamsentry. sourcessays where the data comes from:type,url,license(an SPDX expression), and thefirmwaredocumented.
Learning what a control sends
report_mapping records what one moved control really sends, one control at a time: its CC, NRPN or note, named by the driver's address or, when the sheet lacks it, by its name on the front panel (label). On a device that has a sheet, the mappings learned this way are put into the sheet with submit_fix (list_fixes gives its base); a correction is published once three signed-in people validate it. The range, the named values, the role and the notes of a setting are sent either in a whole driver with submit_driver or in a correction of the sheet with submit_fix.
Sending it
Writing needs an identifier. You get it by yourself, with no person's gesture; if your connection already uses one, go straight to sending.
- Ask the server this MCP connection reaches for a challenge:
GET /v1/access/challengereturnschallenge,bitsanddeliver. - Find a decimal integer, the nonce, such that the SHA-256 of
<challenge>:<nonce>starts withbitszero bits. The challenge is bound to your address, works once and lasts ten minutes. POST /v1/access/identifierwith the JSON{"challenge": "…", "nonce": "…"}(both as text) returnsidandmcp_path.- Present it with your calls: connect to
mcp_path(/u/<id>/mcp) in place of/mcp, or send the headerX-Synthub-Id: <id>.
Without a challenge to solve: an initialize without an identifier also proposes one, in its X-Synthub-Id header and its instructions, which you present the same way. Present it in the address or the header: a user_id argument is not enough.
Then send: a driver with submit_driver (driver, the document; source, where the mapping comes from, in words; firmware), or a correction of a sheet with submit_fix (below).
A device that already has a sheet
Two ways add to it:
submit_fixchanges the present sheet itself (it adds, for example, the range or the role of a setting), once three signed-in people validate the correction. It is the only way to change a document that people have corrected.submit_driverpublishes a driver beside the present sheet, without changing it and without waiting for any validation: a whole driver, which carries its own sources and their licences.
A correction, with submit_fix
Send:
device: the device of the sheet;base: the ETag of the sheet you read, whichlist_fixesreturns;sheet: an extract of the sheet that holds what you correct, where each setting is recognised by itsosc. A field is sent whole; an absent field stays unchanged.
The sources you send change nothing. The values take the licence of the corrected document and are credited to the person's public pseudonym: the person gives them under that licence, so get their agreement first. Put in note the address and the licence of the manual you read: they are kept with the correction and do not appear among the sources of the sheet.
A driver beside the sheet, with submit_driver
For submit_driver, send a whole driver, not only what was missing, without the device argument:
- keep the same
device.vendor,device.nameanddevice.osc_prefixas the sheet; - give the firmware you observed;
- take over the facts already known, read with
list_routesorexport_device(the driver file itself is at/api/v1/devices/<id>.jsonon the same server), with their sources and licences; - add your own source.
This driver becomes an agent-contributed variant, published as "not reviewed". The service does not merge it with the present sheet and does not change that sheet. Sending again to the same identifier writes its next version. A document that people have corrected changes by corrections alone: use submit_fix.
A device without a sheet
First the person shares the device's fingerprint, after their agreement, with the maker, the model and the firmware that they confirm:
- with osc-bridge:
detect_hardwarein learn mode (learn: true) withshare_fingerprint(the port),vendor,modelandfirmware; - without osc-bridge: the person does it on the /connect/ page.
Then record the controls with report_mapping, device set to the maker and model as shared, with firmware; and send the driver with submit_driver, with the device and firmware arguments, device.name naming that device. This first driver waits for its review before it is published.
If you cannot have the person do one of these two gestures (the agreement and confirmation, or the sharing itself), ask them to do it, and do not send the driver without device.