1
0
mirror of synced 2024-11-14 10:37:39 +01:00

Store Hakus, Fixes #22

This commit is contained in:
Stepland 2021-12-20 22:00:02 +01:00
parent d088c74208
commit 91720fa198
8 changed files with 58 additions and 3 deletions

View File

@ -28,6 +28,7 @@
- `offset` changed sign, it's now the time at which the first beat occurs in the audio file, instead of its opposite
- `offset` now has an implicit default value of 0 in case no timing object in the file defines it
- BPM changes can now be stored in the `bpms` array !
- `hakus` allow storing special background bounce patterns
- **Removed**
- In the metadata object :
- `preview path` is now replaced with the polymorphic `preview`

View File

@ -114,6 +114,11 @@ For example, in this case :
The BPM on beat zero is set to 124
### Duplicate HAKUs
The schema allows of duplicate hakus, implementations should deduplicate hakus by beat.
(multiple-timing-objects)=
### Multiple Timing Objects

View File

@ -89,7 +89,8 @@ Describes the part of the music file that's meant to be played on loop when prev
{
"offset": 0,
"resolution": 240,
"bpms": []
"bpms": [],
"hakus": []
}
```
@ -115,6 +116,10 @@ Describes the relationship between seconds in the audio file and symbolic time (
```
- Array of [BPM events](#bpm)
- **hakus**
- array, optional
- If the key is missing, default to the regular background bounce pattern
- HAKUs (named after the `HAKU` command in .eve files) describe how the background animation should bounce along with the music, most songs just leave a default regular patterns that makes the background bounce on every beat, but some songs use these commands as a gimmick. In that sense they are similar to beat lines in BMS
Timing objects can appear in multiple places in a memon file. The section [](other-things.md#multiple-timing-objects) explains how to deal with them.
@ -240,7 +245,7 @@ A classic long note, with a tail
- Integer between 0 and 5 inclusive
- Tail starting position in 6-notation :
For every given button on the controler, there are 6 possible starting
For every given button on the controller, there are 6 possible starting
positions for long note tails.
For example if the long note is held here :

View File

@ -230,7 +230,7 @@
"$ref": "#/$defs/decimal"
},
"resolution": {
"description": "Number of ticks in a beat for the bpm events",
"description": "Number of ticks in a beat for the bpms and the hakus",
"type": "integer",
"minimum": 1,
"default": 240
@ -255,6 +255,13 @@
"required": ["beat", "bpm"]
},
"default": [{"beat": 0, "bpm": 120}]
},
"hakus": {
"description": "Array of HAKUs, dictates how the background should bounce if the bouncing pattern differs from the usual 4/4",
"type": "array",
"items": {
"$ref": "#/$defs/timeInBeats"
}
}
}
}

View File

@ -0,0 +1,7 @@
{
"version": "1.0.0",
"timing": {
"hakus": ["0.1", "0.2"]
},
"data": {}
}

View File

@ -0,0 +1,11 @@
{
"version": "1.0.0",
"data": {
"a chart": {
"timing": {
"hakus": [0, 1, 2, 3]
},
"notes": []
}
}
}

View File

@ -0,0 +1,7 @@
{
"version": "1.0.0",
"timing": {
"hakus": [0, 1, 2, 3]
},
"data": {}
}

View File

@ -0,0 +1,12 @@
{
"version": "1.0.0",
"timing": {
"hakus": [
[1, 0, 1],
[2, 0, 1],
[3, 0, 1],
4
]
},
"data": {}
}