-
Notifications
You must be signed in to change notification settings - Fork 3
Adding Key Counts
There are 3 methods for adding key counts to songs with MultiKeys, listed in order of priority:
- ScriptedSong Class Code (Highest Priority)
- Song Metadata (Medium Priority)
- Song MultiMeta (Lowest Priority)
For adding key counts to a ScriptedSong, create a setupMultikey() function, for example:
class TutorialSong extends ScriptedSong {
function new() {
super("tutorial");
}
function setupMultikey() {
// Add other logic if needed...
Strumline.KEY_COUNT = 8;
}
}There are two approaches for modifying song metadata:
Add a "keyCounts" field within the "playData" field of your song's metadata:
{
"playData": {
"keyCounts": { "easy": 1, "normal": 5, "hard": 9 },
}
}Use this method when the song metadata already exists to avoid overwriting existing data.
Create a file at _merge/data/songs//-metadata.json:
[
{ "op": "add", "path": "/playData/keyCounts", "value": { "easy": 5, "normal": 6, "hard": 7 } }
]|
For more details on JSON Patch, see the official documentation.
This is the simplest method and allows you to create a separate file alongside the metadata.
Create a file at data/songs//-multidata.json:
{
"keyCounts": {
"variation": {
"default": { "easy": 1, "normal": 5, "hard": 9 },
"pico": { "easy": 5 }
}
}
}Benefits:
- Keeps multikey data separate from main metadata
- Supports multiple variations
- Easy to manage and modify
Metadata Files:
- Direct:
data/songs/<songID>/<songID>-metadata.json - JSON Patch:
_merge/data/songs/<songID>/<songID>-metadata.json
MultiMeta Files:
data/songs/<songID>/<songID>-multidata.json
ScriptedSong Files:
data/songs/<songID>/<SongName>Song.hx
- Key Count Range: Only 1-9 keys are supported. Values outside this range default to 4 keys
- File Naming: Ensure consistent naming with matching your song's identifier
- JSON Syntax: Validate your JSON files to prevent parsing errors
- Variation Support: MultiMeta supports multiple song variations (default, pico, etc.)