TPM2 export for DIAMEX LED players
Export a sequence as a TPM2 file and play it from the microSD card of a DIAMEX LED-Player-ME without a computer.
Updated
Small installations with a few LED strips or a small matrix don’t need a big controller. A DIAMEX LED player plays TPM2 files straight from a microSD card – no computer, no network. This guide uses the LED-Player-ME as an example to show how to export a sequence from PixDrive Studio for it.
What is TPM2?
TPM2 is a simple format for LED data: the file only contains the color values of all LEDs, frame after frame. It contains no frame rate and no split across outputs. You set both on the player – and they must match your export.
Requirements
- PixDrive Studio with a license. Export is part of the sequencer, which isn’t available in the demo version.
- A finished sequence in the sequencer.
- A device in PixDrive Studio with the fixtures connected to the player.
- An LED-Player-ME with WS2811/WS2812-compatible LEDs (RGB or RGBW).
- A microSD card: SD or SDHC up to 32 GB, formatted as FAT32 or FAT16. The player doesn’t recognize SDXC cards with exFAT.
How the player splits the LEDs
The LED-Player-ME has four outputs. It reads the LEDs from the file in order and fills one output after another: with S_LEDS=100, LEDs 1–100 go to output 1, LEDs 101–200 to output 2, and so on.
Two rules follow from that:
- Every output has the same LED count. The
S_LEDSsetting applies to all outputs. If a strip is shorter, the data doesn’t shift – the extra LED values for that output simply go nowhere. So plan strips of equal length, or set up the fixtures so each output gets exactlyS_LEDSLEDs. - The limits depend on the version. The player comes as ME-2048 and ME-4096:
| Version | RGB per output | RGB total | RGBW per output | RGBW total |
|---|---|---|---|---|
| LED-Player-ME 2048 | 512 | 2048 | 512 | 2048 |
| LED-Player-ME 4096 | 1024 | 4096 | 768 | 3072 |
1. Prepare the fixtures
The TPM2 export writes all fixtures of the selected device one after another into the file, in the order they are set up in the device.
- Add the fixtures in the order they are wired to the outputs: everything on output 1 first, then output 2, and so on.
- Make sure the LEDs per output add up to exactly the value you’ll enter as
S_LEDS. Example: two strips of 150 LEDs on outputs 1 and 2 →S_LEDS=150,S_CHANNELS=2. - Set the LED type to RGB, even for RGBW LEDs (SK6812). TPM2 only carries three color values per LED; the player calculates the white part itself (see
RGBW_MODEbelow). - Leave the color order at RGB (the default). You set the actual order of your LEDs on the player with
COLOR_MAP. That way colors are reordered in one place only.
Set up a matrix as a matrix fixture in PixDrive Studio as usual. PixDrive Studio handles the pixel mapping, so the player stays on LAYOUT=STRIPE.
2. Export the file
- Open Sequencer at the top and load your sequence.
- Click Export in the transport bar.
- Under Format, choose TPM2 Serial (.tpm2). This is the TPM2 format described in the LED-Player-ME manual.
- Under Device, choose the device with your fixtures.
- Set the Framerate (FPS). The LED-Player-ME plays at most 50 frames per second – 25 or 30 is a good choice. Remember the number, you’ll need it for the player.
- Click Export and save the file.
3. Copy the file to the SD card
The player looks for files with the .TP2 or .OUT extension in the root folder of the card. Rename the exported file, for example from Auto-00001.tpm2 to SHOW01.TP2, and copy it to the root folder.
- File names can be up to 55 characters long; upper and lower case don’t matter.
- Subfolders are not searched.
- The player keeps track of up to 256 files.
- Without
FILEentries in the configuration, it plays files in alphabetical order. Number them with the same number of digits:SHOW01.TP2,SHOW02.TP2…SHOW10.TP2.
4. Create the configuration file
Without a configuration, the player assumes four outputs with 256 LEDs each and 25 frames per second. If that doesn’t match your setup, create a text file named _CONFIG_ in the root folder of the card:
AUTOSTART=1
LAYOUT=STRIPE
S_CHANNELS=2
S_LEDS=150
FPS=30
COLOR_MAP=G,R,B
RGBW_MODE=RGBW_OFF
FILE="SHOW01.TP2", C=0
| Entry | Meaning |
|---|---|
AUTOSTART=1 |
playback starts automatically as soon as the card is detected |
LAYOUT=STRIPE |
output the LEDs as strips – the pixel mapping comes from PixDrive Studio |
S_CHANNELS |
number of outputs in use, 1–4 |
S_LEDS |
LEDs per output, see the table above |
FPS |
the same frame rate as the export, 1–50 |
COLOR_MAP |
color order of your LEDs, e.g. G,R,B for WS2812. Four values for RGBW LEDs, e.g. G,R,B,W |
RGBW_MODE |
RGBW_OFF for RGB LEDs. For RGBW LEDs RGBW_EQUAL (white only for pure white) or RGBW_DIFF (the shared part of R, G and B goes to white) |
FILE="name", … |
play the file in this order. C=0 repeats it endlessly, C=3 three times. F= and B= set frame rate and brightness (0–200 %) for this file only |
Add more files as further FILE lines. The FILE lines belong at the end of the file, otherwise the settings above them don’t apply. Put the file name in quotes.
Make sure the file is really named _CONFIG_, without an extension. Windows and macOS like to add .txt unnoticed when saving. Use a plain text editor, not Word.
The configuration from the card applies until the player loses power. To keep it permanently, add the line SAVE=1.
5. Play
Insert the microSD card into the player, ideally while it’s switched off – some cards cause a restart when inserted during operation. With AUTOSTART=1 playback starts right away and the status LED flickers blue.
| Button | Short press | Long press |
|---|---|---|
| Button 1 | next file | pause playback, the current frame stays on |
| Button 2 | start the current file or restart it | pause playback, all LEDs off |
The status LED shows what’s going on:
| Status LED | Meaning |
|---|---|
| green, fast blinking | configuration read, but no TPM2 file found – check extension and location |
| yellow blinking | file is waiting for a button press to start |
| red: long – short | SD card can’t be read – check the card and its format |
| red: long – long – short | error in _CONFIG_, invalid value |
| red: 4 × short | file missing or not valid TPM2 – check the name in the FILE entry and export as TPM2 Serial |
Troubleshooting
Colors are swapped – adjust COLOR_MAP. You can check the order with the test mode: remove the card, then press button 1 briefly while the player is idle (green blinking slowly). Each further press cycles red, yellow, green, cyan, blue, magenta, white. A long press on button 1 ends the test mode.
The show runs too fast or too slow – FPS in _CONFIG_ differs from the export frame rate.
The pattern is shifted from one output on – the LED count per output in PixDrive Studio doesn’t match S_LEDS.
Some LEDs stay dark – the file contains fewer LEDs than configured, or S_CHANNELS is too small.
The LEDs flicker – the frame rate is too high for the number of LEDs per output. As a guideline: up to 512 RGB LEDs per output at 50 frames per second; lower the frame rate above that.
All player settings are described in the DIAMEX LED-Player-ME manual (German), including starting individual files via external buttons.