# Clips

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

`.wav` (8, 16, 24 and 32-bit PCM, 32-bit float) and `.ogg` Vorbis, mono or stereo, are imported as they are. An `.mp3` is converted to `.ogg` on import with `ffmpeg`; without it in `PATH` the import fails with [AUD001](/diagnostics.html#AUD001.md) and the command to convert the file by hand.

Import settings in the `.meta`:

| Setting | Default | Meaning |
|---|---|---|
| `stream` | `auto` | `auto` streams files over 2 MB or 10 seconds; `on` and `off` force it |
| `loopStart`, `loopEnd` | `-1` | loop points in frames of the file; a wav `smpl` chunk gives the first values |
| `gain` | `1` | volume of the clip, before the source and the bus |
| `bus` | `sfx` | the bus when the player of the clip does not choose one |

A clip that is not streamed is decoded once, at the rate of the output, and shared by every voice that plays it. A streamed clip is decoded while it plays, from the asset in memory; it is the choice for music. Loop points outside the sound give [AUD002](/diagnostics.html#AUD002.md), and the whole sound loops instead.

The Assets panel draws a waveform for every clip.

![A clip in the Inspector: waveform, preview, loop and import settings](shots/clip-inspector.png)

## Built-in clips

Four clips ship with the engine and need no files: **Beep**, **Click**, **Hum** and **Melody**. They are in every Clip picker under `engine/audio`, and scripts get them with `audio.Builtin("Beep")`. Hum and Melody have loop points over the whole clip, so they loop without a seam. The Try it scenes on these pages play them.
