---
title: "audio.bed: Music Bed — Film kit command — Kition"
description: "Lays music under the film as one undo step: an audio `clip`, or a project `item` placed from `frame`/`seconds` (0) to the end of the picture on the first free audio track. Sets clip gain `gainDb` (−9.4, ≈0.34 linear; or `volume`) and Constant Gain fades of `fadeInSeconds` (1) and `fadeOutSeconds` (1.7); `duck` {against: dialogue (or sfx, ambience, a list), reduceDb, sensitivity, fadeSeconds} makes it Music, sets its ducking and generates the ducking keyframes. Answers {clips, audioTrack, gainDb, frames [start, end], ducking regions}."
canonical: "https://developer.kition.ai/docs/kits/film/commands/audio.bed"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/film/commands/audio.bed](https://developer.kition.ai/docs/kits/film/commands/audio.bed)

# audio.bed

**Music Bed.** Lays music under the film as one undo step: an audio `clip`, or a project `item` placed from `frame`/`seconds` (0) to the end of the picture on the first free audio track. Sets clip gain `gainDb` (−9.4, ≈0.34 linear; or `volume`) and Constant Gain fades of `fadeInSeconds` (1) and `fadeOutSeconds` (1.7); `duck` {against: dialogue (or sfx, ambience, a list), reduceDb, sensitivity, fadeSeconds} makes it Music, sets its ducking and generates the ducking keyframes. Answers {clips, audioTrack, gainDb, frames [start, end], ducking regions}.

- Kit: Film 0.1.0 (.kfilm); reference: [Film kit commands](https://developer.kition.ai/docs/kits/film.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `clip` | `integer` | no | an id; one of several alternative parameters |
| `duck` | `object` | no | {"against":"dialogue"\|"sfx"\|…\|[types]="dialogue","reduceDb":f64=-15,"sensitivity":0..10?,"fadeSeconds":f64?}? |
| `fadeInSeconds` | `number` | no |  |
| `fadeOutSeconds` | `number` | no |  |
| `frame` | `integer` | no | one of several alternative parameters |
| `gainDb` | `number` | no | one of several alternative parameters |
| `item` | `integer` | no | an id; placed from frame/seconds, default 0, to the end of the picture; one of several alternative parameters |
| `seconds` | `number` | no | one of several alternative parameters |
| `time` | `integer` | no | the time, in ticks (one spelling of it) |
| `timecode` | `string` | no | the time, as a timecode (one spelling of it) |
| `volume` | `number` | no | one of several alternative parameters |

## Call through film_run

```text
film_run {
  "path": "<file>.kfilm",
  "steps": [{ "command": "audio.bed" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `clip`, `duck`, `fadeInSeconds`, `fadeOutSeconds`, `frame`, `gainDb`, `item`, `seconds`, `time`, `timecode`, `volume`. film_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "clip": {
      "description": "an id; one of several alternative parameters",
      "type": "integer",
      "x-khp-types": [
        "Clip"
      ]
    },
    "duck": {
      "additionalProperties": true,
      "description": "{\"against\":\"dialogue\"|\"sfx\"|…|[types]=\"dialogue\",\"reduceDb\":f64=-15,\"sensitivity\":0..10?,\"fadeSeconds\":f64?}?",
      "properties": {
        "against": {
          "description": "\"dialogue\"|\"sfx\"|…|[types]=\"dialogue\"; default \"dialogue\""
        },
        "fadeSeconds": {
          "type": "number"
        },
        "reduceDb": {
          "default": -15,
          "type": "number"
        },
        "sensitivity": {
          "description": "0 to 10",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "fadeInSeconds": {
      "default": 1,
      "type": "number"
    },
    "fadeOutSeconds": {
      "default": 1.7,
      "type": "number"
    },
    "frame": {
      "description": "one of several alternative parameters",
      "type": "integer"
    },
    "gainDb": {
      "default": -9.4,
      "description": "one of several alternative parameters",
      "type": "number"
    },
    "item": {
      "description": "an id; placed from frame/seconds, default 0, to the end of the picture; one of several alternative parameters",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    },
    "seconds": {
      "description": "one of several alternative parameters",
      "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"
    },
    "volume": {
      "description": "one of several alternative parameters",
      "type": "number"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/film-darwin-arm64@0.1.0 and the kit itself (film_commands through @kition/cli@0.1.1, built from KitionAI/kition-film@375db59).
