API & MCP

Everything a person can do on Tonegrid Scale and Sequence Planner, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Tonegrid Scale and Sequence Planner

Inspect the pitches in a configurable Tonegrid scale and turn selected cells into a timed note list.

Inputs of Tonegrid Scale and Sequence Planner
FieldTypeDefaultDescription
rootnumber48Root note (MIDI number). 48 is C3 and 60 is C4.
scaleselect (pentatonic, minorPentatonic, major, minor, dorian, mixolydian, harmonicMinor, blues, chromatic)"pentatonic"Musical scale
bpmnumber120Tempo (BPM)
swingnumber0Swing (%). Delays alternate steps, like the Tonegrid swing control.
rowsnumber16Melody rows
stepsnumber16Steps
cellstextarea"1,16\n5,14\n9,12\n13,11"Selected cells: step,row. One pair per line, counted from 1. Row 1 is the highest pitch; the last row is the root. Leave blank for just the scale.

Example request

C major pentatonic melody

curl -X POST https://tonegridscaleplanner.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"root":48,"scale":"pentatonic","bpm":120,"swing":0,"cells":"1,16\n5,14\n9,12\n13,11"}'

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-scale-planner": { "type": "http", "url": "https://tonegridscaleplanner.usefulweb.site/mcp" }
  }
}