Discord Rich Presence for the Windows Apple Music desktop app written in C++/WinRT.
- Rich presence with track title, artist, album, progress bar, and pause state
- Album art with Apple Music first, then Spotify, then Imgur as fallbacks (cached in LevelDB)
- Animated album art (Apple Music motion -> GIF) when available
- Optional Last.fm now playing + scrobbling
- Tray icon with metadata copy, copy all, force image refresh, and toggles for Discord Rich Presence/Last.fm (with toast notifications)
- Presence buttons for Apple Music plus Last.fm or Spotify links (when available)
- Low resource usage (~5–10MB RAM, ~0.1% CPU, ~20MB disk with deps)
Warning: this was built for personal use; there is no runtime UI for changing settings. Anything beyond the built-in configuration flow requires editing the source.
- Windows 10/11 with the Apple Music app installed
- Microsoft Visual C++ Redistributable x64 (latest)
- You may already have this: Look in Settings -> Apps -> Installed apps and search for "Microsoft Visual C++ v14 Redistributable"
- Optional API credentials:
- Spotify Client ID + Secret (Available Here)
- Imgur Client ID (Available Here)
- Last.fm API Key + Secret (Available Here)
- Download the latest release here or build from source ( instructions below).
- On first launch (or after reset) you will be prompted in the console for the API keys above.
- After 3 seconds the console closes and MusicPP keeps running from the system tray. Right-click the tray icon to exit.
Saved data:
- Cache/DB:
%LOCALAPPDATA%\\musicpp\\song_db - Logs:
%LOCALAPPDATA%\\musicpp\\logs
When building from source, if you intend to move the final .exe somewhere, make sure to bring the .dlls with it.
The simplest path is CLion with VCPKG integration.
- Install CLion and Microsoft Visual Studio Build Tools (Community works):
winget install --id=Microsoft.VisualStudio.2022.Community
- Clone the project:
git clone https://github.com/Amqx/musicpp
- Install the VCPKG plugin and enable integration for the project (VCPKG -> Edit -> Add Vcpkg integration to existing CMake Profiles).
- Install dependencies:
~/.vcpkg-clion/vcpkg/vcpkg.exe install curl leveldb cppwinrt nlohmann-json spdlog libxml2 ffmpeg pkgconf
- Install the Discord Social SDK into
discordsdk/(see next section). - Build and run from CLion (Shift + F10).
- Install CMake, Ninja, and Visual Studio Build Tools:
winget install --id=Kitware.CMake winget install --id=Ninja-build.Ninja winget install --id=Microsoft.VisualStudio.2022.Community
- Install vcpkg (example path is
C:\vcpkg):git clone https://github.com/microsoft/vcpkg C:\vcpkg C:\vcpkg\bootstrap-vcpkg.bat
- Clone the repository:
git clone https://github.com/Amqx/musicpp
- Install dependencies (manifest mode):
cd musicpp C:\vcpkg\vcpkg.exe install --triplet x64-windows
- Install the Discord Social SDK into
discordsdk/(see next section). - Configure and build (run from a VS Developer PowerShell or after
vcvars64.bat):cmake -S . -B build -G Ninja ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\vcpkg.exe\scripts\buildsystems\vcpkg.cmake" ` -DVCPKG_TARGET_TRIPLET=x64-windows cmake --build build
Download the SDK from the Discord Developer Portal (
log in required).
Choose Social SDK (not the unity/unreal package). Extract discord_social_sdk-{version}.zip, copy
discord_social_sdk into the project root, rename it to discordsdk, and keep the bin, lib, and include folders
intact so CMake can find them.
You can change the presence content in src/discordrp.cpp inside void Discordrp::update(). Available metadata has
already been extracted for you:
- Title (
title) - Artist (
artist) - Album (
album) - Image link (
imglink) - Apple Music link (
amlink) - Last.fm link (
LFMlink) - Spotify link (
splink) - Current playback state (
playing) - Playback start (
start_ts) - Projected end (
end_ts) - Pause timestamp (
pause_ts)
Check links for emptiness before using them, and pick timestamps based on the current playback state (start/end when playing, pause when not). Discord buttons are only visible to other users, not on your own profile.
Tunables live in include/constants.h under the Last.fm section. Read
the Last.fm scrobble docs
and guidelines before changing values. Available settings (format: description (
type)(var)(min)):
- Maximum scrobble attempts (int)(kMaxScrobbleAttempts)
- Maximum now playing attempts (int)(kMaxSetNowPlayingAttempts)
- Minimum track length in seconds (int)(kLfmMinTime)(30)
- Percentage of duration before scrobble (double)(kLfmPercentage)(0.5)
- Time before auto-scrobble in seconds (int)(kLfmElapsedTime)(240)