# nikeshjs/guitar-tab-generator architecture

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

- Interactive diagram: https://gitdiagram.com/nikeshjs/guitar-tab-generator
- Repository: https://github.com/nikeshjs/guitar-tab-generator

## Overview

Guitar Tab Identifier is a desktop app that turns selected guitar audio into MIDI, ASCII tablature, and PDF, with optional reference-based metrics. The main workflow runs from the GUI through note estimation, simultaneous-note grouping, fingering assignment, and rendering. A separate dataset/evaluation branch supports GuitarSet annotations and aggregate evaluation. The graph follows documented orchestration and sampled calls; it omits uncertain internal wiring and does not treat configuration imports as runtime calls.

Main entry points: [`src/pipeline.py`](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pipeline.py) (Pipeline orchestration), [`main.py`](https://github.com/nikeshjs/guitar-tab-generator/blob/main/main.py) (Desktop GUI), [`src/pitch_estimation.py`](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py) (Pitch estimation), [`src/tab_mapping.py`](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/tab_mapping.py) (Fingering mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_gui["Desktop GUI<br/>[main.py]"]
end

subgraph group_transcription["Transcription"]
  node_pipeline["Pipeline orchestration<br/>[pipeline.py]"]
  node_pitch["Pitch estimation"]
  node_grouping["Note grouping"]
  node_mapping["Fingering mapping<br/>[tab_mapping.py]"]
  node_rendering["Tab and PDF rendering<br/>[rendering.py]"]
  node_midi["MIDI intermediate"]
  node_tabfiles["Tab text and PDF<br/>[rendering.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_dataset["GuitarSet and JAMS<br/>[dataset.py]"]
  node_metrics["Evaluation metrics<br/>[evaluate.py]"]
end

subgraph group_settings["Configuration"]
  node_config["Paths and tuning<br/>[config.py]"]
end

node_user(("User"))
node_audio["Audio file"]
node_reference["JAMS reference"]

node_user -->|"selects inputs"| node_gui
node_audio -->|"selected as input"| node_gui
node_reference -->|"optional selection"| node_gui
node_gui -->|"starts transcription"| node_pipeline
node_pipeline -->|"estimates notes"| node_pitch
node_pitch -->|"writes MIDI"| node_midi
node_pipeline -->|"groups notes"| node_grouping
node_pipeline -->|"maps fingerings"| node_mapping
node_pipeline -->|"renders and saves"| node_rendering
node_pipeline -->|"writes text and PDF"| node_tabfiles
node_pipeline -->|"loads reference notes"| node_dataset
node_pipeline -->|"computes metrics"| node_metrics
node_pipeline -->|"returns results"| node_gui

click node_gui "https://github.com/nikeshjs/guitar-tab-generator/blob/main/main.py"
click node_pipeline "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pipeline.py"
click node_pitch "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py"
click node_grouping "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py"
click node_mapping "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/tab_mapping.py"
click node_rendering "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/rendering.py"
click node_midi "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py"
click node_tabfiles "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/rendering.py"
click node_dataset "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/dataset.py"
click node_metrics "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/evaluate.py"
click node_config "https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/config.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_gui,node_user toneBlue
class node_pipeline,node_pitch,node_grouping,node_mapping,node_rendering,node_midi,node_tabfiles toneAmber
class node_dataset,node_metrics toneMint
class node_config toneRose
class node_audio,node_reference toneIndigo
```

## Components

### Desktop app

- [Desktop GUI](https://github.com/nikeshjs/guitar-tab-generator/blob/main/main.py): `main.py`

### Transcription

- [Pipeline orchestration](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pipeline.py): `src/pipeline.py`
- [Pitch estimation](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py): `src/pitch_estimation.py`
- [Note grouping](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py): `src/pitch_estimation.py`
- [Fingering mapping](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/tab_mapping.py): `src/tab_mapping.py`
- [Tab and PDF rendering](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/rendering.py): `src/rendering.py`
- [MIDI intermediate](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/pitch_estimation.py): `src/pitch_estimation.py`
- [Tab text and PDF](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/rendering.py): `src/rendering.py`

### Evaluation

- [GuitarSet and JAMS](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/dataset.py): `src/dataset.py`
- [Evaluation metrics](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/evaluate.py): `src/evaluate.py`

### Configuration

- [Paths and tuning](https://github.com/nikeshjs/guitar-tab-generator/blob/main/src/config.py): `src/config.py`

### Other components

- **User**
- **Audio file**
- **JAMS reference**

## Connections

- User → Desktop GUI: selects inputs (evidence: `main.py`)
- Audio file → Desktop GUI: selected as input (evidence: `main.py`)
- JAMS reference → Desktop GUI: optional selection (evidence: `main.py`)
- Desktop GUI → Pipeline orchestration: starts transcription (evidence: `main.py`)
- Pipeline orchestration → Pitch estimation: estimates notes (evidence: `src/pipeline.py`)
- Pitch estimation → MIDI intermediate: writes MIDI (evidence: `src/pitch_estimation.py`)
- Pipeline orchestration → Note grouping: groups notes (evidence: `src/pipeline.py`)
- Pipeline orchestration → Fingering mapping: maps fingerings (evidence: `src/pipeline.py`)
- Pipeline orchestration → Tab and PDF rendering: renders and saves (evidence: `src/pipeline.py`)
- Pipeline orchestration → Tab text and PDF: writes text and PDF (evidence: `src/pipeline.py`)
- Pipeline orchestration → GuitarSet and JAMS: loads reference notes (evidence: `src/pipeline.py`)
- Pipeline orchestration → Evaluation metrics: computes metrics (evidence: `src/pipeline.py`)
- Pipeline orchestration → Desktop GUI: returns results (evidence: `main.py`)
