wiki:rpld/Understanding

Understanding RoarAudio PlayList Daemon

This page is here to explain you the basic concepts of the RoarAudio PlayList Daemon, later just called rpld. It is not a tutorial helping you to set up rpld for a specific use case. It should help you to understand rpld better and support other tutorials and new users.

Some basics

While rpld looks like a music player it is not but keep reading! rpld is a network transparent playlist manager based on the RoarAudio Sound System supporting multiple interfaces. What this means here in details:

PlayList Manager

It stores and manages playlists for you. It maintains a list of playlists internally. You can import and export playlist files into those, read them, move and copy entries around and alter them in a lot more ways. rpld supports a lot different kinds of playlist formats both for reading and writing. Supported formats include VCLT, m3u, xspf and a lot more.

Based on RoarAudio Sound System

In addition to working with playlists itself rpld can pass the playlist entries to the RoarAudio Sound System for playback. To do this it uses special playlists called queues and histories. When you want to play a song you put it into a queue and hit play. After the song ended it is moved to the history so you can look up what you have just played or jump back and play it again.

rpld can run multiple queues and histories and play multiple songs at the same time. This is useful for example if you want to listen to different music in your room and the kitchen.

Here it is important to understand that rpld itself does not touch the data so the list of supported audio formats depend only on the used RoarAudio Sound Server.

Network transparency

Network transparency means that all that can be done locally (on the same computer) or remotely (over the network) or even over the Internet. It is also possible to run a (web) radio station with rpld and remote control it over the Internet or include a status monitor ('Now playling') on your homepage with a rpld running at your home.

Multiple interfaces

rpld itself does not have any interface for user interaction (this is why it is called a daemon). It provides it's functionality as services so other applications can use it. There are different kind of applications interacting with rpld. This includes webinterfaces such as Romie, GUIs such as App::RPLD::GUI as well as commandlion tools like rpld-ctl.

How a complete setup looks like

A complete setup contains 5 parts:

  • A user
  • A user interface
  • rpld
  • A RoarAudio Server
  • An Operating System

While some of those are not exactly need from technical point there can be any number of other components as well. The next section will list some other examples of software which can be included in a setup.

The user

This is you. While not needed normally you (or some other person) controls rpld using an user interface. In some cases there is no user but rpld is configured in a way to start playback of a given list automatically at startup.

The user interface

This is a software allowing you to control rpld. This could be a GUI, random commandlion tools, a web interface, an IR remote (with a IR daemon), an App for your smartphone or anything else that allows you to interact with rpld.

rpld itself

This is rpld. It does all the playlist work.

The RoarAudio Server

This server does all the audio work. It decodes the files, sends them to the audio sink. Normally the audio sink is your soundcard so you can listen with your speakers or headphones. Yet the server is free to send the data to any other kind of sink. This could for example be a streaming server such as Icecast or a VHF/FM Radio Transmitter.

The Operating System

This is the system all or some of the components run on. Examples include GNU/Linux. See the list in the next section for details.

Software rpld can interact with

This is a list of software abled to communicate with rpld. This list is not complete. It should just give you an idea of what is possible.

Operating systems

rpld uses libroar for most OS accesses so it runs everywhere libroar is available. This includes:

  • All POSIX systems
  • GNU/Linux
  • NetBSD, OpenBSD, FreeBSD, ...
  • M$ Windows

User Interfaces

Common User interfaces include:

  • rpld-tools (commandlion)
  • Romie (Webinterface)
  • APP::RPLD::GUI (GUI)

RoarAudio Servers

Every RoarAudio Server should work. However some features and codecs will not work with all servers. Commonly the following servers are used with rpld:

Playlist generators

The package vclt-tools contains several tools to generate playlists. Most common is the tool dir2vclt which generates a playlist from a given directory.

Other sources include the export function of any media player or radio stations providing a playlist on their website.

Other Software

There are a lot other software that can interact with rpld. This can be direct (e.g. a Perl script using Audio::RPLD) or indirect (e.g. using rpld-ctl). This is a list of tools that are often seen in rpld setups:

  • cron (time based control, e.g. alarms in the morning or jingles every hour)
  • Icecast (Internet multimedia streaming server)
  • Tantalos Servers/Clients? (Automatic content location)
  • OpenSLP (find devices in a local network)
  • Hotplug/Automounter? scripts (e.g. to automatically add content once a medium was inserted)
  • IR daemons (IR remotes)

Supported IO transports

rpld uses libroar's VIO/DSTR for all IO. It supports all transports DSTR supports. This includes local files (file://...) as well as HTTP, Tantalos and many more.

Playlist generation

Unlike in media/audio players playlists are generated offline. This means they are not generated within rpld by telling it a directory. They are generated by external tools. Common tools are dir2vclt which creates a playlist based on a directory and xiph2vclt which creates a playlist from the Xiph station directory. Both tools are part of the vclt-tools. Another example is any media player used to export a playlist.

Meta data

rpld allows you to store any number of meta information for your playlist entries (tracks). Those are stored internally within rpld and are sourced from the playlists you import. They are not read from the files directly. This allows much faster operation and enables proper tagging of resources such as streams.

Playlist Pointers

Playlist pointers are rules to automatically fill the playback queue. Each pointer points to a playlist entry (track). There are currently four pointers defined: STARTUP, DEFAULT, CURRENT and TEMP. STARTUP, DEFAULT and CURRENT exists once per queue and TEMP once per client. When rpld is started and the STARTUP pointer is set the song it points to is queued as first entry and played. This pointer is used to play startup sounds of all kinds. The CURRENT pointer is used to fill the queue whenever it runs out of songs: The song CURRENT points to is inserted into the queue and the pointer is moved to the next entry in the playlist. This allows to play back from a given position. When CURRENT is moved 'off the list', meaning the last song of the list was played it is set to the DEFAULT pointer. This allows to endlessly play back a playlist. The TEMP pointer is a pointer that can be used by the client at will. It has no specific meaning.

Each pointer can in addition point to 'the random entry' in a playlist. This is used to support random playback. There are two types: 'random:' and 'randomlike:'. The later one uses the likeness value as described in the next section. To start random playback one just needs to set the CURRENT pointer to 'random:'. User interfaces should provide a way to do this like an option in a context menu.

Playlist Entry Likeness

Each entry (Track) has a value called 'likeness'. It tells rpld how much you like a song. This is most useful in random playback: rpld supports classical random playback as well as playing back randomly queuing songs you like more often. This information can also be used by user interfaces to sort songs or create 'best of' views.

The Store

The store is a location rpld can optionally dump it's internal database so you do not need to re-import your tracks every time rpld is started. Store operations as well as location is normally controlled by the init scripts provided by the operating system. However there is a tool called rpld-storemgr which is helpful in case you need to do that yourself.

Last modified 12 years ago Last modified on 10/05/12 22:40:23