Ambify

An Ambience Mini add-on that plays Spotify tracks, albums and playlists as your Minecraft music.

Ambify

IMPORTANT: Spotify Premium needed!

Ambience Mini picks the right music for what you're doing: fighting, exploring, the Nether, the main menu, and so on. Ambify lets any of those slots play music from Spotify instead of a local audio file. Ambience Mini still decides when music plays, and Ambify makes the Spotify app on your computer play it.

Features

  • Spotify links as music files. Put a Spotify link in a .spotify file in your ambience_music/music folder and use it in your Ambience Mini config like any supported file.
  • Tracks, albums, playlists.
  • Follows Ambience Mini. Music starts, pauses and switches when Ambience Mini changes the music. Spotify steps aside when a local file takes over.
  • Picks up where it left off. Switching back to a playlist continues the same song at the same position.
  • Volume sync with Minecraft's music volume slider (optional).
  • Stops when you quit. Spotify pauses when the game closes.
  • One-time login. You stay logged in between game sessions.
  • Client-only. Servers don't need it, and you can join servers that don't have it.

Requirements

  • Minecraft 1.20.1 with Forge 47.4 or newer
  • Ambience Mini 2.7.12 or newer
  • Spotify Premium. Spotify only allows Premium accounts to control playback via its Web API.
  • Spotify open on a device (any platform (web or app) is supported, it doesn't have to be the device that Minecraft is running on)

Setup

Spotify only lets each developer app serve a few allowlisted accounts, so every player creates their own free app. It only takes a short time.

  1. Go to the Spotify Developer Dashboard and create an app:

  2. Copy the app's Client ID into config/ambify-client.toml (the file appears after the first launch): clientId = "your client id here". Restart the game after changing it.

  3. In game, run /ambify login and allow access in the browser window that opens.

Usage

  1. In ambience_music/music/, create a text file ending in .spotify, e.g. battle.spotify, containing a Spotify link: https://open.spotify.com/playlist/37i9dQZF1DX8Uebhn9wzrS. spotify:playlist:... URIs work too. Lines starting with # are ignored.

  2. Use it in ambience_music/music_config.txt like any other music file: play ["battle.spotify"];

  3. Press P to reload Ambience Mini.

You can mix Spotify and local files freely. A single track ends like a normal song and repeats. A playlist or album keeps playing until Ambience Mini switches to something else.

Commands

Command What it does
/ambify or /ambify help Setup steps
/ambify login Connects your Spotify account
/ambify logout Forgets the login
/ambify status Shows the login state and what's playing
/ambify devices Lists your Spotify devices

Configuration

config/ambify-client.toml:

Option Default Description
clientId (empty) Client ID of your Spotify app
callbackPort 43821 Local port for the login callback. If you change it, update the redirect URI in your Spotify app to match.
syncVolume true Sets the Spotify volume from Minecraft's music volume
preferredDevice (empty) Device to use when no Spotify device is active (name or part of it). Empty picks this computer.

Good to know

  • Music plays through the Spotify app, not through Minecraft's sound engine, so OpenAL effects and Minecraft's master volume don't apply to it.
  • If no Spotify device is active, Ambify wakes one up. Keep the Spotify app open.
  • The login is stored outside the Minecraft folder: %APPDATA%\Ambify on Windows, ~/Library/Application Support/Ambify on macOS, and ~/.local/share/ambify on Linux. It only lets Ambify control playback, not change your account.
  • If the game is killed hard (for example with the launcher's Kill button or Task Manager), Spotify can't be told to stop and keeps playing.

Future Additions

  • Track Partitioning – specify only certain parts of a track to be played
  • (maybe) adjustable speed and volume of tracks

FAQ

Why do I need my own Spotify app? Spotify limits developer apps to 5 allowlisted accounts. If each player uses their own app, nobody hits that limit. Of course you can also share one app with people you know, just don't forget to allowlist them. The others will also need Spotify Premium to be able to access the app.

Does it work on servers? It's a client-side mod, so install it only on your own game. It works in singleplayer and on any server.

"No Spotify device found"? Open the Spotify app and play anything once, then try again.


Ambify is not affiliated with or endorsed by Spotify or the Ambience Mini authors. Spotify is a trademark of Spotify AB.

License: MIT

Ambify Team

profile avatar
  • 1
    Projects
  • 6
    Downloads