# yiyeop/score2gp architecture

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

- Interactive diagram: https://gitdiagram.com/yiyeop/score2gp
- Repository: https://github.com/yiyeop/score2gp

## Overview

Score2GP is a desktop app for opening Guitar Pro/MusicXML scores, converting vector-score PDFs to playable Guitar Pro scores, and practicing with playback, navigation, and score editing. The principal flow is user → app → score loading or PDF conversion → playback and practice; editing and export are additional workflows. PDF extraction is represented by its documented structural and musical stages. Some conversion orchestration and native bridge details are unsampled, so those links are omitted rather than inferred.

Main entry points: [`src/player/useAlphaTab.ts`](https://github.com/yiyeop/score2gp/blob/main/src/player/useAlphaTab.ts) (Score player), [`src/App.tsx`](https://github.com/yiyeop/score2gp/blob/main/src/App.tsx) (App shell), [`tools/pdfextract/structure.py`](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/structure.py) (Score structure), [`tools/pdfextract/notes.py`](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/notes.py) (Notes and beats)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and score access"]
  node_app["App shell<br/>[App.tsx]"]
  node_scoreopen["Open scores<br/>[openScore.ts]"]
  node_nativeconvert["Native conversion<br/>[convert.rs]"]
end

subgraph group_convert["PDF conversion"]
  node_pdfextract["PDF conversion<br/>[convert.py]"]
  node_structure["Score structure<br/>[structure.py]"]
  node_shapes["Symbol shapes<br/>[shapes.py]"]
  node_rhythm["Rhythm reading<br/>[rhythm.py]"]
  node_annotations["Score annotations<br/>[annotations.py]"]
  node_notes["Notes and beats<br/>[notes.py]"]
  node_tuning["String tuning<br/>[tuning.py]"]
  node_assemble["Score assembly<br/>[assemble.py]"]
  node_gpwrite["Guitar Pro output<br/>[gpwrite.py]"]
end

subgraph group_practice["Playback and practice"]
  node_player["Score player<br/>[useAlphaTab.ts]"]
  node_settings["Practice settings"]
end

subgraph group_interact["Reading and editing"]
  node_readui["Reading controls<br/>[TransportBar.tsx]"]
  node_tracks["Track selection<br/>[TrackList.tsx]"]
  node_timeline["Score timeline<br/>[Timeline.tsx]"]
  node_techniques["Technique help"]
  node_editor["Score editor<br/>[useScoreEditor.ts]"]
  node_editui["Edit controls<br/>[EditMode.tsx]"]
end

subgraph group_scoredata["Score utilities"]
  node_settingsdata[("Settings storage")]
  node_markers["Section markers<br/>[markers.ts]"]
  node_export["Score export<br/>[exportScore.ts]"]
  node_encoding["Encoding recovery<br/>[detectEncoding.ts]"]
  node_effects["Instrument effects<br/>[gpEffects.ts]"]
end

node_user(("Musician"))

node_user -->|"uses"| node_app
node_app -->|"opens files"| node_scoreopen
node_app -->|"loads scores"| node_player
node_app -->|"requests conversion"| node_nativeconvert
node_user -->|"provides PDF"| node_pdfextract
node_structure -->|"uses"| node_shapes
node_rhythm -->|"reads structure"| node_structure
node_annotations -->|"uses"| node_structure
node_notes -->|"uses"| node_annotations
node_notes -->|"uses"| node_rhythm
node_notes -->|"uses"| node_structure
node_tuning -->|"uses"| node_structure
node_assemble -->|"extracts bars"| node_notes
node_assemble -->|"uses"| node_shapes
node_assemble -->|"uses"| node_structure
node_gpwrite -->|"writes assembled score"| node_assemble
node_gpwrite -->|"uses"| node_notes
node_gpwrite -->|"uses"| node_tuning
node_gpwrite -->|"uses"| node_annotations
node_player -->|"detects encoding"| node_encoding
node_player -->|"reads effects"| node_effects
node_app -->|"persists settings"| node_settings
node_settings -->|"restores settings"| node_player
node_settings -->|"loads and saves"| node_settingsdata
node_readui -->|"controls playback"| node_player
node_tracks -->|"selects tracks"| node_player
node_timeline -->|"seeks and loops"| node_player
node_timeline -->|"extracts markers"| node_markers
node_techniques -->|"shows techniques"| node_player
node_editui -->|"invokes edits"| node_editor
node_editor -->|"refreshes score"| node_player
node_app -->|"exports scores"| node_export
node_user -->|"edits and exports"| node_app

click node_app "https://github.com/yiyeop/score2gp/blob/main/src/App.tsx"
click node_scoreopen "https://github.com/yiyeop/score2gp/blob/main/src/lib/openScore.ts"
click node_nativeconvert "https://github.com/yiyeop/score2gp/blob/main/src-tauri/src/convert.rs"
click node_pdfextract "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/convert.py"
click node_structure "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/structure.py"
click node_shapes "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/shapes.py"
click node_rhythm "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/rhythm.py"
click node_annotations "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/annotations.py"
click node_notes "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/notes.py"
click node_tuning "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/tuning.py"
click node_assemble "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/assemble.py"
click node_gpwrite "https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/gpwrite.py"
click node_player "https://github.com/yiyeop/score2gp/blob/main/src/player/useAlphaTab.ts"
click node_settings "https://github.com/yiyeop/score2gp/blob/main/src/player/usePracticeSettingsPersistence.ts"
click node_settingsdata "https://github.com/yiyeop/score2gp/blob/main/src/lib/practiceSettings.ts"
click node_readui "https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TransportBar.tsx"
click node_tracks "https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TrackList.tsx"
click node_timeline "https://github.com/yiyeop/score2gp/blob/main/src/modes/read/Timeline.tsx"
click node_markers "https://github.com/yiyeop/score2gp/blob/main/src/lib/markers.ts"
click node_techniques "https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TechniqueTooltip.tsx"
click node_editor "https://github.com/yiyeop/score2gp/blob/main/src/modes/edit/useScoreEditor.ts"
click node_editui "https://github.com/yiyeop/score2gp/blob/main/src/modes/edit/EditMode.tsx"
click node_export "https://github.com/yiyeop/score2gp/blob/main/src/lib/exportScore.ts"
click node_encoding "https://github.com/yiyeop/score2gp/blob/main/src/lib/detectEncoding.ts"
click node_effects "https://github.com/yiyeop/score2gp/blob/main/src/lib/gpEffects.ts"

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_app,node_scoreopen,node_nativeconvert toneBlue
class node_pdfextract,node_structure,node_shapes,node_rhythm,node_annotations,node_notes,node_tuning,node_assemble,node_gpwrite toneAmber
class node_player,node_settings toneMint
class node_readui,node_tracks,node_timeline,node_techniques,node_editor,node_editui toneRose
class node_settingsdata,node_markers,node_export,node_encoding,node_effects,node_user toneIndigo
```

## Components

### App and score access

- [App shell](https://github.com/yiyeop/score2gp/blob/main/src/App.tsx): `src/App.tsx`
- [Open scores](https://github.com/yiyeop/score2gp/blob/main/src/lib/openScore.ts): `src/lib/openScore.ts`
- [Native conversion](https://github.com/yiyeop/score2gp/blob/main/src-tauri/src/convert.rs): `src-tauri/src/convert.rs`

### PDF conversion

- [PDF conversion](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/convert.py): `tools/pdfextract/convert.py`
- [Score structure](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/structure.py): `tools/pdfextract/structure.py`
- [Symbol shapes](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/shapes.py): `tools/pdfextract/shapes.py`
- [Rhythm reading](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/rhythm.py): `tools/pdfextract/rhythm.py`
- [Score annotations](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/annotations.py): `tools/pdfextract/annotations.py`
- [Notes and beats](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/notes.py): `tools/pdfextract/notes.py`
- [String tuning](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/tuning.py): `tools/pdfextract/tuning.py`
- [Score assembly](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/assemble.py): `tools/pdfextract/assemble.py`
- [Guitar Pro output](https://github.com/yiyeop/score2gp/blob/main/tools/pdfextract/gpwrite.py): `tools/pdfextract/gpwrite.py`

### Playback and practice

- [Score player](https://github.com/yiyeop/score2gp/blob/main/src/player/useAlphaTab.ts): `src/player/useAlphaTab.ts`
- [Practice settings](https://github.com/yiyeop/score2gp/blob/main/src/player/usePracticeSettingsPersistence.ts): `src/player/usePracticeSettingsPersistence.ts`

### Reading and editing

- [Reading controls](https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TransportBar.tsx): `src/modes/read/TransportBar.tsx`
- [Track selection](https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TrackList.tsx): `src/modes/read/TrackList.tsx`
- [Score timeline](https://github.com/yiyeop/score2gp/blob/main/src/modes/read/Timeline.tsx): `src/modes/read/Timeline.tsx`
- [Technique help](https://github.com/yiyeop/score2gp/blob/main/src/modes/read/TechniqueTooltip.tsx): `src/modes/read/TechniqueTooltip.tsx`
- [Score editor](https://github.com/yiyeop/score2gp/blob/main/src/modes/edit/useScoreEditor.ts): `src/modes/edit/useScoreEditor.ts`
- [Edit controls](https://github.com/yiyeop/score2gp/blob/main/src/modes/edit/EditMode.tsx): `src/modes/edit/EditMode.tsx`

### Score utilities

- [Settings storage](https://github.com/yiyeop/score2gp/blob/main/src/lib/practiceSettings.ts): `src/lib/practiceSettings.ts`
- [Section markers](https://github.com/yiyeop/score2gp/blob/main/src/lib/markers.ts): `src/lib/markers.ts`
- [Score export](https://github.com/yiyeop/score2gp/blob/main/src/lib/exportScore.ts): `src/lib/exportScore.ts`
- [Encoding recovery](https://github.com/yiyeop/score2gp/blob/main/src/lib/detectEncoding.ts): `src/lib/detectEncoding.ts`
- [Instrument effects](https://github.com/yiyeop/score2gp/blob/main/src/lib/gpEffects.ts): `src/lib/gpEffects.ts`

### Other components

- **Musician**

## Connections

- Musician → App shell: uses (evidence: `README.md`)
- App shell → Open scores: opens files (evidence: `src/App.tsx`)
- App shell → Score player: loads scores (evidence: `src/App.tsx`)
- App shell → Native conversion: requests conversion (evidence: `README.md`)
- Musician → PDF conversion: provides PDF (evidence: `README.md`)
- Score structure → Symbol shapes: uses (evidence: `tools/pdfextract/structure.py`)
- Rhythm reading → Score structure: reads structure (evidence: `tools/pdfextract/rhythm.py`)
- Score annotations → Score structure: uses (evidence: `tools/pdfextract/annotations.py`)
- Notes and beats → Score annotations: uses (evidence: `tools/pdfextract/notes.py`)
- Notes and beats → Rhythm reading: uses (evidence: `tools/pdfextract/notes.py`)
- Notes and beats → Score structure: uses (evidence: `tools/pdfextract/notes.py`)
- String tuning → Score structure: uses (evidence: `tools/pdfextract/tuning.py`)
- Score assembly → Notes and beats: extracts bars (evidence: `tools/pdfextract/assemble.py`)
- Score assembly → Symbol shapes: uses (evidence: `tools/pdfextract/assemble.py`)
- Score assembly → Score structure: uses (evidence: `tools/pdfextract/assemble.py`)
- Guitar Pro output → Score assembly: writes assembled score (evidence: `tools/pdfextract/gpwrite.py`)
- Guitar Pro output → Notes and beats: uses (evidence: `tools/pdfextract/gpwrite.py`)
- Guitar Pro output → String tuning: uses (evidence: `tools/pdfextract/gpwrite.py`)
- Guitar Pro output → Score annotations: uses (evidence: `tools/pdfextract/gpwrite.py`)
- Score player → Encoding recovery: detects encoding (evidence: `src/player/useAlphaTab.ts`)
- Score player → Instrument effects: reads effects (evidence: `src/player/useAlphaTab.ts`)
- App shell → Practice settings: persists settings (evidence: `src/App.tsx`)
- Practice settings → Score player: restores settings (evidence: `src/player/usePracticeSettingsPersistence.ts`)
- Practice settings → Settings storage: loads and saves (evidence: `src/player/usePracticeSettingsPersistence.ts`)
- Reading controls → Score player: controls playback (evidence: `src/modes/read/TransportBar.tsx`)
- Track selection → Score player: selects tracks (evidence: `src/modes/read/ReadSidebar.tsx`)
- Score timeline → Score player: seeks and loops (evidence: `src/modes/read/Timeline.tsx`)
- Score timeline → Section markers: extracts markers (evidence: `src/modes/read/Timeline.tsx`)
- Technique help → Score player: shows techniques (evidence: `src/modes/read/TechniqueTooltip.tsx`)
- Edit controls → Score editor: invokes edits (evidence: `src/modes/edit/EditMode.tsx`)
- Score editor → Score player: refreshes score (evidence: `src/modes/edit/useScoreEditor.ts`)
- App shell → Score export: exports scores (evidence: `src/App.tsx`)
- Musician → App shell: edits and exports (evidence: `README.md`)
