# Click Track Maker (Metronome WAV & MIDI) > Turn a song map with tempo and meter changes into a metronome click track as WAV and 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. Part of usefulweb.app (https://usefulweb.app/). Part of [Tonegrid](https://tonegrid.usefulweb.app/) (ownerApp: tonegrid). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://tonegridmetronomeclick.usefulweb.app/ (interactive tool at https://tonegridmetronomeclick.usefulweb.app/tool) - JSON API: POST https://tonegridmetronomeclick.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://tonegridmetronomeclick.usefulweb.app/api/v1/tool) - OpenAPI: https://tonegridmetronomeclick.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://tonegridmetronomeclick.usefulweb.app/mcp - tool `tonegrid_metronome_click` ## Inputs - map (textarea): 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): Click sound - countIn (integer): Count-in bars - gapPlay (integer): Gap click: bars with clicks - With “bars muted” above 0: play this many bars, then mute, and repeat. 0 = off. - gapMute (integer): Gap click: bars muted - randomMute (number): Random mute (% of bars) - Each bar after the first is muted with this chance. The seed fixes which bars. - seed (text): Random seed ## Method - Every bar gets its tempo (a tempo change inside a section moves in equal steps from the first to the last bar) and lasts beats × 60 / tempo seconds; the bar start times are added up in order. Click times inside a bar: beats at j × 60/tempo, subdivisions in between, polyrhythm clicks at m × bar length / n. - The WAV file (16-bit mono, 44.1 kHz) places each click on the sample nearest to its time, so clicks never drift. Click sounds are short synthesized tones: the first beat of the bar is the highest, the first beat of every accent group is a little lower and softer, other beats lower still; subdivisions are quiet and the polyrhythm layer has its own lower pitch. - The MIDI file (type 0, 480 ticks per quarter note) has tempo and time-signature changes per bar, section names as markers and the clicks on channel 10 (General MIDI wood blocks; cowbell for the polyrhythm layer). Gap click mutes bars in a fixed play/mute cycle after the count-in; random mute draws each bar from a seeded generator, so the same seed mutes the same bars. ## Limits - Practice aid. The click track is synthesized and free to use; check the timing against your own recording software before relying on it in a session.