API & MCP

Everything a person can do on MIDI Quantizer with Swing, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://tickworkmidiquantizer.usefulweb.app/api/v1/calculate – run MIDI Quantizer with Swing
  • GET https://tickworkmidiquantizer.usefulweb.app/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

MIDI Quantizer with Swing

Moves the notes of a Standard MIDI File toward a 1/4 to 1/32 or triplet grid. Strength below 100 % keeps part of the human feel, swing shifts every off-beat grid line, the window leaves notes far from the grid alone, and note ends can be quantized too. Controllers, pitch bends, programs and every other event are kept. You get the new MIDI file and a before/after timing report.

Inputs of MIDI Quantizer with Swing
FieldTypeDefaultDescription
filefile—MIDI file (.mid). Up to 4 MB. Leave empty to quantize a built-in, loosely played sample.
sampleselect (lofi-song, acid-locks, humanized-groove)"humanized-groove"Sample when no file is uploaded
gridselect (1/4, 1/8, 1/8T, 1/16, 1/16T, 1/32)"1/16"Grid
strengthnumber100Strength. 100 % puts notes exactly on the grid; 50 % moves them half way.
swingnumber50Swing. Position of every second grid line inside a pair (50 = straight, 66 ≈ triplet feel). Ignored for triplet grids.
windownumber100Window. Only notes within this share of half a grid step are moved; 100 % moves all notes.
endsbooleanfalseQuantize note ends too

Example request

Tighten a loose groove to sixteenths

curl -X POST https://tickworkmidiquantizer.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"sample":"humanized-groove","grid":"1/16","strength":100,"swing":50,"window":100,"ends":false}'

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://tickworkmidiquantizer.usefulweb.app/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: tickwork_midi_quantizer
  • Local stdio connector: node src/mcp-stdio.ts --tool=tickwork-midi-quantizer
{
  "mcpServers": {
    "tickwork-midi-quantizer": { "type": "http", "url": "https://tickworkmidiquantizer.usefulweb.app/mcp" }
  }
}