# Tonegrid Pattern Renderer > Render a Tonegrid project to a stereo WAV file and measure the mix. Turns a Tonegrid project — the JSON file or a share link — into a 16-bit stereo WAV file: one seamless pattern loop or the whole song arrangement, with the Tonegrid synth voices, drums, pan and reverb send. The result reports peak and RMS levels per channel, crest factor, clipped samples, the strongest spectral lines, a spectrum chart and a waveform overview. It is the same renderer as the WAV export in the Tonegrid app, so both give identical files. 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://tonegridpatternrender.usefulweb.app/ (interactive tool at https://tonegridpatternrender.usefulweb.app/tool) - JSON API: POST https://tonegridpatternrender.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://tonegridpatternrender.usefulweb.app/api/v1/tool) - OpenAPI: https://tonegridpatternrender.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://tonegridpatternrender.usefulweb.app/mcp - tool `tonegrid_pattern_render` ## Inputs - project (textarea, required): Tonegrid project (JSON or share link) - Paste the content of a .tonegrid.json file, the project object returned by the Tonegrid Pattern Builder, or a Tonegrid share link (…/app#project=…). - range (select): Range ## Method - Every step is a sixteenth note at the project tempo; swing delays every second step. Melody notes and drum hits are synthesized sample by sample at 44.1 kHz with the same recipes the app plays live through Web Audio: sine, triangle and band-limited (PolyBLEP) sawtooth oscillators, exponential attack and decay envelopes, an exponentially falling low-pass on the pluck, pitch-swept kick, tom and rim, and high-passed seeded noise for snare, hats, clap and shaker. - Mixer: each track has a level and an equal-power pan (with +3 dB make-up so a centred track is as loud as before), and a send into one mono reverb bus. The reverb is the Freeverb-style room reverb of the shared audio engine with the chosen preset’s reverberation time, 100 % wet; the master volume scales the sum. - Pattern range: exactly one full cycle (until melody and drum grids line up again); everything that rings past the end — long pad notes and the reverb tail — is added back onto the start, so the loop repeats seamlessly. Song range: all parts in order plus at least 1.5 s ring-out (longer with reverb) and a 10 ms fade at the very end. - The mix is written as 16-bit PCM WAV (rounded, no dither; samples beyond full scale clip and are counted). Levels, crest factor, the spectrum (Hann window, 4096-point Welch average of the mono mix) and the waveform come from the shared audio engine analysis. ## Limits - Tonegrid sounds are simple synthesizers. Live playback in a browser uses Web Audio and can differ very slightly from this file (oscillator tables, reverb impulse length).