How oceanosdev/gregorian-chant-editor works
Gregorian Chant Editor is a browser-based editor for semantic lyrics and square-notation neumes. A musician edits syllables and notes through the editor UI; commands transform the semantic document, history supports atomic undo/redo, and layout derives wrapped systems and placement previews before SVG rendering. The graph preserves editing, selection, graphical placement, layout, and accessible rendering capabilities documented in the README. Some subsystem links use exact enclosing directories because individual files were not sampled; those links reflect documented capabilities rather than inspected call sites.
Main entry points: ChantEditor.tsx Chant editor · commands Semantic commands · layout-chant.ts Score layout · App.tsx App
Components 15
Application
- App
src/App.tsx - Chant editor
src/editor/components/ChantEditor.tsx
Editing
- Chant document
src/editor/domain/chant-document.ts - Neume invariants
src/editor/domain/neume.ts - Semantic commands
src/editor/commands - Insertion resolvers
src/editor/commands/resolve-syllable-neume-insertion.ts - Edit history
src/editor/state/document-history.ts - Selection state
src/editor/state/selection.ts - Editor tools
src/editor/state/editor-tool.ts
Layout
- Placement resolver
src/editor/interaction/resolve-graphical-neume-placement.ts - Interaction helpers
src/editor/interaction - Score layout
src/editor/layout/layout-chant.ts
Rendering
- SVG score
src/editor/rendering/ScoreSvg.tsx - Accessible descriptions
src/editor/rendering/score-accessible-description.ts
Other components
- Musician
Connections 19
- Musician → App: opens editor
- App → Chant editor: renders
- App → Chant document: supplies example
- Chant editor → Semantic commands: applies edits
- Chant editor → Edit history: records edits
- Chant editor → Selection state: updates selection
- Chant editor → Editor tools: selects tools
- Chant editor → Placement resolver: resolves placement
- Chant editor → Score layout: derives layout
- Chant editor → SVG score: renders score
- Semantic commands → Chant document: transforms
- Semantic commands → Neume invariants: validates neumes
- Semantic commands → Insertion resolvers: resolves insertion
- Placement resolver → Insertion resolvers: clamps insertion
- Placement resolver → Score layout: computes preview
- Interaction helpers → Score layout: uses system geometry
- Score layout → Chant document: reads semantics
- SVG score → Accessible descriptions: describes score
- SVG score → Interaction helpers: resolves neume kind