The Phichain format is the native chart format for the Phichain toolchain. It provides the most comprehensive feature set and is the recommended format for chart creation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ivan-1f/phichain/llms.txt
Use this file to discover all available pages before exploring further.
File Structure
Phichain charts are JSON files with the following top-level structure:Field Reference
PhichainChart
The root object representing a complete chart.Format version number. Current version is
5. Used for automatic migration of older charts.Audio offset in milliseconds. Positive values delay the chart, negative values advance it.
List of BPM change points. Must have at least one entry at beat 0.Each BPM point contains:
beat: Beat position as[bar, numerator, denominator]bpm: Tempo in beats per minute
Array of SerializedLine objects (judgment lines).
SerializedLine
Represents a judgment line with its notes, events, and child lines.Display name for the line in the editor.
Array of Note objects attached to this line.
Array of LineEvent objects controlling line behavior.
Every line must have events for all five event types:
x, y, rotation, opacity, and speed.Array of child SerializedLine objects. Child lines move relative to their parent.
Array of CurveNoteTrack objects for slide note paths.
Note
Represents a single note on a judgment line.Note type. One of:
{"tap": null}- Standard tap note{"drag": null}- Drag note (doesn’t break combo if missed){"hold": {"hold_beat": [0, 3, 4]}}- Hold note with duration{"flick": null}- Flick note
Whether the note appears above (
true) or below (false) the judgment line.Note timing as
[bar, numerator, denominator].Examples:[0, 0, 1]- Beat 0 (start)[4, 0, 1]- Beat 4 (bar 4)[2, 1, 2]- Beat 2.5 (bar 2 + 1/2)[0, 3, 16]- Beat 3/16
Horizontal position relative to the line center. Measured in pixels from the coordinate origin.Range: Typically
-675 to 675 (half of canvas width 1350)Note approach speed multiplier.
1.0 is standard speed.LineEvent
Controls line properties over time.Event type:
"x"- Horizontal position (pixels)"y"- Vertical position (pixels)"rotation"- Rotation angle (degrees)"opacity"- Opacity (0-255)"speed"- Note approach speed multiplier
Event start time as beat array.
Event end time as beat array.
Event value. Either:Transition (value changes over time):Constant (value stays fixed):
Easing Functions
Phichain supports the full range of easing functions:Complete Example
Here’s a minimal but complete Phichain chart:Advantages
Full Feature Set
Supports all Phichain features including child lines, curve notes, and complex easing.
Version Migration
Automatic migration from older format versions preserves compatibility.
Human Readable
JSON structure is easy to read, edit, and version control.
Type Safe
Rust structs provide compile-time validation of chart structure.
Schema Validation
The Phichain format is defined by Rust structs withserde serialization:
phichain-chart/src/serialization.rs
The format version is automatically checked during deserialization. Older versions are migrated to the current version.
Next Steps
BPM and Timing
Learn about beat representation and timing
Editor Guide
Create charts in Phichain Editor