TPI (“Text Playlist Import”) is a simple text-based playlist format, designed for importing playlists from third-party music scheduling systems. A TPI file contains the IDs or filenames of the items to import, plus optional control information such as start times, timing and block boundaries.
In the configuration dialogs, the format is listed as TPI Text Playlist Import File. See MusicMaster for an example of how TPI files are used in practice.
General
File Format
- TPI files are plain text files, with either CR/LF or LF line endings.
- The text encoding is always UTF-8.
- Each line contains a number of columns, delimited by comma or tab. If a line contains a tab character, the columns of that line are assumed to be tab-delimited, otherwise comma-delimited.
- A column value can be enclosed in double quotes, e.g. in order to use a comma within a title.
- Empty lines are ignored.
File Names
- The file extension should be
.txt. - In situations where it is important to tell the files apart from other text files, the
file extension
.tpican be used instead. - Files can contain the playlist of a whole day (one file per day) or of a single hour (one file per hour).
When TPI files are imported automatically, e.g. by a music template of the scheduler, the name of the file to import is configured through the Filename format setting of the playlist import, see Playlist Import Filenames.
When importing files with Import → Playlist Contents… in the database playlist, the date and hour are determined from the filename instead, which must use one of the following formats:
- One file per day:
yyyy-mm-dd.txt,yyyymmdd.txt,yy-mm-dd.txtoryymmdd.txt - One file per hour:
yyyy-mm-dd-hh.txt,yyyymmddhh.txt,yy-mm-dd-hh.txtoryymmddhh.txt
Column Layout
Each line contains four or more columns:
| Column | Field |
|---|---|
| 1 | Start Time |
| 2 | Timing |
| 3 | Line Type |
| 4 | Line Data |
| 5… | Optional columns, depending on the line type |
Trailing columns that are not needed can be omitted.
Start Time
- The start time is given in
hh:mm:ssorhh:mmformat, with two digits for each part. - The start time can be left empty if it is unknown or irrelevant for that particular line.
- The hour part of the start time determines the hour that the line, and all following lines without a start time, belong to. When the file is split into hours (e.g. a daily file from which the playlist of a single hour is imported), mAirList uses this information in order to identify the hour boundaries. So you must specify a start time for at least the first item of each hour. Lines before the first start time belong to hour 0.
- Apart from that, the minute and second part is ignored, except for fixed times (see below).
- The minute part can exceed 59, which some schedulers use for overflow music, e.g.
12:67:23.
Timing
The Timing column can contain one of the following values, which correspond to the respective timing settings of a playlist item:
| Value | Description |
|---|---|
N | Normal |
H | Hard fixed time |
S | Soft fixed time |
B | Backtimed |
E | Excluded from backtiming |
F | Fixed (timed like Normal, but the item keeps its position in the playlist and is not moved by Auto Float) |
If the Timing column is left empty, the item keeps the timing from its metadata, which is usually Normal.
For Hard and Soft timing, a valid start time must be given in column 1, which is used as the fixed time of the item.
Line Type
The third column specifies the type of the line. The following types are defined:
| Type | Name | Description |
|---|---|---|
B | Block | Indicates the start of the next block |
D | Dummy | A dummy item |
E | External ID | An item from the database, identified by its External ID |
F | File | An audio file, identified by its filename |
I | ID | An item from the database, identified by its database ID |
O | Options | Options for the import of subsequent F lines |
R | Remark | Silently ignored during import |
Line types are case-sensitive.
Line Definitions
The following sections describe all supported line types (column 3) and the corresponding line data (column 4).
B: Block
Indicates the boundary of a (music or advertising) block. Column 4 contains the number of the block starting here. If column 4 is left empty, the number of the previous block + 1 is assumed (or block 1, if the line is at the start of the file). The timing is ignored and can be left empty.
If the file contains no B lines at all, block 1 is assumed for all content.
Example:
12:00:00,,B,2
Indicates the start of block 2.
D: Dummy
Adds a dummy item to the playlist. Column 4 contains the title of the item.
Example:
12:00:00,H,D,Start of Hour
Adds a dummy item titled Start of Hour, with a hard fixed time of 12:00:00.
E: External ID
Adds the item with the specified External ID from the database. Column 4 must not be empty.
Example:
12:00:00,N,E,100810-01
Adds the item with the External ID 100810-01, with Normal timing.
F: File
Adds an audio file to the playlist. Column 4 contains the filename of the audio file.
If the filename is relative, it is resolved relative to the Default folder configured in the Audio Files section of the playlist import settings. If the filename has no extension, the Default extension from these settings is appended.
The metadata of the file is read from the database, MMD files or file tags, depending on
the import tasks (see the ImportTasks option below).
Example:
12:00:00,N,F,C:\Audio\News.mp3
Adds the file C:\Audio\News.mp3, with Normal timing.
Additional columns can be used to set the fields of the imported file:
| Column | Field |
|---|---|
| 5 | Title |
| 6 | Artist |
| 7 | Item Type (see the ItemType option below for possible values) |
Example:
12:03:00,,F,News.mp3,Local News,Newsroom,News
I: ID
Adds the item with the specified (internal) database ID from the database. Column 4 must not be empty.
Example:
12:00:00,N,I,120577
Adds the item with the ID 120577, with Normal timing.
O: Options
Sets an option for the processing of all subsequent F lines. The start time and timing
are ignored. Columns 4 and 5 contain the name and value of the option. The following
options are available:
| Name | Description |
|---|---|
ItemType | Override the item type of the imported files, e.g. News or Advertising. The default is Unknown, which means that the item type is not overridden. An item type given in column 7 of an F line takes precedence. |
ImportTasks | The import tasks to perform for the files, as a comma-separated list of one or more of the following values: MMD, Tags, NativeTags, Duration, Tilde, AutoCue, Loudness, Normalize, DatabaseLookup, UnpackPlaylists, AutoSaveMMD. Use All for all tasks, or - for no tasks. The default is the Import Tasks for Unknown Files setting of the playlist import. |
Possible values for the item type are: Music, Voice, News, Weather, Traffic,
Advertising, Package, Jingle, Sound, Trailer, Promo, Sponsorship,
Sweeper, Drop, StationID, Bed, Instrumental, Show, Stream, Container,
Playlist, Command, CartwallPage, Break, Dummy, Silence, Error, Other,
Custom1, Custom2, Custom3.
Option names and values are case-sensitive. Since the ImportTasks value contains
commas, enclose it in double quotes when using comma-delimited columns.
Example:
,,O,ItemType,News
,,O,ImportTasks,"MMD,Tags,Duration"
R: Remark
Lines of type R are silently ignored during import. They can be used to add comments to
a TPI file, in order to make it more readable for humans.
Example:
,,R,Generated by MyScheduler 1.0
Error Handling
If a line cannot be processed, e.g. because of an unknown line type, a missing ID, a missing start time for a fixed time, or an item that cannot be found in the database, an error item is added to the playlist in its place. The comment of the error item contains the filename and line of the TPI file.
Example
A complete TPI file for one hour might look like this:
,,R,Morning Show 2026-11-03
08:00:00,H,D,Top of the Hour
08:00:00,N,E,ID-0815
08:00:10,N,I,4711
08:03:25,N,I,4712
08:07:10,,B,
,,O,ItemType,Advertising
08:07:10,N,F,Spots\Spot1.mp3,Spot 1,Advertiser
08:07:40,N,F,Spots\Spot2.mp3,Spot 2,Advertiser
08:08:10,,B,
08:08:10,N,I,4713