# chuanyuannotboat/catch_chart_editor architecture

> Architecture diagram of the GitHub repository chuanyuannotboat/catch_chart_editor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chuanyuannotboat/catch_chart_editor
- Repository: https://github.com/chuanyuannotboat/catch_chart_editor

## Overview

Malody Catch Chart Editor is a Qt desktop application for creating, editing, previewing, and exporting Catch charts. The principal workflow is to open or create a chart, edit notes and tempo through the editor, then save or export it; playback and preview provide feedback along the way. The architecture separates UI, chart editing and file handling, playback/rendering, and plugin extensions. Relationships are based on the README and the supplied source excerpts and index; unsampled implementation details are not assumed.

Main entry points: [`src/app/Application.cpp`](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/app/Application.cpp) (Application), [`src/controller/ChartController.cpp`](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/ChartController.cpp) (Chart Controller), [`src/plugin/PluginManager.cpp`](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/plugin/PluginManager.cpp) (Plugin Manager), [`src/controller/PlaybackController.cpp`](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/PlaybackController.cpp) (Playback Controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Editor UI"]
  node_application["Application<br/>[Application.cpp]"]
  node_main_window["Main Window<br/>[MainWindow.cpp]"]
  node_canvas["Chart Canvas<br/>[ChartCanvas.cpp]"]
  node_panels["Editor Panels<br/>[NoteEditPanel.cpp]"]
end

subgraph group_chart["Chart Editing"]
  node_chart_controller["Chart Controller"]
  node_chart_model["Chart Model<br/>[Chart.cpp]"]
  node_selection["Selection Controller"]
  node_note_chain["Curve Editor"]
  node_curve_sidecar["Curve Sidecar"]
end

subgraph group_media["Playback &amp; Preview"]
  node_playback["Playback Controller"]
  node_audio["Audio Player<br/>[AudioPlayer.cpp]"]
  node_bpm["BPM Measurement<br/>[BpmDetector.cpp]"]
  node_preview["Realtime Preview"]
  node_rendering["Chart Rendering<br/>[NoteRenderer.cpp]"]
end

subgraph group_files["Chart Files"]
  node_chart_io["Chart IO<br/>[ChartIO.cpp]"]
  node_project_io["Project IO<br/>[ProjectIO.cpp]"]
end

subgraph group_plugins["Plugin Extensions"]
  node_plugin_manager["Plugin Manager<br/>[PluginManager.cpp]"]
  node_process_plugin["Process Plugins"]
  node_note_assist["Note Chain Assist"]
  node_color_formatter["Note Color Formatter"]
end

node_user(("Editor User"))

node_user -->|"opens editor"| node_application
node_application -->|"creates window"| node_main_window
node_application -->|"creates controller"| node_chart_controller
node_application -->|"creates controller"| node_selection
node_application -->|"creates controller"| node_playback
node_application -->|"initializes plugins"| node_plugin_manager
node_user -->|"edits chart"| node_canvas
node_user -->|"chooses edit mode"| node_panels
node_chart_controller -->|"updates model"| node_chart_model
node_chart_controller -->|"loads and saves"| node_chart_io
node_note_chain -->|"commits edits"| node_chart_controller
node_note_chain -->|"persists curves"| node_curve_sidecar
node_user -->|"saves or exports"| node_chart_io
node_chart_io -.->|"packages export"| node_project_io
node_playback -->|"controls audio"| node_audio
node_user -->|"starts playback"| node_playback
node_user -->|"measures tempo"| node_bpm
node_preview -->|"reads chart"| node_chart_controller
node_preview -->|"reads playback"| node_playback
node_preview -->|"uses renderer"| node_rendering
node_plugin_manager -->|"manages processes"| node_process_plugin
node_plugin_manager -.->|"loads plugin"| node_note_assist
node_plugin_manager -.->|"loads plugin"| node_color_formatter
node_user -->|"uses tool actions"| node_note_assist

click node_application "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/app/Application.cpp"
click node_main_window "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/app/MainWindow.cpp"
click node_canvas "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/CustomWidgets/ChartCanvas/ChartCanvas.cpp"
click node_panels "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/NoteEditPanel.cpp"
click node_chart_controller "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/ChartController.cpp"
click node_chart_model "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/model/Chart.cpp"
click node_selection "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/SelectionController.cpp"
click node_note_chain "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/editor/NoteChain/NoteChainEditor.cpp"
click node_curve_sidecar "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/editor/NoteChain/NoteChainPersistence.cpp"
click node_chart_io "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/file/ChartIO.cpp"
click node_project_io "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/file/ProjectIO.cpp"
click node_playback "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/PlaybackController.cpp"
click node_audio "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/audio/AudioPlayer.cpp"
click node_bpm "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/audio/BpmDetector.cpp"
click node_preview "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/CustomWidgets/RealtimePreviewWidget.cpp"
click node_rendering "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/render/NoteRenderer.cpp"
click node_plugin_manager "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/plugin/PluginManager.cpp"
click node_process_plugin "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/plugin/ExternalProcessPlugin.cpp"
click node_note_assist "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/plugins/builtin/note_chain_assist/note_chain_assist.py"
click node_color_formatter "https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/plugins/builtin/note_color_formatter/note_color_formatter.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_application,node_main_window,node_canvas,node_panels,node_user toneBlue
class node_chart_controller,node_chart_model,node_selection,node_note_chain,node_curve_sidecar toneAmber
class node_playback,node_audio,node_bpm,node_preview,node_rendering toneMint
class node_chart_io,node_project_io toneRose
class node_plugin_manager,node_process_plugin,node_note_assist,node_color_formatter toneIndigo
```

## Components

### Editor UI

- [Application](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/app/Application.cpp): `src/app/Application.cpp`
- [Main Window](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/app/MainWindow.cpp): `src/app/MainWindow.cpp`
- [Chart Canvas](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/CustomWidgets/ChartCanvas/ChartCanvas.cpp): `src/ui/CustomWidgets/ChartCanvas/ChartCanvas.cpp`
- [Editor Panels](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/NoteEditPanel.cpp): `src/ui/NoteEditPanel.cpp`

### Chart Editing

- [Chart Controller](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/ChartController.cpp): `src/controller/ChartController.cpp`
- [Chart Model](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/model/Chart.cpp): `src/model/Chart.cpp`
- [Selection Controller](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/SelectionController.cpp): `src/controller/SelectionController.cpp`
- [Curve Editor](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/editor/NoteChain/NoteChainEditor.cpp): `src/editor/NoteChain/NoteChainEditor.cpp`
- [Curve Sidecar](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/editor/NoteChain/NoteChainPersistence.cpp): `src/editor/NoteChain/NoteChainPersistence.cpp`

### Playback & Preview

- [Playback Controller](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/controller/PlaybackController.cpp): `src/controller/PlaybackController.cpp`
- [Audio Player](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/audio/AudioPlayer.cpp): `src/audio/AudioPlayer.cpp`
- [BPM Measurement](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/audio/BpmDetector.cpp): `src/audio/BpmDetector.cpp`
- [Realtime Preview](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/ui/CustomWidgets/RealtimePreviewWidget.cpp): `src/ui/CustomWidgets/RealtimePreviewWidget.cpp`
- [Chart Rendering](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/render/NoteRenderer.cpp): `src/render/NoteRenderer.cpp`

### Chart Files

- [Chart IO](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/file/ChartIO.cpp): `src/file/ChartIO.cpp`
- [Project IO](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/file/ProjectIO.cpp): `src/file/ProjectIO.cpp`

### Plugin Extensions

- [Plugin Manager](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/plugin/PluginManager.cpp): `src/plugin/PluginManager.cpp`
- [Process Plugins](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/src/plugin/ExternalProcessPlugin.cpp): `src/plugin/ExternalProcessPlugin.cpp`
- [Note Chain Assist](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/plugins/builtin/note_chain_assist/note_chain_assist.py): `plugins/builtin/note_chain_assist/note_chain_assist.py`
- [Note Color Formatter](https://github.com/chuanyuannotboat/catch_chart_editor/blob/main/plugins/builtin/note_color_formatter/note_color_formatter.py): `plugins/builtin/note_color_formatter/note_color_formatter.py`

### Other components

- **Editor User**

## Connections

- Editor User → Application: opens editor
- Application → Main Window: creates window (evidence: `src/app/Application.cpp`)
- Application → Chart Controller: creates controller (evidence: `src/app/Application.cpp`)
- Application → Selection Controller: creates controller (evidence: `src/app/Application.cpp`)
- Application → Playback Controller: creates controller (evidence: `src/app/Application.cpp`)
- Application → Plugin Manager: initializes plugins (evidence: `src/app/Application.cpp`)
- Editor User → Chart Canvas: edits chart
- Editor User → Editor Panels: chooses edit mode
- Chart Controller → Chart Model: updates model
- Chart Controller → Chart IO: loads and saves (evidence: `src/controller/ChartController.cpp`)
- Curve Editor → Chart Controller: commits edits (evidence: `src/editor/NoteChain/NoteChainEditor.cpp`)
- Curve Editor → Curve Sidecar: persists curves
- Editor User → Chart IO: saves or exports
- Chart IO → Project IO: packages export
- Playback Controller → Audio Player: controls audio (evidence: `src/controller/PlaybackController.cpp`)
- Editor User → Playback Controller: starts playback
- Editor User → BPM Measurement: measures tempo
- Realtime Preview → Chart Controller: reads chart (evidence: `src/ui/CustomWidgets/RealtimePreviewWidget.cpp`)
- Realtime Preview → Playback Controller: reads playback (evidence: `src/ui/CustomWidgets/RealtimePreviewWidget.cpp`)
- Realtime Preview → Chart Rendering: uses renderer (evidence: `src/ui/CustomWidgets/RealtimePreviewWidget.cpp`)
- Plugin Manager → Process Plugins: manages processes (evidence: `src/plugin/PluginManager.cpp`)
- Plugin Manager → Note Chain Assist: loads plugin
- Plugin Manager → Note Color Formatter: loads plugin
- Editor User → Note Chain Assist: uses tool actions
