> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solidyne.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-DJ Blocks and External Music Schedulers

> Instructions for automated music blocks

### Auto-DJ

`/Block /HH:MM-HH:MM /AutoDj="Format" [Block Title]`

This command defines an **AutoDj** block. In this mode, AUDICOM handles **real-time automated music scheduling**, selecting titles directly from the **Database** according to the **specified format**.

In the **On-Air Screen**, AutoDj blocks are shown in **light blue** with a line labeled *"AutoDj Controller"*. This line indicates that the block will be scheduled by AutoDj. Unlike other blocks, the on-air schedule **will not show pre-programmed title lists**, as selection happens dynamically as the block's airtime approaches.

#### Dynamic Behavior

* **Time compensation**: during AutoDj blocks, synchronization is automatic and dynamic.
* **Operator intervention**: the operator can **manually remove** a title scheduled by AutoDj; in this case, the system **immediately inserts another one** to maintain programming.
* It's also possible to **manually add titles** within an AutoDj block, or **change the order** of automatically generated ones.

This achieves a balance between full automation and manual intervention when needed.

#### Command Parameters

* **/HH:MM-HH:MM** → Defines block start and end times, expressed in hours and minutes.
* **/AutoDj="Format"** → Specifies the **AutoDj format** that determines musical style and selection rules. These formats are created and managed from the **AutoDj Editor** module.
* **\[Block Title]** → Optional text to name the block, up to 32 characters (brackets are not written in the command).

#### Example

`/Block /00:00-03:00 /AutoDj="Tango" Stars and Tango`

In this example, from **00:00 to 03:00 hours**, AUDICOM will automatically select and play titles from the format called *Tango*. The block will appear in the On-Air schedule as *Stars and Tango*.

#### Important

* AutoDj **only selects titles registered in the Database**. If an audio file is not listed there, it cannot be used.
* For **time adjustments** (when an event must start exactly on schedule), AUDICOM uses **Promos** and **Fills** defined in the Database.
* If there aren't enough promos or fill audio files, **time compensation will not be possible**, which could create **silence gaps** in programming.

### External-DJ

Allows integration of a **song list generated by an external music scheduler** (e.g., **RCS Selector** or **Power Gold**) into AUDICOM for direct use in the on-air schedule. The concept is that the scheduler produces the "music script" (by titles or codes) and AUDICOM executes it following the grid, with its own backup and time control.

#### Integration Steps

1. **Configure the external scheduler**\
   Export **24 one-hour blocks** (covers 00:00–24:00).\
   Save to `C:\AUDICOM\PGM` with name `ddmmyy.txt`.\
   In this format, **CyberPlay Editor** and **PlayList Manager** can view and test the lists.
2. **Define blocks in AUDICOM**\
   Schedule `ExternalDJ` blocks in PGM. Usage examples:

   ⬥ **Full day coverage**\
   `/Block /00:00-24:00 /ExternalDJ="C:\AUDICOM\pgm\<dd><mm><aa>.TXT Daily Music`

   ⬥ **Partial ranges (e.g.: overnight 02:00–06:00)**\
   `/Block /02:00-06:00 /ExternalDJ="C:\AUDICOM\pgm\<dd><mm><aa>.TXT Overnight Music`

<Note>
  The metanames `<dd> <mm> <aa>` must be **within code lines** or quotes (as above) so MDX doesn't interpret them as tags. At runtime AUDICOM replaces them with the corresponding date.
</Note>

***

#### Lists by **codes** (instead of titles)

Some schedulers export **codes** (IDs) instead of song names. To integrate them:

* Load these **codes** in the **External-ID** field of the Database (via **InfoMusic-Production** or **InfoMusic Air**).
* Configure daily export with name `YYYYMMDD.cod` (without `.txt` extension).

**Interpretation differences by extension:**

* **`.txt`** → list contains **titles** (AUDICOM uses song name).
* **`.cod`** → list contains **codes** (AUDICOM looks for matches in **External-ID** field).

If using **hour clocks** in the code list, include lines to delimit each block's hour:

`/xx:00`

where `xx` goes from `00` to `23`.\
Always save lists in `C:\Audicom\pgm` so **CyberPlay Editor** and **PlayList Manager** can display them.

**`Typical scheduling with code lists (.cod):`**

`/Block /00:00-01:00 /ExternalDJ="C:\Audicom\pgm\<YYYY><MM><DD>.cod"`
`/Block /01:00-02:00 /ExternalDJ="C:\Audicom\pgm\<YYYY><MM><DD>.cod"`
...
`/Block /22:00-23:00 /ExternalDJ="C:\Audicom\pgm\<YYYY><MM><DD>.cod"`
`/Block /23:00-24:00 /ExternalDJ="C:\Audicom\pgm\<YYYY><MM><DD>.cod"`

> **Important (time sync):** Within an `ExternalDJ` block's **duration**, it's **necessary** to schedule **an event at each exact hour** (e.g., **Commercial Break** or **ExactTime**) to ensure marking and continuity at the top.

***

#### Behavior if daily list is missing

If AUDICOM **cannot find** the external list for the day (either `.txt` or `.cod`), it automatically activates a **Default** format **AutoDj** as **backup**. This prevents silence and keeps the grid on time.

***

#### `.PTR` Pointer Files

For each external list used, AUDICOM maintains a **pointer** with the **last item played**, saved as a **`.PTR`** file (with same name as the list) in `C:\AUDICOM\PGM`.\
This allows proper **resumption** after a reload or restart, **without repeating** or **skipping** content.
