# Add sound to the timeline

## Before you begin

- Open a story in the studio. To start one, see [Turn a script into a scene](https://mirli.app/docs/studio-script/index.md) or, for music and
  sound effects, click **Studio**, then **New**, then **Music & SFX**.

## Generate a sound or music into the story

1. In the **Panels** menu, select **Prompt**.
2. In the **Prompt** panel, select a model in the **Model** list.
3. Describe the sound or music you want. For how to write a prompt each model understands, see
   [Generating](https://mirli.app/docs/generating/index.md).
4. Optional: to choose the lane, click a clip on that lane first. The sound goes onto that lane if the stretch it
   needs is free, and onto a new track if not.
5. Click **Generate & insert**. A placeholder clip shows while it renders. The finished sound lands on the timeline
   and in your library, and the attempt is listed in the **History** panel.

![The Prompt panel with the Model list, the Styles box and the Generate & insert button](https://github.com/HamSanders/soundbox/blob/main/site/public/docs/studio/prompt.webp)

The sound starts at the playhead while the story is playing, otherwise at the start of the selected clip, otherwise
at the beginning.

## Drag in a sound from your library

1. In the **Panels** menu, select **Library**.
2. Drag a sound from the **Library** panel onto a lane. It starts where you let go. If that stretch of the lane is
   taken, it goes onto a new track instead.

## Import a file from your computer

1. Right-click an empty part of a lane, at the time you want the file to start.
2. Select **Import from computer…**.
3. Choose the audio file. It is added to your library and placed exactly where you clicked.

You can also drag an audio file from your desktop straight onto a lane.

![The menu for an empty part of a lane, headed 26s · track 1, with Create voice line, New recording, New prompt, Insert sample, Import from computer, Split all at playhead, Paste here and Add track](https://github.com/HamSanders/soundbox/blob/main/site/public/docs/studio/lane-menu.webp)

## Record from your microphone

1. Click the ruler to put the playhead where the take should start.
2. On the timeline toolbar, click **Record onto a new track at the playhead** (the circle).
3. If your browser or the desktop app asks, allow the microphone.
4. Check that the level meter that appears with the timer moves while you speak.
5. To stop, click **Stop recording**. The take goes onto a new track starting at the playhead, and into your library
   as *Take* followed by the time.

![The timeline toolbar while recording: the record button lit, the elapsed time at 3.0s and the level meter](https://github.com/HamSanders/soundbox/blob/main/site/public/docs/studio/recording.webp)

If recording cannot start, point to the record button: its tooltip says why.

## Add a spoken line at a particular spot

1. Right-click an empty part of a lane at the time you want the line.
2. Select **Create voice line**.
3. In the box, enter what the line says and press <kbd>Enter</kbd>. A written line appears on the lane.
4. Right-click the new clip and select **Read this line**. The line is read in the story's default voice.

## What's next

- [Arrange clips on the timeline](https://mirli.app/docs/studio-timeline/index.md) to move, trim and fade what you added.
- [Mix the tracks](https://mirli.app/docs/studio-mixing/index.md) to balance the lanes.
- [Record a MIDI take](https://mirli.app/docs/studio-midi/index.md) to play a melody in.
