Skip to main content
Glama

Doseedo Film Score: spot a video, play your score on AI instruments, mix it to picture

Tempo map from hit points

doseedo_tempo_map
Read-onlyIdempotent

Scoring to picture: turn HIT POINTS (a cut, an impact, the title card — as seconds from the cue start or SMPTE timecodes) into a TEMPO MAP that lands each hit exactly on a downbeat (or a beat / an eighth — per hit with hits[].land), staying near your tempo and inside bpm_range. A cue whose pace changes (she runs faster, then stops): give the hit where it changes a bpm, and the map moves to that tempo from there, every hit still landed. An AD or any cue that must hold ONE tempo: fixed_bpm: true (+ max_deviation_bpm, tolerance_ms) finds the tempo and the bar-1 offset (music_offset_s) landing the most hits, and says which ones it could not. Returns tempo_map [{beat, bpm}] to pass unchanged to doseedo_render_midi / doseedo_render_score / doseedo_session_from_stems, and hits[] with the beat, bar and beat-in-bar each hit lands on — write the accent, stinger or change there. Handles 23.976 / 24 / 25 / 29.97 (";" = drop-frame) / 30 / 50 / 59.94 / 60 fps timecode. Pure math: free, instant, no key needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hits": "<hits>",
      "bpm": "<bpm>"
    },
    "name": "doseedo_tempo_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
bpmYesThe cue's tempo (20–300) — the map stays as close to it as the hits allow.
fpsNoFrame rate of the timecodes: 23.976, 24, 25, 29.97, 30, 50, 59.94, 60.
hitsYesThe moments the music must land on: [{time_s} (seconds from the cue start) or {timecode: "01:00:12:08"} (film timecode, with fps and start_timecode), label?, land?, bpm?}] — land = THIS hit's landing ("downbeat", "beat" or "eighth"; default: the request's land), e.g. the big cuts on bar lines and a quick accent on an eighth. bpm = the tempo FROM this hit on, a new section (the chase at 160 from the cut where she starts running, back to 112 when she stops), until a later hit names another; the range around it scales with it. A bare number = {time_s}.
landNoLand hits on bar lines (default), on any beat, or on any eighth — the default for every hit without its own land.
start_sNoAlternative: the cue start in seconds of film time (informational when hits are time_s).
bpm_rangeNoAllowed tempo range [min, max] (default ±12 % of bpm).
fixed_bpmNoONE tempo for the whole cue (an ad, a song-form cue): the solver picks the tempo (within max_deviation_bpm of bpm; default exactly bpm) and where bar 1 sits (music_offset_s, default within the first bar; offset_range_s) so the most hits land within tolerance_ms (default 40). Hits it cannot land come back landed:false with nearest_beat — never an error.
tolerance_msNoSOFT hits (0–250 ms): a hit within this of the grid counts as landed, and one the grid can't reach is reported (landed:false, with nearest_beat and off_ms), never refused. The map is fitted over the whole cue, so it lands the most hits — downbeats and priority "must" first. Every hit then carries error_ms; hit_rate = landed / all. A hit with landed:false gets no accent of its own (an accent between the beats sounds like a mistake).
offset_range_sNofixed_bpm: where bar 1 may sit on the cue, [min, max] seconds (default [0, one bar]).
start_timecodeNoFilm timecode of the cue's first downbeat (bar 1); hit timecodes are measured from it.
time_signatureNoMeter (default 4/4).
max_deviation_bpmNoHow far the tempo may move from bpm (both modes; in place of bpm_range). A variable map at 124 ±12 % can swing 11+ bpm between hits — 3 keeps it a steady groove.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / hits / items / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "label": {
      -        "type": "string"
      -      },
      -      "land": {
      -        "enum": [
      -          "downbeat",
      -          "beat",
      -          "eighth"
      -        ],
      -        "type": "string"
      -      },
      -      "time_s": {
      -        "type": "number"
      -      },
      -      "timecode": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bpm": {
      +        "type": "number"
      +      },
      +      "label": {
      +        "type": "string"
      +      },
      +      "land": {
      +        "enum": [
      +          "downbeat",
      +          "beat",
      +          "eighth"
      +        ],
      +        "type": "string"
      +      },
      +      "priority": {
      +        "description": "What this hit is worth when not every hit can land (tolerance_ms): \"must\" for the moment the cue is written to (the reveal, the title, the drop) — the map lands it first and the rest around it; \"low\" gives way first. Default \"normal\"; a downbeat hit already outweighs a beat.",
      +        "enum": [
      +          "must",
      +          "high",
      +          "normal",
      +          "low"
      +        ],
      +        "type": "string"
      +      },
      +      "time_s": {
      +        "type": "number"
      +      },
      +      "timecode": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / tolerance_ms / description
      Previous value: -"SOFT hits (0–250 ms): a hit within this of the grid counts as landed, and one the grid can't reach is reported (landed:false), never refused. Every hit then carries error_ms; hit_rate = landed / all."New value: +"SOFT hits (0–250 ms): a hit within this of the grid counts as landed, and one the grid can't reach is reported (landed:false, with nearest_beat and off_ms), never refused. The map is fitted over the whole cue, so it lands the most hits — downbeats and priority \"must\" first. Every hit then carries error_ms; hit_rate = landed / all. A hit with landed:false gets no accent of its own (an accent between the beats sounds like a mistake)."
  2. Changed1 schema field changed
    • changedInput schema / properties / hits / description
      Previous value: -"The moments the music must land on: [{time_s} (seconds from the cue start) or {timecode: \"01:00:12:08\"} (film timecode, with fps and start_timecode), label?, land?}] — land = THIS hit's landing (\"downbeat\", \"beat\" or \"eighth\"; default: the request's land), e.g. the big cuts on bar lines and a quick accent on an eighth. A bare number = {time_s}."New value: +"The moments the music must land on: [{time_s} (seconds from the cue start) or {timecode: \"01:00:12:08\"} (film timecode, with fps and start_timecode), label?, land?, bpm?}] — land = THIS hit's landing (\"downbeat\", \"beat\" or \"eighth\"; default: the request's land), e.g. the big cuts on bar lines and a quick accent on an eighth. bpm = the tempo FROM this hit on, a new section (the chase at 160 from the cut where she starts running, back to 112 when she stops), until a later hit names another; the range around it scales with it. A bare number = {time_s}."
  3. Changed8 schema fields changed
    • addedInput schema / properties / fixed_bpm
      Added value: +{
      +  "description": "ONE tempo for the whole cue (an ad, a song-form cue): the solver picks the tempo (within max_deviation_bpm of bpm; default exactly bpm) and where bar 1 sits (music_offset_s, default within the first bar; offset_range_s) so the most hits land within tolerance_ms (default 40). Hits it cannot land come back landed:false with nearest_beat — never an error.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / hits / description
      Previous value: -"The moments the music must land on: [{time_s} (seconds from the cue start) or {timecode: \"01:00:12:08\"} (film timecode, with fps and start_timecode), label?, land?}] — land = THIS hit's landing (\"downbeat\" or \"beat\"; default: the request's land), e.g. the big cuts on bar lines and a quick accent on a beat. A bare number = {time_s}."New value: +"The moments the music must land on: [{time_s} (seconds from the cue start) or {timecode: \"01:00:12:08\"} (film timecode, with fps and start_timecode), label?, land?}] — land = THIS hit's landing (\"downbeat\", \"beat\" or \"eighth\"; default: the request's land), e.g. the big cuts on bar lines and a quick accent on an eighth. A bare number = {time_s}."
    • changedInput schema / properties / hits / items / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "label": {
      -        "type": "string"
      -      },
      -      "land": {
      -        "enum": [
      -          "downbeat",
      -          "beat"
      -        ],
      -        "type": "string"
      -      },
      -      "time_s": {
      -        "type": "number"
      -      },
      -      "timecode": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "label": {
      +        "type": "string"
      +      },
      +      "land": {
      +        "enum": [
      +          "downbeat",
      +          "beat",
      +          "eighth"
      +        ],
      +        "type": "string"
      +      },
      +      "time_s": {
      +        "type": "number"
      +      },
      +      "timecode": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / land / description
      Previous value: -"Land hits on bar lines (default) or on any beat — the default for every hit without its own land."New value: +"Land hits on bar lines (default), on any beat, or on any eighth — the default for every hit without its own land."
    • changedInput schema / properties / land / enum
      Previous value: -[
      -  "downbeat",
      -  "beat"
      -]New value: +[
      +  "downbeat",
      +  "beat",
      +  "eighth"
      +]
    • addedInput schema / properties / max_deviation_bpm
      Added value: +{
      +  "description": "How far the tempo may move from bpm (both modes; in place of bpm_range). A variable map at 124 ±12 % can swing 11+ bpm between hits — 3 keeps it a steady groove.",
      +  "type": "number"
      +}
    • addedInput schema / properties / offset_range_s
      Added value: +{
      +  "description": "fixed_bpm: where bar 1 may sit on the cue, [min, max] seconds (default [0, one bar]).",
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / tolerance_ms
      Added value: +{
      +  "description": "SOFT hits (0–250 ms): a hit within this of the grid counts as landed, and one the grid can't reach is reported (landed:false), never refused. Every hit then carries error_ms; hit_rate = landed / all.",
      +  "type": "number"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, closed-world, non-destructive; the description adds material context beyond them: 'Pure math: free, instant, no key needed', the guarantee that unfittable hits are reported as landed:false with nearest_beat rather than erroring, and the downbeat/must-priority fitting order. That is exactly the behavioral disclosure annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the job to be done, then mode-specific guidance, then return shape and constraints — a sensible order with no filler sentences. It is dense and long (capitals and em-dashes throughout), but every clause carries information an agent would otherwise have to infer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Twelve parameters with no output schema make the return-value description essential, and it delivers: tempo_map as [{beat, bpm}] passed unchanged downstream, plus hits[] carrying the beat, bar and beat-in-bar each hit lands on. Supported frame rates, including drop-frame notation, are spelled out, so an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description adds genuine semantics on top — what a per-hit bpm does (starts a new tempo section until a later hit names another), how land inherits from the request-level default, and the interaction of fixed_bpm with max_deviation_bpm and music_offset_s. Some of this restates the schema, which keeps it out of 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb-and-resource plus domain framing: 'turn HIT POINTS ... into a TEMPO MAP that lands each hit exactly on a downbeat'. The two operating modes (variable map vs fixed_bpm) are named, so an agent can distinguish this from doseedo_score_to_picture and the render tools without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete selection conditions for the two modes — 'A cue whose pace changes ... give the hit where it changes a bpm' versus 'An AD or any cue that must hold ONE tempo: fixed_bpm: true' — and states where the output goes next (doseedo_render_midi / render_score / session_from_stems). It does not explicitly contrast itself against the closest sibling, doseedo_score_to_picture, which leaves one inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources