API & MCP
Everything a person can do on Click Track Maker (Metronome WAV & MIDI), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://tonegridmetronomeclick.usefulweb.app/api/v1/calculate– run Click Track Maker (Metronome WAV & MIDI)GET https://tonegridmetronomeclick.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Click Track Maker (Metronome WAV & MIDI)
Write the sections of a song — bars, meter, tempo, tempo changes, accent groups, subdivisions and a polyrhythm layer — and get a sample-accurate metronome click track as a WAV file and a MIDI file, with an optional count-in, gap click (muted bars to test your inner time) and seeded random muting. The same engine as the metronome in the Tonegrid app.
| Field | Type | Default | Description |
|---|---|---|---|
map | textarea | "Intro: 4 bars 4/4 at 96\nVerse: 8 bars 4/4 at 96\nBridge: 4 bars 7/8 at 168 gro | Song map (one section per line). Each line: optional name and colon, number of bars, meter, "at" tempo. Optional: "to" end tempo (changes bar by bar), "groups 2+2+3" (accents), "sub 2" (eighths), "sub 3" (triplets), "sub 4" (sixteenths), "poly 3" (three evenly spaced clicks per bar). Tempo counts the lower number of the meter: 7/8 at 168 = 168 eighths per minute. |
sound | select (wood, beep, soft) | "wood" | Click sound |
countIn | integer | 1 | Count-in bars |
gapPlay | integer | 0 | Gap click: bars with clicks. With “bars muted” above 0: play this many bars, then mute, and repeat. 0 = off. |
gapMute | integer | 0 | Gap click: bars muted |
randomMute | number | 0 | Random mute (% of bars). Each bar after the first is muted with this chance. The seed fixes which bars. |
seed | text | "practice" | Random seed |
Example request
Song with a 7/8 bridge and a slowing outro
curl -X POST https://tonegridmetronomeclick.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"map":"Intro: 4 bars 4/4 at 96\nVerse: 8 bars 4/4 at 96\nBridge: 4 bars 7/8 at 168 groups 2+2+3\nOutro: 4 bars 4/4 at 96 to 80","sound":"wood","countIn":1,"gapPlay":0,"gapMute":0,"randomMute":0,"seed":"practice"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://tonegridmetronomeclick.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
tonegrid_metronome_click - Local stdio connector:
node src/mcp-stdio.ts --tool=tonegrid-metronome-click
{
"mcpServers": {
"tonegrid-metronome-click": { "type": "http", "url": "https://tonegridmetronomeclick.usefulweb.app/mcp" }
}
}