2026-12-05 09:40:14 -05:00
# Install and connect — 0.8.0
2026-12-04 08:58:47 -05:00
## Normal setup
1. Install or update **Adaptive Music** using the existing Foundry manifest URL.
For the staged acceptance build, extract `adaptive-music.zip` into the existing
Foundry user-data `Data/modules/` directory and reload the isolated test world.
The ZIP contains one `adaptive-music/` directory. Do not install the outer release
bundle or source archive as the module.
2026-12-04 11:08:09 -05:00
2. As the single active GM, open Settings → Adaptive Music setup. In **Connection** ,
2026-12-05 09:40:14 -05:00
enter the private **HTTPS Music Assistant server address** and a dedicated
long-lived token from MA → Settings → Profile. On a trusted browser, check
**Remember credentials and reconnect on this trusted device** . Select
**Connect** to authenticate, provision the receiver and load the catalog.
3. Open a scene’ s native **Configure Scene** window. Assign music under
**Adaptive Music** and select **Save assignments** . The Playlists sidebar
also lists draggable MA catalog entries for the scene’ s playlist fields.
Use static playlists with available tracks. MA can list an entry whose
tracks are unavailable when Adaptive Music prepares it for playback.
Use the setup window’ s **Scene Music** tab for world defaults and boss
combatant overrides.
4. Open **Adaptive Music controls** from the token toolbar or Playlists sidebar.
Enable automation once. The controls show the current track, active playlist
when known, volume, position and listeners. Skip, pause, resume, stop and
repeat control the dedicated queue. An override stays active until you select
**Return to scene music** .
2026-12-04 08:58:47 -05:00
5. Players connect automatically. If a browser requires activation, open Campaign
2026-12-05 09:40:14 -05:00
audio and select **Enable Audio** once. The GM can use **Enable GM audio** in the
playback controls after an automatic connection.
2026-12-04 08:58:47 -05:00
2026-12-05 09:40:14 -05:00
The opted-in browser can reconnect on world entry. **Disconnect** ends its live
session and pauses automatic reconnection until you connect again.
**Forget Credentials** also removes the stored token. Reload without retention
requires the token again. The Foundry account remembers an encrypted address and
receiver name. On a different browser, use the same token to unlock the account
record and choose whether that browser may remember it. For a replacement
token, enter the server address again. Revoke obsolete tokens in MA’ s Profile
settings. **Advanced → Forget saved connection** clears the encrypted account
record in addition to the device credential.
2026-12-04 08:58:47 -05:00
2026-12-05 09:40:14 -05:00
MA 2.10.6 assigns a restricted token’ s API sessions to its most recently connected
web receiver. Use a different token for a simultaneously running native MA web
player. New MA playlist assignments are portable across browsers with the same
token, origin and Foundry world. A legacy reference can be migrated by saving
its assignment again in the browser that created it. Another browser can reselect
the playlist. A replaced token can require reassigning the old references.
2026-12-04 08:58:47 -05:00
2026-12-05 09:40:14 -05:00
Keep the GM tab open while serving audio. The setup window is independent of
playback. Automatic reattachment preserves a populated queue until the next
scene or combat music cue. You can also select **Return to scene music** to take
control immediately. If you use Adaptive Music for a scene, leave the scene’ s
native soundtrack playlist unset. Foundry still controls sound effects and
AmbientSound documents. Sequential fades use one dedicated queue, and pause
remembers the position for the active GM session.
2026-12-04 08:58:47 -05:00
## Connection diagnostics
2026-12-04 11:08:09 -05:00
Connection shows authentication, receiver setup and catalog progress. **Check browser
connection** tests both WebSocket routes from the actual Foundry page without sending
an MA authentication frame. Normal browser cookies can accompany the handshake.
2026-12-04 08:58:47 -05:00
**Copy connection diagnostics** supplies a report without address, token, receiver
keys or playlist titles. No browser developer console is required.
| Result | Action |
2026-12-03 20:11:10 -05:00
| --- | --- |
2026-12-04 08:58:47 -05:00
| Enforced CSP block | Have the host administrator review an exact trusted WSS-origin allowance in the existing connect-src policy. Do not remove CSP or allow all origins. |
| Socket fails before opening | Compare this browser’ s MA page, private DNS/routing and local-network site permission. Browser APIs conceal the precise HTTP/TLS failure. |
| API auth denied | Enter a valid token; the remembered receiver is retained. |
| Sendspin auth/pair/sync fails | Check the separate authenticated /sendspin route and the account’ s web-player control permission. |
| Dedicated queue unavailable after pairing | Retry connecting the remembered receiver after MA has registered its queue. |
| Frames arrive but audio is suspended | Select Enable GM audio or the player’ s Enable Audio once. |
| Listener fails negotiation | Check its diagnostics and existing network/ICE route. It is automatically retried after timeout. |
| MA error 2 on playlist startup | MA could not find playable media even if catalog metadata exists. Check that content/provider in MA; this is separate from a WebSocket upgrade failure. |
2026-12-05 09:40:14 -05:00
| Receiver queue access withdrawn | Ensure another web receiver is not using the same MA token. Review dedicated receiver access before reconnecting. |
2026-12-04 08:58:47 -05:00
| Unknown queue write | Review the dedicated queue, then deliberately reconnect; no blind retry occurs. |
Use trusted HTTPS for Foundry and private HTTPS/WSS for both MA `/ws` and `/sendspin` .
Keep Nginx access restrictions, Origin, certificate validation and browser protections.
Keep MA raw-frame VERBOSE logging disabled. No public API/proxy, core modification,
additional container, service, VM or LXC is required by this module. A direct HTTP MA
address cannot be used from HTTPS Foundry. Default ICE does not use a public relay;
remote players still need a viable existing WebRTC path.
2026-12-05 09:40:14 -05:00
If your listeners need an existing private relay, enter it under Connection →
Advanced. Relay credentials expire and stay in the active GM tab. Enter a fresh
relay credential after reloading the GM tab.
2026-12-04 08:58:47 -05:00
2026-12-05 09:40:14 -05:00
See [TESTING.md ](TESTING.md ) for private-route evidence and
[USER-ACCEPTANCE.md ](USER-ACCEPTANCE.md ) for the Mac checklist.
## Install the candidate on an isolated development instance
Foundry loads modules from its instance-wide user-data directory. Use only a
development-only data directory. If the existing world shares an instance with
production worlds, use an isolated development instance and a development-world
copy. The confirmed server build at handoff is v0.7.2.
Unzip the complete release bundle on the development host and run these
commands as the Foundry data owner. Set the first two variables to the existing
development-only `Data` directory and the extracted release directory.
Stop the development instance with its normal service controls before swapping
the module directory.
```sh
(
set -eu
FOUNDRY_DEV_DATA = '/absolute/path/to/development-only/Data'
AM_RELEASE_DIR = '/absolute/path/to/extracted/v0.8.0'
cd " $AM_RELEASE_DIR "
grep ' adaptive-music.zip$' SHA256SUMS | sha256sum -c -
test -d " $FOUNDRY_DEV_DATA /modules"
AM_STAGE = $( mktemp -d " $FOUNDRY_DEV_DATA /adaptive-music-v080.XXXXXX" )
unzip -q adaptive-music.zip -d " $AM_STAGE "
test -f " $AM_STAGE /adaptive-music/module.json"
if [ -d " $FOUNDRY_DEV_DATA /modules/adaptive-music" ] ; then
mv " $FOUNDRY_DEV_DATA /modules/adaptive-music" " $AM_STAGE /previous-adaptive-music"
fi
if ! mv " $AM_STAGE /adaptive-music" " $FOUNDRY_DEV_DATA /modules/adaptive-music" ; then
if [ -d " $AM_STAGE /previous-adaptive-music" ] ; then
mv " $AM_STAGE /previous-adaptive-music" " $FOUNDRY_DEV_DATA /modules/adaptive-music"
fi
exit 1
fi
printf 'Rollback directory: %s\n' " $AM_STAGE "
)
```
Restart the development instance, launch the development world and confirm
**Manage Modules** reports **0.8.0** . Enable the module if needed, then sign in as
**CodexDEV** and follow the acceptance checklist. For rollback, shut down the
development instance, move the candidate module out of `Data/modules` and move
`previous-adaptive-music` from the printed rollback directory back to
`Data/modules/adaptive-music` .
2026-12-04 08:58:47 -05:00
## Manual Gitea publication
The existing stable manifest and versioned download mechanism is preserved:
- Manifest: `https://cheddahboxmb.duckdns.org/CheddahBoxMB/adaptive-music/raw/branch/main/module.json`
2026-12-05 09:40:14 -05:00
- v0.8.0 asset: `https://cheddahboxmb.duckdns.org/CheddahBoxMB/adaptive-music/releases/download/v0.8.0/adaptive-music.zip`
2026-12-04 08:58:47 -05:00
These are the established repository’ s URLs; this work never contacted Gitea or
verified public asset availability. After acceptance, manually publish the included
2026-12-05 09:40:14 -05:00
source to your existing repository, create tag/release `v0.8.0` , attach
2026-12-04 08:58:47 -05:00
`adaptive-music.zip` and the included manifest/checksums, and update the branch
manifest only after its versioned asset exists. The outer bundle includes full
source, docs, licenses, metadata and SHA256SUMS. Keep the previous immutable release
assets for rollback. To roll back, restore the prior branch manifest/module ZIP;
MA queues and remembered browser identities are not automatically deleted.