Debugging and Sharing

Tools to help figure out what is going on in your triggers, share them between projects or with others, and log playlists.


Beat Link Trigger offers a few mechanisms to help you understand how your triggers are (or are not) working, and to save and restore versions of them, or share them with friends and colleagues (or on the Gitter chat or project Wiki to either get help from others, or share and show them off). Help Menu

Help resources can be found in the Help menu, along with an embedded copy of this User Guide, which can be used even if you are not connected to the Internet (although links to other sites will not work in that case).

There’s no way for the author to know how many people are using the the program, or where they are, unless they choose to contact him. Many people have (especially on the Gitter chat), but if you have not, and would like to say hello and share how you are using Beat Link Trigger, it would be greatly appreciated! You can use Help  Send User Greeting (email) to make it easy.


When Beat Link Trigger is running it reports events to a log file. As noted above, this includes full stack traces for compilation problems when you try to save an expression that isn’t quite right. If a problem occurs while trying to run your expression later, that will end up in the log too. So it can be a useful place to look when things are not working the way you expect. You can find the log file by choosing Help  Open Logs Folder.

Each time you launch Beat Link Trigger it creates a new log folder in a temporary directory, so that they can be cleaned up automatically sometime after it exits. It cycles through log files and limits their maximum length, which can be important if an error is being logged each time a packet comes in because of a problematic Enabled Filter expression.

Even if things are not crashing, you might want to log your own information to get a better understanding of what is happening inside one of your expressions. Beat Link Trigger uses timbre to perform its logging, and so can you.

For example, if you are trying to figure out exactly what you are receiving in your Beat expression, you could add this as its first line:

(timbre/info "Received beat" status "master?" tempo-master?)

Suddenly your logs will be growing steadily, filling with lines like these:

2016-Jun-05 00:12:10 Alacrity.local INFO [beat-link-trigger.expressions:?] -
  Received beat Beat: Device 2, name: CDJ-2000nexus, pitch: +0.00%,
  track BPM: 126.0, effective BPM: 126.0, beat within bar: 4 master? true
2016-Jun-05 00:12:11 Alacrity.local INFO [beat-link-trigger.expressions:?] -
  Received beat Beat: Device 33, name: DJM-2000nexus, pitch: +0.00%,
  track BPM: 126.0, effective BPM: 126.0, beat within bar: 1 master? false

Reporting Issues

If you run into trouble and it seems likely the problem is in Beat Link Trigger itself rather than one of your own expressions, you can use Help  Report Issue (email) to send an email to Deep Symmetry asking for help. The message will start out populated with some information about the version of Beat Link Trigger you are running, along with the Java version and operating system, but the more details you can provide in the initial report (along with relevant logs), the more likely we will be able to figure out what is going on.

The program may also offer to compose an issue pre-filled with details when it encounters unexpected messages sent by CDJs it is talking to.

If the problem turns out to be trickier than can be understood from just logs, follow-up questions and experimentation may be needed. In such cases thread dumps are often a valuable next step.

You can also skip the email and open an Issue directly on the project’s GitHub page.

In any case, even if Deep Symmetry is unable to investigate your report immediately (since this is free software developed during our spare time), we very much appreciate you taking the effort to send it.

Inspecting Locals and Globals

In addition to logging values to the log file, you can get a glimpse at what your expressions are up to by opening an inspector window on the Expression Globals or a particular trigger’s Expression Locals. The first is done by choosing Triggers  Inspect Expression Globals. This opens a window showing you all the keys and values that have been created in the globals atom shared by all triggers. Here is what that looks like after the example code shown in the Global Expressions section has run:

Expression Globals

The inspector is a little messy, but right away you can see the three keys we created, and the corresponding Java objects stored under them. by clicking next to the blue diamond in the lower pane, you can expand each entry and dive down into the fields and values that make it up, which can be quite a powerful way to explore the objects.

Similarly, the locals for a trigger can be inspected by choosing Inspect Expression Locals from that trigger’s context menu. Here’s the result of drilling down a little into the :resolume OSC client object created in that example’s trigger:

Expression Locals

Saving and Loading

The entire trigger configuration can be saved to a text file by choosing File  Save to File. That file can be sent to another machine, shared with a colleague, or just kept around for future use after you are done with a different project. As you would expect, File  Load from File replaces the current trigger configuration with one loaded from a save file.

Beat Link Trigger automatically saves your triggers when you exit the program normally. If you shut down your computer, or otherwise force-quit the Beat Link Trigger process, it may not have the chance to do this, and you might lose work. If you are concerned about that happening, you can periodically manually save your current trigger configuration by choosing File  Save.

Save option

Exporting and Importing Triggers

As mentioned in the Triggers Context Menu section, individual triggers can be exported on their own, and imported into other trigger configurations.

Writing Playlists

If you are in a situation where it is important to keep detailed records of the music being played (for example, a radio station that needs to pay royalties), the built in Playlist Writer can help. It builds on the ideas described in the Matching Tracks section to give you a robust, convenient solution.

Start by choosing File  Write Playlist. This will bring up the Playlist Writer window.

Playlist Writer

You can configure how long a track needs to be played for before it gets included in the playlist and whether you want to ignore players that are not reporting themselves as being on the air (very convenient to ignore DJs pre-screening tracks, as long as you are using a DJM mixer that supports this feature, and the players are configured and connected properly).

Once everything is set the way you want it, click Start and you will be prompted to choose where to save the file. Once you have done that, the window updates to show you that the playlist is being written:

Playlist Writer active

From this point on, all tracks that play longer than your configured minimum time will be written to the playlist, in Comma-Separated Value format (for convenient use in spreadsheet programs). The playlist will include track titles, artists, albums (when this information is available), as well as the player they were played on, the source player and media type, when they started and stopped playing, and the total time they played.

When you are done recording the playlist you can either click Stop or close the window, and the file will be closed out.

Learning More


Deep Symmetry logo Copyright © 2016–2019 Deep Symmetry, LLC

Distributed under the Eclipse Public License 1.0, the same as Clojure. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. A copy of the license can be found in LICENSE within this project.

Library Licenses

Remote Tea, used for communicating with the NFSv2 servers on players, is licensed under the GNU Library General Public License, version 2.

The Kaitai Struct Java runtime, used for parsing rekordbox exports and media analysis files, is licensed under the MIT License.