Aimp plugin for touch portal, vibe coding project because no one wanted to make this, if problems will be found i'll try to help but I'm no coder so keep it i mind.
A Touch Portal plugin that brings AIMP "now playing" information and playback control onto your Touch Portal deck: track metadata, album art, playback state, and buttons to control the player.
This is a hobby project, built to show what AIMP is currently playing on a Touch Portal button (title, artist, album art, progress…) and to control AIMP directly from the deck. It was developed and tested against AIMP 5 on Windows.
- Language: Python 3 (developed on Python 3.14)
- AIMP side: reads AIMP's standard remote API (shared memory + window
messages) through the
pyaimpwrapper — no DLL is injected into AIMP. - Touch Portal side: connects over the local Touch Portal plugin socket
through
TouchPortalAPI, and registers its states dynamically. - Album art: read from the currently playing file's embedded tags with
mutagen, resized/encoded withPillow, and sent to Touch Portal as a base64 image the button can use as its icon. - Ships as a single standalone
.exebuilt with PyInstaller (running the rawplugin.pywith a Python interpreter works too).
See requirements.txt. Install everything with:
pip install -r requirements.txt
touchportal-api— Touch Portal plugin SDK (pulls inpyee)pyaimp— AIMP remote API wrapper (pulls inpywin32)mutagen— reads embedded album art and disc number from file tagspillow— resizes and encodes the cover artpywin32
Build only: pyinstaller.
States (use them on button text, or as event triggers):
- Artist, Title, Album
- Year, Track #, Disc #
- Bitrate (kbps)
- Duration, Position, Progress (%)
- State —
Playing/Paused/Stopped/Not running - Shuffle —
On/Off - Repeat —
On/Off - Cover — album art as a base64 image (use it as a button icon)
- Now Playing (line) — a single combined
artist / progress / positionline that goes empty when AIMP is closed (so the whole text hides itself)
Actions (put them on a button's On Pressed):
- Play / Pause, Play, Pause, Stop
- Next track, Previous track
- Toggle Shuffle, Toggle Repeat
Cover behaviour:
- Tracks with embedded art show that art; tracks without embedded art show a built-in "No cover" vinyl placeholder.
- The last shown image (real cover or placeholder) is buffered to disk
(
cover_cache.b64) and restored on startup — even right after a reboot, before AIMP is launched. Closing AIMP keeps whatever was last displayed.
Other behaviour:
- Survives AIMP being closed and reopened (it refreshes AIMP's window handle), and clears the text/number states cleanly while AIMP is not running.
- Optional troubleshooting log: create an empty file named
debug.onin the plugin folder and restart the plugin to enableplugin.log; delete it to disable. No log file is created by default.
- Windows only — it relies on AIMP's Windows remote interface.
- No playlist / queue / "next track" — AIMP's remote API does not expose the playlist or the upcoming track, so this cannot be read externally.
- Cover art comes from the file's embedded artwork; internet radio streams have no cover (the placeholder is shown).
- Polling-based (~1 second update interval); AIMP's remote API has no push events.
plugin.py— the plugin source.placeholder.py— the "No cover" vinyl image as base64 (imported byplugin.py; PyInstaller bundles it into the exe automatically). Keep it next toplugin.py.entry.tp— Touch Portal plugin manifest.requirements.txt,README.md,LICENSE.
- Create the folder
%appdata%\TouchPortal\plugins\AIMPNowPlaying\. - Put
entry.tpandAIMPNowPlaying.exeinside it. - Fully restart Touch Portal (Quit from the tray, then reopen).
- Approve/allow the plugin when Touch Portal asks.
Note on the start path.
plugin_start_cmdinentry.tpuses%TP_PLUGIN_FOLDER%so it works on any machine, but it assumes the plugin folder is namedAIMPNowPlayingand the executable isAIMPNowPlaying.exe. If you rename either, updateplugin_start_cmdaccordingly.
Put plugin.py and placeholder.py in the plugin folder, install the
dependencies for the Python you'll use, and set plugin_start_cmd in entry.tp
to launch the script, e.g.:
"plugin_start_cmd": "\"C:\\Path\\To\\python.exe\" \"%TP_PLUGIN_FOLDER%AIMPNowPlaying\\plugin.py\""
With plugin.py and placeholder.py in the same folder:
pip install pyinstaller
pyinstaller --onefile --noconsole --name AIMPNowPlaying plugin.py
The result is dist\AIMPNowPlaying.exe. Copy it into the plugin folder
(placeholder.py is bundled inside the exe, so it isn't needed separately).
Note: PyInstaller --onefile executables are sometimes flagged as suspicious by
antivirus software (a common false positive caused by how the Python runtime is
packed). The source is included so you can review and build it yourself.
This plugin is provided "as is", without any warranty of any kind, express or implied. The author accepts no responsibility or liability for any damage, data loss, or other harm arising from downloading, installing, running, modifying, or distributing this software. By using it, you do so entirely at your own risk and take full responsibility.
This project is not affiliated with, endorsed by, or associated with AIMP or Touch Portal / their developers. All trademarks belong to their respective owners.
Released under the MIT License — see the LICENSE file. In short: you may
use, copy, modify, and redistribute it freely, provided the copyright notice and
the license text are kept. It comes with no warranty.