Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TP-Aimp

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.

AIMP Now Playing — Touch Portal Plugin

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.


About the project

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 pyaimp wrapper — 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 with Pillow, and sent to Touch Portal as a base64 image the button can use as its icon.
  • Ships as a single standalone .exe built with PyInstaller (running the raw plugin.py with a Python interpreter works too).

Dependencies (Python packages)

See requirements.txt. Install everything with:

pip install -r requirements.txt
  • touchportal-api — Touch Portal plugin SDK (pulls in pyee)
  • pyaimp — AIMP remote API wrapper (pulls in pywin32)
  • mutagen — reads embedded album art and disc number from file tags
  • pillow — resizes and encodes the cover art
  • pywin32

Build only: pyinstaller.

What it offers

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 / position line 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.on in the plugin folder and restart the plugin to enable plugin.log; delete it to disable. No log file is created by default.

Limitations (honest)

  • 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.

Files

  • plugin.py — the plugin source.
  • placeholder.py — the "No cover" vinyl image as base64 (imported by plugin.py; PyInstaller bundles it into the exe automatically). Keep it next to plugin.py.
  • entry.tp — Touch Portal plugin manifest.
  • requirements.txt, README.md, LICENSE.

Installation (compiled exe)

  1. Create the folder %appdata%\TouchPortal\plugins\AIMPNowPlaying\.
  2. Put entry.tp and AIMPNowPlaying.exe inside it.
  3. Fully restart Touch Portal (Quit from the tray, then reopen).
  4. Approve/allow the plugin when Touch Portal asks.

Note on the start path. plugin_start_cmd in entry.tp uses %TP_PLUGIN_FOLDER% so it works on any machine, but it assumes the plugin folder is named AIMPNowPlaying and the executable is AIMPNowPlaying.exe. If you rename either, update plugin_start_cmd accordingly.

Running from source (no exe)

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\""

Building the exe from source

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.


Disclaimer

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.

License

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.

About

Aimp plugin for touch portal, vibe coding project because noone wanted to make one, i'll try to help but I'm no coder so keep it i mind.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages