# reateam/reascripts architecture

> Architecture diagram of the GitHub repository reateam/reascripts, 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/reateam/reascripts
- Repository: https://github.com/reateam/reascripts

## Overview

ReaTeam Scripts is a community-maintained collection of independent REAPER scripts, not one application with a shared runtime. Users invoke scripts in REAPER for editing, navigation, MIDI, automation, rendering, and other tasks. The clearest sampled end-to-end example is ReaChorder: its GUI collects song choices, then instrument sections generate MIDI notes using shared music data and REAPER/SWS APIs. The other branches reflect major capabilities visible in the repository tree; their internal links are omitted where source evidence was not provided.

Main entry points: [`MIDI Editor/Flaneurette_ReaChorder.py`](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder.py) (ReaChorder Entry), [`MIDI Editor/Flaneurette_ReaChorder/reaChord_data.py`](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/reaChord_data.py) (Music Theory Data), [`MIDI Editor/Flaneurette_ReaChorder/rs_midi.py`](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/rs_midi.py) (MIDI API Wrapper), [`MIDI Editor/Flaneurette_ReaChorder/chord_section.py`](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/chord_section.py) (Chord Generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_midi["MIDI Creation"]
  node_midi_editor["MIDI Editor Tools"]
  node_chordgun["ChordGun"]
end

subgraph group_editing["Arrange Editing"]
  node_cursor["Cursor Navigation"]
  node_item_edit["Item Editing"]
  node_regions["Regions and Markers"]
end

subgraph group_automation["Automation"]
  node_envelopes["Envelope Editing"]
end

subgraph group_tools["Workflow Tools"]
  node_rea_scripts["REAPER Scripts<br/>[README.md]"]
  node_fx["FX Management"]
  node_render["Rendering Tools"]
  node_reannotate["Reannotate"]
end

subgraph group_runtime["ReaChorder Runtime"]
  node_rea_entry["ReaChorder Entry"]
  node_wizard["Song Wizard<br/>[wizard_section.py]"]
  node_music_data["Music Theory Data<br/>[reaChord_data.py]"]
  node_chord_section["Chord Generation<br/>[chord_section.py]"]
  node_bass_section["Bass Generation<br/>[bass_section.py]"]
  node_guitar_section["Guitar Generation<br/>[guitar_section.py]"]
  node_melody_section["Melody Generation<br/>[melody_section.py]"]
  node_drum_section["Drum Sequencer<br/>[drum_section.py]"]
  node_state_manager["Settings Manager<br/>[rs_statemanager.py]"]
  node_midi_api["MIDI API Wrapper<br/>[rs_midi.py]"]
  node_track_api["Track and Item API<br/>[reaper_track.py]"]
end

node_user(("REAPER User"))

node_user -->|"invokes scripts"| node_rea_scripts
node_rea_entry -->|"creates wizard"| node_wizard
node_rea_entry -->|"creates section"| node_chord_section
node_rea_entry -->|"creates section"| node_bass_section
node_rea_entry -.->|"creates section"| node_melody_section
node_rea_entry -.->|"creates section"| node_drum_section
node_rea_entry -->|"imports data"| node_music_data
node_rea_entry -->|"inherits settings"| node_state_manager
node_wizard -->|"reads theory"| node_music_data
node_chord_section -->|"reads chords"| node_music_data
node_bass_section -->|"reads chords"| node_music_data
node_guitar_section -->|"reads chord data"| node_music_data
node_melody_section -->|"reads chord data"| node_music_data
node_drum_section -.->|"adds MIDI notes"| node_midi_api
node_chord_section -->|"adds MIDI notes"| node_midi_api
node_bass_section -->|"adds MIDI notes"| node_midi_api
node_guitar_section -->|"adds MIDI notes"| node_midi_api
node_melody_section -->|"adds MIDI notes"| node_midi_api
node_rea_entry -.->|"uses project items"| node_track_api

click node_rea_scripts "https://github.com/reateam/reascripts/blob/master/README.md"
click node_cursor "https://github.com/reateam/reascripts/tree/master/Cursor"
click node_item_edit "https://github.com/reateam/reascripts/tree/master/Items%20Editing"
click node_regions "https://github.com/reateam/reascripts/tree/master/Regions"
click node_envelopes "https://github.com/reateam/reascripts/tree/master/Envelopes"
click node_fx "https://github.com/reateam/reascripts/tree/master/FX"
click node_midi_editor "https://github.com/reateam/reascripts/tree/master/MIDI%20Editor"
click node_chordgun "https://github.com/reateam/reascripts/tree/master/Various/pandabot_ChordGun"
click node_render "https://github.com/reateam/reascripts/tree/master/Rendering"
click node_reannotate "https://github.com/reateam/reascripts/tree/master/Various/talagan_Reannotate"
click node_rea_entry "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder.py"
click node_wizard "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/wizard_section.py"
click node_music_data "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/reaChord_data.py"
click node_chord_section "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/chord_section.py"
click node_bass_section "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/bass_section.py"
click node_guitar_section "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/guitar_section.py"
click node_melody_section "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/melody_section.py"
click node_drum_section "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/drum_section.py"
click node_state_manager "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/rs_statemanager.py"
click node_midi_api "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/rs_midi.py"
click node_track_api "https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/reaper_track.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_midi_editor,node_chordgun,node_user toneBlue
class node_cursor,node_item_edit,node_regions toneAmber
class node_envelopes toneMint
class node_rea_scripts,node_fx,node_render,node_reannotate toneRose
class node_rea_entry,node_wizard,node_music_data,node_chord_section,node_bass_section,node_guitar_section,node_melody_section,node_drum_section,node_state_manager,node_midi_api,node_track_api toneIndigo
```

## Components

### MIDI Creation

- [MIDI Editor Tools](https://github.com/reateam/reascripts/tree/master/MIDI%20Editor): `MIDI Editor`
- [ChordGun](https://github.com/reateam/reascripts/tree/master/Various/pandabot_ChordGun): `Various/pandabot_ChordGun`

### Arrange Editing

- [Cursor Navigation](https://github.com/reateam/reascripts/tree/master/Cursor): `Cursor`
- [Item Editing](https://github.com/reateam/reascripts/tree/master/Items%20Editing): `Items Editing`
- [Regions and Markers](https://github.com/reateam/reascripts/tree/master/Regions): `Regions`

### Automation

- [Envelope Editing](https://github.com/reateam/reascripts/tree/master/Envelopes): `Envelopes`

### Workflow Tools

- [REAPER Scripts](https://github.com/reateam/reascripts/blob/master/README.md): `README.md`
- [FX Management](https://github.com/reateam/reascripts/tree/master/FX): `FX`
- [Rendering Tools](https://github.com/reateam/reascripts/tree/master/Rendering): `Rendering`
- [Reannotate](https://github.com/reateam/reascripts/tree/master/Various/talagan_Reannotate): `Various/talagan_Reannotate`

### ReaChorder Runtime

- [ReaChorder Entry](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder.py): `MIDI Editor/Flaneurette_ReaChorder.py`
- [Song Wizard](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/wizard_section.py): `MIDI Editor/Flaneurette_ReaChorder/wizard_section.py`
- [Music Theory Data](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/reaChord_data.py): `MIDI Editor/Flaneurette_ReaChorder/reaChord_data.py`
- [Chord Generation](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/chord_section.py): `MIDI Editor/Flaneurette_ReaChorder/chord_section.py`
- [Bass Generation](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/bass_section.py): `MIDI Editor/Flaneurette_ReaChorder/bass_section.py`
- [Guitar Generation](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/guitar_section.py): `MIDI Editor/Flaneurette_ReaChorder/guitar_section.py`
- [Melody Generation](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/melody_section.py): `MIDI Editor/Flaneurette_ReaChorder/melody_section.py`
- [Drum Sequencer](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/drum_section.py): `MIDI Editor/Flaneurette_ReaChorder/drum_section.py`
- [Settings Manager](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/rs_statemanager.py): `MIDI Editor/Flaneurette_ReaChorder/rs_statemanager.py`
- [MIDI API Wrapper](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/rs_midi.py): `MIDI Editor/Flaneurette_ReaChorder/rs_midi.py`
- [Track and Item API](https://github.com/reateam/reascripts/blob/master/MIDI%20Editor/Flaneurette_ReaChorder/reaper_track.py): `MIDI Editor/Flaneurette_ReaChorder/reaper_track.py`

### Other components

- **REAPER User**

## Connections

- REAPER User → REAPER Scripts: invokes scripts (evidence: `README.md`)
- ReaChorder Entry → Song Wizard: creates wizard (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Chord Generation: creates section (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Bass Generation: creates section (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Melody Generation: creates section (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Drum Sequencer: creates section (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Music Theory Data: imports data (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- ReaChorder Entry → Settings Manager: inherits settings (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
- Song Wizard → Music Theory Data: reads theory (evidence: `MIDI Editor/Flaneurette_ReaChorder/wizard_section.py`)
- Chord Generation → Music Theory Data: reads chords (evidence: `MIDI Editor/Flaneurette_ReaChorder/chord_section.py`)
- Bass Generation → Music Theory Data: reads chords (evidence: `MIDI Editor/Flaneurette_ReaChorder/bass_section.py`)
- Guitar Generation → Music Theory Data: reads chord data (evidence: `MIDI Editor/Flaneurette_ReaChorder/guitar_section.py`)
- Melody Generation → Music Theory Data: reads chord data (evidence: `MIDI Editor/Flaneurette_ReaChorder/melody_section.py`)
- Drum Sequencer → MIDI API Wrapper: adds MIDI notes (evidence: `MIDI Editor/Flaneurette_ReaChorder/drum_section.py`)
- Chord Generation → MIDI API Wrapper: adds MIDI notes (evidence: `MIDI Editor/Flaneurette_ReaChorder/chord_section.py`)
- Bass Generation → MIDI API Wrapper: adds MIDI notes (evidence: `MIDI Editor/Flaneurette_ReaChorder/bass_section.py`)
- Guitar Generation → MIDI API Wrapper: adds MIDI notes (evidence: `MIDI Editor/Flaneurette_ReaChorder/guitar_section.py`)
- Melody Generation → MIDI API Wrapper: adds MIDI notes (evidence: `MIDI Editor/Flaneurette_ReaChorder/melody_section.py`)
- ReaChorder Entry → Track and Item API: uses project items (evidence: `MIDI Editor/Flaneurette_ReaChorder.py`)
