# zongzi v0.3.0 - Table of Contents

> A protocol and BEAM implementationfor preserves user edits across upstream regeneration cyclesin singing synthesis application.

## Pages

- [Zongzi](readme.md)
- [粽子](readme-zh-cn.md)
- [Changelog](changelog.md)

- English Documents
  - [English document overview](overview.md)

- 中文文档
  - [中文教程导览](overview-zh.md)
  - [The Little Zongzi](thelittlezongzi-zh.md)
  - [调用方设计规范](callerdesigning-zh.md)

## Modules

- [Zongzi](Zongzi.md): Lightweight, engine-agnostic components for SVS (Singing Voice Synthesis) editors.
Preserves user edits across upstream regeneration cycles.

- Timeline
  - [Zongzi.Timeline](Zongzi.Timeline.md): The source of truth of the note sequences, only records the relationships between them.
  - [Zongzi.Timeline.Neighborhood](Zongzi.Timeline.Neighborhood.md): Local sequences view 以 focus 为中心
  - [Zongzi.Timeline.Query](Zongzi.Timeline.Query.md): 纯读操作且无副作用的 Timeline 的查询原语。
  - [Zongzi.Timeline.SeqID](Zongzi.Timeline.SeqID.md): A module used only for recording IDs of the relationships between note sequences.

- Anchor
  - [Zongzi.Anchor](Zongzi.Anchor.md): Intervention 结构在变基时的批量编排。
  - [Zongzi.Anchor.Context](Zongzi.Anchor.Context.md): Caller 注入的只读领域上下文。
  - [Zongzi.Anchor.NoteTriplet](Zongzi.Anchor.NoteTriplet.md): 基于 NoteTriplet 的结构锚点策略。默认策略。
  - [Zongzi.Anchor.ScoredHost](Zongzi.Anchor.ScoredHost.md): 多候选打分的孤儿归宿策略。
  - [Zongzi.Anchor.Strategy](Zongzi.Anchor.Strategy.md): 结构锚策略 behaviour。与 `Intervention.Declaration`（语义 snapshot/resolve）正交。
  - [Zongzi.Anchor.TripletMatch](Zongzi.Anchor.TripletMatch.md): Triplet anchor 结构的共享判定逻辑（NoteTriplet 与 ScoredHost 共用）。

- Intervention
  - [Zongzi.Intervention](Zongzi.Intervention.md): 对上游已生成、且允许用户修改的局部结果所挂的修改意图。
  - [Zongzi.Intervention.Declaration](Zongzi.Intervention.Declaration.md): Intervention 的 channel strategy 契约。

- Score
  - [Zongzi.Score](Zongzi.Score.md): Domain object with score. Include notes, keys, and timing.

  - [Zongzi.Score.Grid](Zongzi.Score.Grid.md): Timeline grid and quantization utilities. Snaps a free tick to the nearest grid line.
  - [Zongzi.Score.Key](Zongzi.Score.Key.md): Domain model for pitch.
  - [Zongzi.Score.Key.Inner](Zongzi.Score.Key.Inner.md): Outbound conversion operations.
  - [Zongzi.Score.Key.TwelveET](Zongzi.Score.Key.TwelveET.md): Implement 12ET.
  - [Zongzi.Score.Note](Zongzi.Score.Note.md): Domain models and structures related to musical notes.

- Score Timing
  - [Zongzi.Score.Record](Zongzi.Score.Record.md): General record abstraction based on tick/bar.
  - [Zongzi.Score.RecordMap](Zongzi.Score.RecordMap.md): Generic Record compiler and binary search engine.
  - [Zongzi.Score.Tempo](Zongzi.Score.Tempo.md): Entry point for duration utilities.

  - [Zongzi.Score.Tempo.Event](Zongzi.Score.Tempo.Event.md): Tempo change event.
  - [Zongzi.Score.Tempo.Linear](Zongzi.Score.Tempo.Linear.md): Linear tempo ramp segment.
  - [Zongzi.Score.Tempo.Segment](Zongzi.Score.Tempo.Segment.md): Behaviour definition for tempo segments.
  - [Zongzi.Score.Tempo.Step](Zongzi.Score.Tempo.Step.md): The simplest tempo segment — constant BPM (step).
  - [Zongzi.Score.TempoMap](Zongzi.Score.TempoMap.md): Compiled tempo map from tempo change events.
  - [Zongzi.Score.Tick](Zongzi.Score.Tick.md): Tick is the time unit for the SVS editor.
  - [Zongzi.Score.TimeSig](Zongzi.Score.TimeSig.md): Domain model for time signature.
  - [Zongzi.Score.TimeSigMap](Zongzi.Score.TimeSigMap.md): Compiled time signature map from time signature change events.

- Windowing
  - [Zongzi.Windowing](Zongzi.Windowing.md): 渲染切片（post-rebase 瞬态闭包）的入口命名空间。
  - [Zongzi.Windowing.Context](Zongzi.Windowing.Context.md): `Windowing.Strategy.window/1` 的只读输入。
  - [Zongzi.Windowing.RestSplit3Beats](Zongzi.Windowing.RestSplit3Beats.md): 默认乐句分窗策略（windowing-post-rebase 默认策略）。
  - [Zongzi.Windowing.Segment](Zongzi.Windowing.Segment.md): 引擎 check/render 消费的**瞬态批处理闭包**（本轮「这一锅」）。
  - [Zongzi.Windowing.Strategy](Zongzi.Windowing.Strategy.md): 
类似于 plug 管道，但不同点是直接载入函数而不是 atom 。
  - [Zongzi.Windowing.WholeTrack](Zongzi.Windowing.WholeTrack.md): 恒将全部 active note 收成单一的 Segment ，用于不需要 phrase
cache 或兼容 UTAU 等的情况。

- Engine
  - [Zongzi.Engine](Zongzi.Engine.md): 引擎契约 facade：任务只有两档——**check**（轻）与 **render**（重）。

- Curve
  - [Zongzi.Curve](Zongzi.Curve.md): 曲线相关工具的**残留入口**（非对抗循环必经路径）。
  - [Zongzi.Curve.Adapter](Zongzi.Curve.Adapter.md): 实现新的曲线适配器。
  - [Zongzi.Curve.Adapter.Bezier](Zongzi.Curve.Adapter.Bezier.md): Cubic Bezier curve adapter.
  - [Zongzi.Curve.Adapter.CatmullRom](Zongzi.Curve.Adapter.CatmullRom.md): Catmull-Rom 曲线适配器（naive 参考实现）
  - [Zongzi.Curve.Chunk](Zongzi.Curve.Chunk.md): 一条曲线段
  - [Zongzi.Curve.ControlPoint](Zongzi.Curve.ControlPoint.md): 基于刻的控制点。

- Utilities
  - [Zongzi.Helpers](Zongzi.Helpers.md): Some helpers.
  - [Zongzi.Util.ID](Zongzi.Util.ID.md): A module that declares the IDs of domain entities.
  - [Zongzi.Util.Model](Zongzi.Util.Model.md): Domain model helper.
  - [Zongzi.Util.Object](Zongzi.Util.Object.md): Value Object generator.

