In Slink-e terminology, an "event" is a text based message from the Slink-e Server which describes the occurence of a keypress on an IR remote, a S-Link command, a program message, an error, or many other possible things of interest. Once properly defined using a device file, your TV remote control can produce an event like
tv:power
every time you hit the power button on a remote. Similarly, a program like CDJ can tell you that is has stopped playing a playlist with the event
cdjr:playlist_stop (see the CDJ commands and responses page for a full
description of these messages)
Events would not be useful by themselves unless you could perform some action based on their content. An event map performs this function by allowing you to execute an arbitrary sequence of commands in response to an event (like a macro). An event map is contained in a text file and can be automatically loaded into CDJ at startup using the View | Options | Maps tab. The syntax of event maps are as follows
# comment - you can put a # sign anywhere and the rest of the line will become a comment.
device:command -"device:command" refers to the name
of the event. This must match the text of the incoming event exactly for the map to take
action
{ - open bracket designates the beginning of the action text
(these brackets work like the C language and can be anywhere on a line
actiondev1:command1 - action commands you want to execute
# comment2 - you can put comments anywhere!
actiondev2:command3 actiondev4:command4 - action
commands you want to execute - note that you can have more than one on a line.
} - close bracket - ends the action sequence
device2:command2 { } -null actions are OK
For further examples, see the maps.txt file in the CDJ directory
You can set up an event map to control CDJ from a remote, have CDJ control your other equipment, or even interface remotes and equipment which have nothing to do with CDJ. Some possible uses of event maps which are easy to implement include:
Automatically turning your stereo on and off at startup and shutdown of CDJ | |
Using a remote control to select and control playlists within CDJ | |
Making your receiver respond to the volume control and muting buttons on the CDJ toolbar | |
Making CDJ automatically switch inputs on your receiver depending on which CD player is playing, thereby allowing multiple changers to be used without a mixer. |
Find pre-existing device files (in the Device Files directory) which match your equipment or make your own device files using E-Z Learn | |
Add the devices to CDJ | |
Create and load an event map file into CDJ |