Skip to content
HALOWERK

Podcast and Music Analysis

melody quantize to key

Melody quantization moves each pitch to the nearest scale tone and resolves equal distances downward. Use it when an agent needs a deterministic music calculation.

POST https://ton.halowerk.com/v1/melody-quantize-to-key

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
notesstringYes
rootstringYes
modestringYes
snapshotSee schemaNo
Show full input schema
{
  "type": "object",
  "properties": {
    "notes": {
      "type": "string",
      "minLength": 1,
      "maxLength": 112
    },
    "root": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8
    },
    "mode": {
      "type": "string",
      "maxLength": 16
    },
    "snapshot": {
      "enum": [
        "music-v1"
      ]
    }
  },
  "required": [
    "notes",
    "root",
    "mode"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "notes": "C4 E4 G4 C5",
  "root": "C4",
  "mode": "major",
  "snapshot": "music-v1"
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "midi": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "changed": {
          "type": "integer"
        }
      },
      "required": [
        "midi",
        "changed"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub โ†’