Switch to MyST for markdown docs
This commit is contained in:
parent
ed8b8fb846
commit
dac9f549aa
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
build
|
build
|
||||||
_build
|
_build
|
||||||
**.pyc
|
**.pyc
|
||||||
|
__pycache__
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Sphinx==3.3.1
|
Sphinx==3.3.1
|
||||||
sphinx-rtd-theme==0.5.0
|
sphinx-rtd-theme==1.0.0
|
||||||
recommonmark==0.6.0
|
myst-parser==0.15.2
|
@ -13,8 +13,6 @@
|
|||||||
# import os
|
# import os
|
||||||
# import sys
|
# import sys
|
||||||
# sys.path.insert(0, os.path.abspath('.'))
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
import recommonmark
|
|
||||||
from recommonmark.transform import AutoStructify
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
@ -34,7 +32,7 @@ release = '1.0.0'
|
|||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autosectionlabel',
|
'sphinx.ext.autosectionlabel',
|
||||||
'sphinx_rtd_theme',
|
'sphinx_rtd_theme',
|
||||||
'recommonmark'
|
'myst_parser'
|
||||||
]
|
]
|
||||||
|
|
||||||
# Make sure the target is unique
|
# Make sure the target is unique
|
||||||
@ -67,16 +65,3 @@ html_theme_options = {
|
|||||||
'logo_only': False,
|
'logo_only': False,
|
||||||
'collapse_navigation': False,
|
'collapse_navigation': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
# At the bottom of conf.py
|
|
||||||
def setup(app):
|
|
||||||
app.add_config_value(
|
|
||||||
'recommonmark_config',
|
|
||||||
{
|
|
||||||
'enable_auto_toc_tree': True,
|
|
||||||
'auto_toc_maxdepth': 2,
|
|
||||||
'auto_toc_tree_section': 'memon',
|
|
||||||
},
|
|
||||||
True
|
|
||||||
)
|
|
||||||
app.add_transform(AutoStructify)
|
|
@ -1,14 +1,15 @@
|
|||||||
# memon
|
memon
|
||||||
|
=====
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
(memo + json)
|
||||||
|
□□□■——◁
|
||||||
|
|
||||||
```
|
|
||||||
(memo + json)
|
|
||||||
□□□■——◁
|
|
||||||
```
|
|
||||||
|
|
||||||
*memon* is a JSON-based jubeat chart set format designed to be easier to parse than existing "memo-like" formats (memo, youbeat, etc ...). The goal of this format is to allow for easier and faster creation of tools and simulators.
|
*memon* is a JSON-based jubeat chart set format designed to be easier to parse than existing "memo-like" formats (memo, youbeat, etc ...). The goal of this format is to allow for easier and faster creation of tools and simulators.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
- [Schema](schema.md)
|
schema
|
||||||
- [Validation](validation.md)
|
validation
|
||||||
- [Changelog](changelog.md)
|
changelog
|
||||||
|
|
@ -15,21 +15,18 @@ This is the root / top level structure of a memon file.
|
|||||||
|
|
||||||
It's a json object with the following keys :
|
It's a json object with the following keys :
|
||||||
|
|
||||||
**version**
|
- **version**
|
||||||
- string, required
|
- string, required
|
||||||
- Indicates the schema version this memon file uses, follows [semver](https://semver.org/)
|
- Indicates the schema version this memon file uses, follows [semver](https://semver.org/). If a memon file does not have this key it's probably following the pre-semver format
|
||||||
|
- **metadata**
|
||||||
If a memon file does not have this key it's probably following the pre-semver format
|
- object, required
|
||||||
|
- Contains the {ref}`metadata object <metadata>`
|
||||||
**metadata**
|
- **data**
|
||||||
- object, required
|
- object, required
|
||||||
- Contains the [metadata object](#metadata)
|
- Contains the {ref}`data object <data>`
|
||||||
|
|
||||||
**data**
|
|
||||||
- object, required
|
|
||||||
- Contains the [data object](#data)
|
|
||||||
|
|
||||||
|
|
||||||
|
(metadata)=
|
||||||
## Metadata
|
## Metadata
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -46,37 +43,30 @@ It's a json object with the following keys :
|
|||||||
```
|
```
|
||||||
Contains information that applies to the whole set of charts
|
Contains information that applies to the whole set of charts
|
||||||
|
|
||||||
**song title**
|
- **song title**
|
||||||
- string, required
|
- string, required
|
||||||
|
- **artist**
|
||||||
**artist**
|
- string, required
|
||||||
- string, required
|
- **music path**
|
||||||
|
- string, optional
|
||||||
**music path**
|
- Path to the music file, *relative* to the memon file.
|
||||||
- string, optional
|
- **album cover path**
|
||||||
- Path to the music file, *relative* to the memon file.
|
- string, optional
|
||||||
|
- Relative path to the jacket / album cover / album art to be shown in music select for example. usually a square image
|
||||||
**album cover path**
|
- **BPM**
|
||||||
- string, optional
|
- number, required
|
||||||
- Path the jacket / album cover / album art to be shown in music select for example. usually a square image
|
- Song tempo in Beats per Minute.
|
||||||
|
- **offset**
|
||||||
**BPM**
|
- number, required
|
||||||
- number, required
|
- In seconds, opposite of the time position of the first beat in the music file. For instance, if the first beat occurs at 0.15 seconds in the audio file, `offset̀` should be -0.15
|
||||||
- Song tempo in Beats per Minute.
|
- **preview**
|
||||||
|
- object, optional
|
||||||
**offset**
|
- If present, contains a {ref}`preview object <preview>`
|
||||||
- number, required
|
- **preview path**
|
||||||
- In seconds, opposite of the time position of the first beat in the music file. For instance, if the first beat occurs at 0.15 seconds in the audio file, `offset̀` should be -0.15
|
- string, optional
|
||||||
|
- Path to a preview file to be played on loop at the music select screen. Alternative to the music sample described by `preview`.
|
||||||
**preview**
|
|
||||||
- object, optional
|
|
||||||
- If present, contains a [preview object](#preview)
|
|
||||||
|
|
||||||
**preview path**
|
|
||||||
- string, optional
|
|
||||||
- Path to a preview file to be played on loop at the music select screen. Alternative to the music sample described by `"preview"`.
|
|
||||||
|
|
||||||
|
|
||||||
|
(preview)=
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -88,15 +78,14 @@ Contains information that applies to the whole set of charts
|
|||||||
|
|
||||||
Describes the part of the music file that's meant to be played on loop when previewing this song at the music select screen
|
Describes the part of the music file that's meant to be played on loop when previewing this song at the music select screen
|
||||||
|
|
||||||
**position**
|
- **position**
|
||||||
- number, required
|
- number, required
|
||||||
- In seconds, start of the loop
|
- In seconds, start of the loop
|
||||||
|
- **length**
|
||||||
**length**
|
- number, required
|
||||||
- number, required
|
- In seconds, duration of the loop
|
||||||
- In seconds, duration of the loop
|
|
||||||
|
|
||||||
|
|
||||||
|
(data)=
|
||||||
## Data
|
## Data
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -108,7 +97,7 @@ Describes the part of the music file that's meant to be played on loop when prev
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The data object maps difficulty names to [chart objects](#chart).
|
The data object maps difficulty names to {ref}`chart objects <chart>`.
|
||||||
|
|
||||||
Keys in this object are not fixed, they can be any string.
|
Keys in this object are not fixed, they can be any string.
|
||||||
|
|
||||||
@ -118,7 +107,7 @@ When sorting, difficulties may be presented in that order :
|
|||||||
|
|
||||||
BSC ➔ ADV ➔ EXT ➔ (everything else in alphabetical order)
|
BSC ➔ ADV ➔ EXT ➔ (everything else in alphabetical order)
|
||||||
|
|
||||||
|
(chart)=
|
||||||
## Chart
|
## Chart
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -129,20 +118,18 @@ When sorting, difficulties may be presented in that order :
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**level**
|
- **level**
|
||||||
- number, required
|
- number, required
|
||||||
- Chart level, can be an integer or a decimal value
|
- Chart level, can be an integer or a decimal value
|
||||||
|
- **resolution**
|
||||||
**resolution**
|
- number, required
|
||||||
- number, required
|
- Greater than 0, always an integer
|
||||||
- Greater than 0, always an integer
|
- Number of ticks in a beat, denominator of all beat fractions. Usually 240
|
||||||
- Number of ticks in a beat, denominator of all beat fractions. Usually 240
|
- **notes**
|
||||||
|
- array, required
|
||||||
**notes**
|
- Array of {ref}`tap notes <tap-note>` and {ref}`long notes <long-note>` that make up the chart
|
||||||
- array, required
|
|
||||||
- Array of [tap notes](#tap-note) and [long notes](#long-note) that make up the chart
|
|
||||||
|
|
||||||
|
|
||||||
|
(tap-note)=
|
||||||
## Tap Note
|
## Tap Note
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -154,21 +141,20 @@ When sorting, difficulties may be presented in that order :
|
|||||||
|
|
||||||
A classic note
|
A classic note
|
||||||
|
|
||||||
**n**
|
- **n**
|
||||||
- number, required
|
- number, required
|
||||||
- Integer between 0 and 15 inclusive
|
- Integer between 0 and 15 inclusive
|
||||||
- The note position, given this way :
|
- The note position, given this way :
|
||||||
```
|
```
|
||||||
0 1 2 3
|
0 1 2 3
|
||||||
4 5 6 7
|
4 5 6 7
|
||||||
8 9 10 11
|
8 9 10 11
|
||||||
12 13 14 15
|
12 13 14 15
|
||||||
```
|
```
|
||||||
|
- **t**
|
||||||
**t**
|
- number, required
|
||||||
- number, required
|
- Integer greater or equal to 0
|
||||||
- Integer greater or equal to 0
|
- Note timing in ticks.
|
||||||
- Note timing in ticks.
|
|
||||||
|
|
||||||
It can be seen as the numerator of the beat fraction.
|
It can be seen as the numerator of the beat fraction.
|
||||||
|
|
||||||
@ -177,7 +163,7 @@ A classic note
|
|||||||
|
|
||||||
For more info about measuring time in ticks ticks, see [bmson's docs](https://bmson-spec.readthedocs.io/en/master/doc/index.html#terminologies) (their docs refers to ticks as *pulses*).
|
For more info about measuring time in ticks ticks, see [bmson's docs](https://bmson-spec.readthedocs.io/en/master/doc/index.html#terminologies) (their docs refers to ticks as *pulses*).
|
||||||
|
|
||||||
|
(long-note)=
|
||||||
## Long Note
|
## Long Note
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -191,17 +177,16 @@ A classic note
|
|||||||
|
|
||||||
A classic long note, with a tail
|
A classic long note, with a tail
|
||||||
|
|
||||||
**n** and **t** are the same as in a [tap note](#tap-note)
|
**n** and **t** are the same as in a {ref}`tap note <tap-note>`
|
||||||
|
|
||||||
**l**
|
- **l**
|
||||||
- number, required
|
- number, required
|
||||||
- Integer greater than 0
|
- Integer greater than 0
|
||||||
- Long note duration ("l" as in length ?!), in ticks
|
- Long note duration ("l" as in length ?!), in ticks
|
||||||
|
- **p**
|
||||||
**p**
|
- number, required
|
||||||
- number, required
|
- Integer between 0 and 11 inclusive
|
||||||
- Integer between 0 and 11 inclusive
|
- Tail starting position, relative to note position, counting from 0 to 11, spiraling out, clockwise, starting one square above the note
|
||||||
- Tail starting position, relative to note position, counting from 0 to 11, spiraling out, clockwise, starting one square above the note
|
|
||||||
|
|
||||||
Here the possible values have been laid out visually, `"■"` marks the note :
|
Here the possible values have been laid out visually, `"■"` marks the note :
|
||||||
```
|
```
|
||||||
|
@ -53,9 +53,9 @@ Parsers should only keep one note for each `(n, t)` couple
|
|||||||
|
|
||||||
### Hitbox Overlap
|
### Hitbox Overlap
|
||||||
|
|
||||||
*(This describes **hitbox** overlap, for marker animation overlap see [this section](#marker-animation-overlap))*
|
*(This describes **hitbox** overlap, for marker animation overlap see {ref}`marker-animation-overlap`)*
|
||||||
|
|
||||||
Another possible problem is this :
|
This set of notes has another problem, but at first glance it's unclear why :
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
@ -64,7 +64,7 @@ Another possible problem is this :
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
The problem becomes obvious when viewed on a timeline :
|
The problem becomes obvious when the data is plotted on a timeline :
|
||||||
|
|
||||||
```
|
```
|
||||||
ticks 0 1 2 3 4 5 6 7 8 9 10 11 ...
|
ticks 0 1 2 3 4 5 6 7 8 9 10 11 ...
|
||||||
@ -93,6 +93,7 @@ To clarify, a long note *lasts* for the amount of ticks specified by its `L` key
|
|||||||
|
|
||||||
Parsers should **reject** charts with these kinds of overlapping notes.
|
Parsers should **reject** charts with these kinds of overlapping notes.
|
||||||
|
|
||||||
|
(marker-animation-overlap)=
|
||||||
### Marker Animation Overlap
|
### Marker Animation Overlap
|
||||||
|
|
||||||
Due to the duration of a marker animation, two notes whose hitboxes don't overlap can however happen too close to one another to allow both marker animations to appear separately. Most official jubeat charts avoid this (with some notable exceptions like [Polaris ADV](https://remywiki.com/Polaris#Trivia)).
|
Due to the duration of a marker animation, two notes whose hitboxes don't overlap can however happen too close to one another to allow both marker animations to appear separately. Most official jubeat charts avoid this (with some notable exceptions like [Polaris ADV](https://remywiki.com/Polaris#Trivia)).
|
||||||
|
Loading…
Reference in New Issue
Block a user