WIP: The MuSiCaL Update #1

Draft
unfunny wants to merge 27 commits from music into master
2 changed files with 30 additions and 0 deletions
Showing only changes of commit dd15294378 - Show all commits

18
BGM_Integration_Guide.md Normal file
View File

@@ -0,0 +1,18 @@
# BGM Workflow Guide
This guide outlines the process for implementing or modifying Background Music (BGM) functionality across any page using `Music/bgm.js`.
## What I do (Instructions in bullet points, excluding page specific logic)
* **Dependencies:** Ensure `Music/bgm.js` and necessary CSS (`BGMHUD.css`, `normalbordem.css`) are loaded on the target page.
* **Required HTML Elements:** The page must contain `<div id="bgm-title">` and `<div id="autoplay"></div>`.
* **Initialization:** Call `SongRNG('initial')` in the page's script block to start playback immediately upon loading.
* **Manual Control:** For manual control, call `MIDIjs.play(urlOrId, true)` directly when needed.
## What NOT to do (General safety for AI agents)
* Do not modify the core logic within `Music/bgm.js` unless explicitly instructed by a developer request.
* Never assume that calling `SongRNG()` is sufficient; always check if manual playback control (`MIDIjs.play()`) is required after initialization.
## When to use me (When the agent should execute this workflow, eg when asked to add BGM support to a page)
* Use this guide when implementing or modifying BGM features on any page. The process involves updating the target page's HTML/JS and committing changes to `Music/bgm.js` if core logic needs adjustment.
***

12
SKILL.md Normal file
View File

@@ -0,0 +1,12 @@
## What I do (Instructions in bullet points, excluding page specific logic)
### **Workflow Steps:**
* **Dependencies Check:** Verify that `Music/bgm.js`, `BGMHUD.css`, MIDI.js, and `normalbordem.css` are loaded on the target page.
* **Required HTML Elements:** The page must contain `<div id="bgm-title">` and `<div id="autoplay"></div>`.
* **Manual Control:** For manual control, call `MIDIjs.play(urlOrId, true)` directly in your page's script block.
## What NOT to do
* Do not modify the core logic within `Music/bgm.js`.
## When to use me (When the agent should execute this workflow, eg when asked to add BGM support to a page)
* Use this guide when implementing or modifying BGM features on any page. The process involves updating the target page's HTML/JS.