Skip to content
HALOWERK

Podcast and Music Analysis

midi clock sample frame

MIDI sample alignment gives the nearest PCM sample frame and signed timing error at a chosen sample rate. Use it when an agent needs placing a musical event in an audio buffer.

POST https://ton.halowerk.com/v1/midi-clock-sample-frame

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
midistringYes
tickintegerYes
sample_rateintegerYes
Show full input schema
{
  "type": "object",
  "properties": {
    "midi": {
      "type": "string",
      "maxLength": 60000,
      "minLength": 1
    },
    "tick": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647
    },
    "sample_rate": {
      "type": "integer",
      "minimum": 8000,
      "maximum": 384000
    }
  },
  "required": [
    "midi",
    "tick",
    "sample_rate"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "midi": "TVRoZAAAAAYAAAABAeBNVHJrAAAAJgD/UQMHoSAAmSVQh0CJJQAAmSVQh0CJJQAAmSVQh0CJJQAA/y8A",
  "tick": 960,
  "sample_rate": 48000
}

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": {
        "frame": {
          "type": "string"
        },
        "error_us": {
          "type": "number"
        }
      },
      "required": [
        "frame",
        "error_us"
      ]
    },
    "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 โ†’