Skip to content

Generate Scale MIDI

Tool name: generate-scale-midi

Renders a scale (quarter notes, 4/4) to a Standard MIDI File (SMF1, 480 PPQ) over the requested octaves and direction.

HintValue
readOnlyHint
idempotentHint
destructiveHint
openWorldHint
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tonic": {
"type": "string",
"minLength": 1,
"description": "Scale tonic (e.g. \"C\", \"F#\", \"Bb\")."
},
"type": {
"type": "string",
"minLength": 1,
"description": "Scale type (e.g. \"major\", \"minor\", \"dorian\")."
},
"tempo": {
"type": "integer",
"minimum": 20,
"maximum": 300,
"description": "Tempo in BPM."
},
"direction": {
"type": "string",
"enum": [
"up",
"down",
"both"
],
"description": "Sequence direction. \"both\" plays up then back down without repeating the apex."
},
"octaves": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "How many octaves of the scale to render."
}
},
"required": [
"tonic",
"type",
"tempo",
"direction",
"octaves"
],
"additionalProperties": false
}

Returned as structuredContent. The text rendering is a short human-readable summary.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"midiBase64": {
"type": "string",
"description": "Base64-encoded Standard MIDI File bytes."
},
"format": {
"type": "string",
"const": "smf1",
"description": "SMF format type 1."
},
"ppq": {
"type": "number",
"const": 480,
"description": "Pulses per quarter note."
},
"durationMs": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Total duration in milliseconds."
},
"trackCount": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Number of MIDI tracks."
}
},
"required": [
"midiBase64",
"format",
"ppq",
"durationMs",
"trackCount"
],
"additionalProperties": false
}