1
0
mirror of synced 2024-11-12 01:30:52 +01:00

Switch to MyST for markdown docs

This commit is contained in:
Stepland 2021-10-08 00:51:18 +02:00
parent ed8b8fb846
commit dac9f549aa
6 changed files with 125 additions and 152 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
build
_build
**.pyc
__pycache__

View File

@ -1,3 +1,3 @@
Sphinx==3.3.1
sphinx-rtd-theme==0.5.0
recommonmark==0.6.0
sphinx-rtd-theme==1.0.0
myst-parser==0.15.2

View File

@ -13,8 +13,6 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import recommonmark
from recommonmark.transform import AutoStructify
# -- Project information -----------------------------------------------------
@ -34,7 +32,7 @@ release = '1.0.0'
extensions = [
'sphinx.ext.autosectionlabel',
'sphinx_rtd_theme',
'recommonmark'
'myst_parser'
]
# Make sure the target is unique
@ -66,17 +64,4 @@ html_logo = '_static/memon-logo-white.svg'
html_theme_options = {
'logo_only': 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)
}

View File

@ -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.
- [Schema](schema.md)
- [Validation](validation.md)
- [Changelog](changelog.md)
.. toctree::
schema
validation
changelog

View File

@ -15,21 +15,18 @@ This is the root / top level structure of a memon file.
It's a json object with the following keys :
**version**
- string, required
- 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**
- object, required
- Contains the [metadata object](#metadata)
**data**
- object, required
- Contains the [data object](#data)
- **version**
- string, required
- 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**
- object, required
- Contains the {ref}`metadata object <metadata>`
- **data**
- object, required
- Contains the {ref}`data object <data>`
(metadata)=
## Metadata
```json
@ -46,37 +43,30 @@ It's a json object with the following keys :
```
Contains information that applies to the whole set of charts
**song title**
- string, required
**artist**
- string, required
**music path**
- string, optional
- Path to the music file, *relative* to the memon file.
**album cover path**
- string, optional
- Path the jacket / album cover / album art to be shown in music select for example. usually a square image
**BPM**
- number, required
- Song tempo in Beats per Minute.
**offset**
- 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
**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"`.
- **song title**
- string, required
- **artist**
- string, required
- **music path**
- string, optional
- Path to the music file, *relative* to the memon file.
- **album cover path**
- string, optional
- Relative path to the jacket / album cover / album art to be shown in music select for example. usually a square image
- **BPM**
- number, required
- Song tempo in Beats per Minute.
- **offset**
- 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
- **preview**
- object, optional
- If present, contains a {ref}`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
```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
**position**
- number, required
- In seconds, start of the loop
**length**
- number, required
- In seconds, duration of the loop
- **position**
- number, required
- In seconds, start of the loop
- **length**
- number, required
- In seconds, duration of the loop
(data)=
## Data
```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.
@ -118,7 +107,7 @@ When sorting, difficulties may be presented in that order :
BSC ➔ ADV ➔ EXT ➔ (everything else in alphabetical order)
(chart)=
## Chart
```json
@ -129,20 +118,18 @@ When sorting, difficulties may be presented in that order :
}
```
**level**
- number, required
- Chart level, can be an integer or a decimal value
**resolution**
- number, required
- Greater than 0, always an integer
- Number of ticks in a beat, denominator of all beat fractions. Usually 240
**notes**
- array, required
- Array of [tap notes](#tap-note) and [long notes](#long-note) that make up the chart
- **level**
- number, required
- Chart level, can be an integer or a decimal value
- **resolution**
- number, required
- Greater than 0, always an integer
- Number of ticks in a beat, denominator of all beat fractions. Usually 240
- **notes**
- array, required
- Array of {ref}`tap notes <tap-note>` and {ref}`long notes <long-note>` that make up the chart
(tap-note)=
## Tap Note
```json
@ -154,30 +141,29 @@ When sorting, difficulties may be presented in that order :
A classic note
**n**
- number, required
- Integer between 0 and 15 inclusive
- The note position, given this way :
```
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
```
- **n**
- number, required
- Integer between 0 and 15 inclusive
- The note position, given this way :
```
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
```
- **t**
- number, required
- Integer greater or equal to 0
- Note timing in ticks.
**t**
- number, required
- Integer greater or equal to 0
- 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.
A tick is a fraction of the beat, its duration is defined as 1/ the chart's resolution.
For example if the resolution is 240, a tick lasts for 1/240th of a beat.
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*).
A tick is a fraction of the beat, its duration is defined as 1/ the chart's resolution.
For example if the resolution is 240, a tick lasts for 1/240th of a beat.
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
```json
@ -191,38 +177,37 @@ A classic note
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**
- number, required
- Integer greater than 0
- Long note duration ("l" as in length ?!), in ticks
**p**
- number, required
- 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
Here the possible values have been laid out visually, `"■"` marks the note :
```
8
4
0
11 7 3 ■ 1 5 9
2
6
10
```
For example, `"p": 7` produces the following long note :
```
▷—■
```
and `"p": 10` gives :
```
|
|
```
- **l**
- number, required
- Integer greater than 0
- Long note duration ("l" as in length ?!), in ticks
- **p**
- number, required
- 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
Here the possible values have been laid out visually, `"■"` marks the note :
```
8
4
0
11 7 3 ■ 1 5 9
2
6
10
```
For example, `"p": 7` produces the following long note :
```
▷—■
```
and `"p": 10` gives :
```
|
|
```

View File

@ -53,9 +53,9 @@ Parsers should only keep one note for each `(n, t)` couple
### 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
[
@ -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 ...
@ -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.
(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)).