# Radio

**Live > Radio and idents** runs an automatic radio station: a playlist of songs with idents, promos and announcements mixed in between, with no gaps.

![Radio window](images/window-radio.png)

## Starting

1. Choose the **music source**: *Local playlist* or *Spotify*.
2. Add songs (see below), then press **START RADIO**. The window shows what is playing, how many songs have been played and the last ident.
3. Press the button again to stop. The radio can also be started and stopped from the [phone page](Remote-Control-and-Phone-App) and with a key, and it can start automatically when Audio X starts (Preferences).

## Local playlist

* **Add files** and **Add folder** (every audio file in the folder and its sub-folders). You can also drag files and folders onto the list. **Remove** and **Clear** edit the list.
* **Shuffle** plays every song once, in random order, before any song repeats.
* Songs are loaded ahead of time and crossfaded, so there is never dead air. The crossfade time is set under *Outputs and talkback*.

## Idents, promos and announcements

Idents are short sounds that play between songs.

| Column | Meaning |
|---|---|
| **On** | Switch an ident on or off. |
| **Name**, **Files** | The name and how many audio files it has. Files rotate randomly, never the same one twice in a row. Press **Files** to choose them. |
| **Trigger** | *EverySongs*: after every N songs. *ClockTime*: at a time of day. |
| **Every N songs / Clock time** | The N, or the time (for example `00:00` for the top of the hour; it uses the NTP-corrected clock and plays once). |
| **Output**, **Gain dB** | Where the ident plays and its level. |

* Idents play **one at a time, between two songs**, and are mixed over the end of the song before them. If two are due at once, they wait for the next gap, one per gap, in random order.
* **Play now** plays the selected ident straight away (the web page has ident buttons too). It is skipped if another ident is already playing.
* **Normalise** (see [Process List and Normalise](Process-List-and-Normalise)) can set matching levels for songs and idents.

## Outputs and talkback

* **Music output**, **Level (dB)** and **Crossfade (s)** set where the music plays, how loud and how long the blend is.
* **Talkback mic**: shows the announcement microphone. Choose it in **Audio > Channels and microphones** (see [Microphones and Talkback](Microphones-and-Talkback)). **to** chooses the outputs where the announcement is heard, and **dB** its level.
* The level bar and the status line under it show the announcement microphone live, and tell you in plain words if something is wrong ("The audio device is not open", "Waiting for audio from the web device").

## Ducker

When **TALK** is held (button, phone page or key) or an announcement cue plays, the music is turned down so the voice is clear, then comes back.

* **Depth dB** how far the music goes down, **Attack ms**, **Release ms**, **Hold ms**.
* **Duck** shows the current reduction. **Apply settings** saves the ducker and talkback settings.

## Spotify

Spotify needs a **Premium** account and a free Spotify developer app.

1. On the Spotify developer dashboard create an app with *Web Playback SDK* and *Web API* ticked.
2. Add the redirect address shown in the Radio window (default `http://127.0.0.1:8888/callback`).
3. Paste the **Client ID** and a playlist or album address (`spotify:playlist:...`) into the window and press **Connect**. Your browser opens so you can sign in there.
4. Choose *Spotify* as the music source and press **START RADIO**.

Spotify cannot take an ident between songs, so idents play over the music (which is ducked), one after the other. Spotify's terms restrict public and commercial performance: check your venue licence, or use the local playlist.
