{
  "slug": "midi-to-json",
  "name": "gizza-ai/midi-to-json",
  "version": "0.1.0",
  "title": "MIDI to JSON — convert .mid files to structured JSON — gizza.ai",
  "description": "Convert a Standard MIDI File (.mid/.midi) to JSON — paired notes with pitch names, a raw event stream, or a compact summary. Free, runs in your browser.",
  "tags": [
    "midi to json",
    "mid to json converter",
    "parse midi file",
    "midi note extractor",
    "smf to json",
    "midi events json"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/midi-to-json/",
    "markdown": "https://gizza.ai/tools/midi-to-json/index.md",
    "descriptor": "https://gizza.ai/tools/midi-to-json/tool.json",
    "deep_link_example": "https://gizza.ai/tools/midi-to-json/?input=TVRoZAAAAAYAAAABAGBNVHJr%E2%80%A6%20%20%28or%204d546864000000%E2%80%A6%29&encoding=auto&format=notes"
  },
  "cli": "gizza tool midi-to-json \"TVRoZAAAAAYAAAABAGBNVHJr…  (or 4d546864000000…)\"",
  "tool": {
    "description": "Parse a Standard MIDI File (SMF, .mid/.midi) into structured JSON. `input` is the MIDI bytes as a base64 or hex string (it must start with a standard `MThd` header chunk; Format 0/1/2). `encoding` is auto (default) / base64 / hex — auto reads hex when the input is all hex digits with an even length, else base64. `format` picks the output shape: 'notes' (default) a musical view — a header (format, PPQ or SMPTE-timecode division, tempo/time-signature/key-signature maps, duration in ticks and seconds) plus per-track paired notes, each with a scientific pitch name (e.g. C4), MIDI number, channel, start and duration in BOTH ticks and seconds (computed from a tempo map across all tracks), and raw 0–127 velocity; 'events' a loss-less per-track raw event stream (every note-on/off, control change, program change, pitch bend, aftertouch, sysex, and meta event with delta and absolute ticks and seconds); 'summary' a compact overview (format, PPQ, initial BPM, tempo-change count, duration, note and control-change counts, channels, first time and key signature, track names). Read-only — nothing is fetched, persisted, or modified. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "encoding": {
          "default": "auto",
          "description": "How `input` is encoded: 'auto' (default) reads it as hex when it is all hex digits with an even length, otherwise base64; 'base64'; or 'hex'.",
          "enum": [
            "auto",
            "base64",
            "hex"
          ],
          "type": "string"
        },
        "format": {
          "default": "notes",
          "description": "Output shape: 'notes' (default) a musical view — a header (format, PPQ/timecode division, tempo/time/key-signature maps, duration) plus per-track paired notes each with a pitch name (e.g. C4), MIDI number, channel, start & duration in ticks AND seconds, and velocity; 'events' a loss-less per-track raw event stream (every note-on/off, control change, program change, pitch bend, and meta event with delta/absolute ticks & seconds); 'summary' a compact overview (format, PPQ, BPM, duration, note/CC counts, channels, time & key signature, track names).",
          "enum": [
            "notes",
            "events",
            "summary"
          ],
          "type": "string"
        },
        "input": {
          "description": "The Standard MIDI File (.mid/.midi) bytes as a base64 or hex string. The data must start with a standard `MThd` header chunk (Format 0/1/2). Whitespace, and `:`/`-` separators in hex, are ignored.",
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}