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

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.

Inputs of Click Track Maker (Metronome WAV & MIDI)
FieldTypeDefaultDescription
maptextarea"Intro: 4 bars 4/4 at 96\nVerse: 8 bars 4/4 at 96\nBridge: 4 bars 7/8 at 168 groSong 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.
soundselect (wood, beep, soft)"wood"Click sound
countIninteger1Count-in bars
gapPlayinteger0Gap click: bars with clicks. With “bars muted” above 0: play this many bars, then mute, and repeat. 0 = off.
gapMuteinteger0Gap click: bars muted
randomMutenumber0Random mute (% of bars). Each bar after the first is muted with this chance. The seed fixes which bars.
seedtext"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)

{
  "mcpServers": {
    "tonegrid-metronome-click": { "type": "http", "url": "https://tonegridmetronomeclick.usefulweb.app/mcp" }
  }
}