Film kit command
sound.phrase
Sound Phrase
Builds a stock sound phrase at `frame` (or `seconds`) from sound items the caller imported, as one undo step, each sound peak-aligned (its loudest sample on the frame) on the first free audio track: `closing` = items.riser starting at the frame (0.5), items.impact peaking `impactAfterFrames` (35) later at 0.55 (keep it the loudest sound, at most three such hits a film), items.sparkle `sparkleAfterFrames` (25) after the impact at 0.3; `titleIn` = items.swoosh 0.4; `sceneIn` = items.transition 0.4; `click` = items.click 0.6; `hitRun` = `count` (6) hits alternating items.hit / items.hitAlt, volume stepping 0.40 → 0.25, spacing from `spacingFrames` (5) to `endSpacingFrames`; hits closer than 3 frames blur, so items.swoosh plays once over the run instead. `gainOffsetDb` shifts every gain. Answers `placed` as timeline.placeMany.
- Kit
- Film 0.1.0 (.kfilm)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | no | hitRun |
endSpacingFrames | number | no | hitRun |
frame | integer | no | one of several alternative parameters |
gainOffsetDb | number | no | |
impactAfterFrames | number | no | closing |
items | object | no | |
preset | "closing" | "titleIn" | "sceneIn" | "click" | "hitRun" | no | |
seconds | number | no | one of several alternative parameters |
spacingFrames | number | no | hitRun |
sparkleAfterFrames | number | no | closing |
time | integer | no | the time, in ticks (one spelling of it) |
timecode | string | no | the time, as a timecode (one spelling of it) |
Call through film_run
film_run {
"path": "<file>.kfilm",
"steps": [{ "command": "sound.phrase" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: count, endSpacingFrames, frame, gainOffsetDb, impactAfterFrames, items, preset, seconds, spacingFrames, sparkleAfterFrames, time, timecode. film_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"count": {
"default": 6,
"description": "hitRun",
"type": "integer"
},
"endSpacingFrames": {
"description": "hitRun",
"type": "number"
},
"frame": {
"description": "one of several alternative parameters",
"type": "integer"
},
"gainOffsetDb": {
"default": 0,
"type": "number"
},
"impactAfterFrames": {
"default": 35,
"description": "closing",
"type": "number"
},
"items": {
"additionalProperties": false,
"properties": {
"click": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"hit": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"hitAlt": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"impact": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"riser": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"sparkle": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"swoosh": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
},
"transition": {
"description": "project sound item id, as required by the selected preset",
"type": "integer",
"x-khp-role": "object",
"x-khp-types": [
"Item"
]
}
},
"type": "object"
},
"preset": {
"enum": [
"closing",
"titleIn",
"sceneIn",
"click",
"hitRun"
],
"type": "string"
},
"seconds": {
"description": "one of several alternative parameters",
"type": "number"
},
"spacingFrames": {
"default": 5,
"description": "hitRun",
"type": "number"
},
"sparkleAfterFrames": {
"default": 25,
"description": "closing",
"type": "number"
},
"time": {
"description": "the time, in ticks (one spelling of it)",
"type": "integer"
},
"timecode": {
"description": "the time, as a timecode (one spelling of it)",
"type": "string"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (film_commands through @kition/[email protected], built from KitionAI/kition-film@375db59). As data: commands.jsonl.