Package the skafinity / rotaliate procedural-music engine as a standalone s&box asset that other s&box developers can drop into their own games to get endless, deterministic procedural ska/reggae music from a shareable vibe:tag:n seed.
This is the inverse direction of the rest of this repo: skafinity is the web port of the rotaliate-client engine; this issue is about re-extracting that same engine from ../rotaliate-client into a clean, reusable s&box library/asset. The algorithmic source of truth stays the C# in reference/ (and the live rotaliate-client).
Plausibility: ~8/10
The hard part is already done. The generator is effectively a dependency-free library; the only real work is wrapping the playback driver and severing two game-specific hooks. PRNG parity is already pinned and proven (the skafinity web port reproduces it bit-for-bit), so the determinism contract is solid.
Scope
Tier A — generator (drop-in, ~0 effort)
MusicGen.cs and VibeCodec.cs import only System.* — no Sandbox/Rotaliate/SoundStream coupling. Lift verbatim into the package.
- Public API is already library-shaped:
GenerateSamples(), the chunked BeginPlan → RenderPitchedRange → FinishMono path, and VibeCodec.Encode/Apply/Fields, all over a plain MusicGen.Config.
Tier B — playback driver (~1–2 days)
Fork MusicController.cs into e.g. SkafinityMusicPlayer : Component and strip the two rotaliate-specific dependencies:
PlayerData persistence (~20 call sites: tag, vibe, MusicN, volume, enable) → replace with component [Property] fields + an optional Action<int> onAdvance / persistence callback.
LobbyNetworkManager admin-follow (SyncWithAdmin/ApplyFollow/CanFollowAdmin, ~80 lines) → delete, or expose as an optional hook.
- Keep the s&box
SoundStream/SoundHandle/Mixer plumbing, GameTask.RunInThreadAsync worker fan-out, and the [Property] inspector knobs — that plumbing is exactly what makes this an s&box asset rather than the web port. The crossfade/look-ahead logic (PushTransition, FillAhead, WriteSongBody) is self-contained and reusable verbatim.
Deliverables
Open question — monetization (resolve before publishing)
Whether you can charge for this as an s&box asset is unconfirmed. s&box (Facepunch) distributes via its own registry (sbox.game / historically asset.party) and has leaned toward free community sharing with game-centric payouts rather than a paid per-asset store, but its commercial terms have shifted during development. Verify before relying on it:
- sbox.game and the official s&box docs/wiki publishing + licensing pages
- Facepunch's ToS / monetization & payout policy
- s&box Discord / forums for the current practical answer
Package the skafinity / rotaliate procedural-music engine as a standalone s&box asset that other s&box developers can drop into their own games to get endless, deterministic procedural ska/reggae music from a shareable
vibe:tag:nseed.This is the inverse direction of the rest of this repo: skafinity is the web port of the rotaliate-client engine; this issue is about re-extracting that same engine from
../rotaliate-clientinto a clean, reusable s&box library/asset. The algorithmic source of truth stays the C# inreference/(and the live rotaliate-client).Plausibility: ~8/10
The hard part is already done. The generator is effectively a dependency-free library; the only real work is wrapping the playback driver and severing two game-specific hooks. PRNG parity is already pinned and proven (the skafinity web port reproduces it bit-for-bit), so the determinism contract is solid.
Scope
Tier A — generator (drop-in, ~0 effort)
MusicGen.csandVibeCodec.csimport onlySystem.*— noSandbox/Rotaliate/SoundStreamcoupling. Lift verbatim into the package.GenerateSamples(), the chunkedBeginPlan → RenderPitchedRange → FinishMonopath, andVibeCodec.Encode/Apply/Fields, all over a plainMusicGen.Config.Tier B — playback driver (~1–2 days)
Fork
MusicController.csinto e.g.SkafinityMusicPlayer : Componentand strip the two rotaliate-specific dependencies:PlayerDatapersistence (~20 call sites: tag, vibe,MusicN, volume, enable) → replace with component[Property]fields + an optionalAction<int> onAdvance/ persistence callback.LobbyNetworkManageradmin-follow (SyncWithAdmin/ApplyFollow/CanFollowAdmin, ~80 lines) → delete, or expose as an optional hook.SoundStream/SoundHandle/Mixerplumbing,GameTask.RunInThreadAsyncworker fan-out, and the[Property]inspector knobs — that plumbing is exactly what makes this an s&box asset rather than the web port. The crossfade/look-ahead logic (PushTransition,FillAhead,WriteSongBody) is self-contained and reusable verbatim.Deliverables
MusicGen+VibeCodecunchanged.SkafinityMusicPlayer : Componentwith the two hooks abstracted out.MusicScreen.razorvibe-editor as a sample UI.Open question — monetization (resolve before publishing)
Whether you can charge for this as an s&box asset is unconfirmed. s&box (Facepunch) distributes via its own registry (sbox.game / historically asset.party) and has leaned toward free community sharing with game-centric payouts rather than a paid per-asset store, but its commercial terms have shifted during development. Verify before relying on it: