# hugofurther/midi-controller architecture

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

- Interactive diagram: https://gitdiagram.com/hugofurther/midi-controller
- Repository: https://github.com/hugofurther/midi-controller

## Overview

This is an archival Arduino stage MIDI controller: an operator uses three action buttons and a separate safety control; the firmware gates actions, provides LED feedback, and sends MIDI over a DIN connection to external show equipment. The README documents the firmware behavior, MIDI mapping, fabrication stages, and field use. No source excerpt was available, so firmware relationships below rely on those README descriptions; the media directories document physical build and deployment stages.

Main entry points: [`Code/Stage_MIDI_Controller.ino`](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino) (Safety gate and press detection), [`media/Fabricating/PCB`](https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/PCB) (PCB fabrication), [`media/Fabricating/Assembly`](https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/Assembly) (Hardware assembly), [`media/Final Product`](https://github.com/hugofurther/midi-controller/tree/main/media/Final%20Product) (Finished units)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Physical interface"]
  node_controls["Action and safety buttons"]
  node_leds["Action and safety LEDs"]
end

subgraph group_firmware["Firmware behavior"]
  node_firmware["Controller firmware"]
  node_gate["Safety gate and press detection"]
end

subgraph group_midi["MIDI integration"]
  node_serial["Serial MIDI output"]
  node_din["DIN MIDI connection"]
end

subgraph group_history["Build and use"]
  node_prototype["Breadboard prototype"]
  node_pcb["PCB fabrication"]
  node_assembly["Hardware assembly"]
  node_finished["Finished units"]
  node_field["Live deployment"]
end

node_operator(("Stage operator"))
node_receiver(("Show-control receiver"))

node_operator -->|"presses"| node_controls
node_controls -->|"provides input"| node_firmware
node_firmware -->|"checks state"| node_gate
node_gate -->|"drives feedback"| node_leds
node_gate -->|"triggers MIDI"| node_serial
node_serial -->|"writes bytes"| node_din
node_din -->|"sends MIDI"| node_receiver
node_prototype -.->|"develops into"| node_pcb
node_pcb -.->|"leads to"| node_assembly
node_assembly -.->|"produces"| node_finished
node_finished -.->|"deployed as"| node_field

click node_controls "https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino"
click node_firmware "https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino"
click node_gate "https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino"
click node_leds "https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino"
click node_serial "https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino"
click node_prototype "https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/Prototype"
click node_pcb "https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/PCB"
click node_assembly "https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/Assembly"
click node_finished "https://github.com/hugofurther/midi-controller/tree/main/media/Final%20Product"
click node_field "https://github.com/hugofurther/midi-controller/tree/main/media/Being%20Used"

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_controls,node_leds toneBlue
class node_firmware,node_gate toneAmber
class node_serial,node_din toneMint
class node_prototype,node_pcb,node_assembly,node_finished,node_field toneRose
class node_operator,node_receiver toneIndigo
```

## Components

### Physical interface

- [Action and safety buttons](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino): `Code/Stage_MIDI_Controller.ino`
- [Action and safety LEDs](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino): `Code/Stage_MIDI_Controller.ino`

### Firmware behavior

- [Controller firmware](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino): `Code/Stage_MIDI_Controller.ino`
- [Safety gate and press detection](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino): `Code/Stage_MIDI_Controller.ino`

### MIDI integration

- [Serial MIDI output](https://github.com/hugofurther/midi-controller/blob/main/Code/Stage_MIDI_Controller.ino): `Code/Stage_MIDI_Controller.ino`
- **DIN MIDI connection**

### Build and use

- [Breadboard prototype](https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/Prototype): `media/Fabricating/Prototype`
- [PCB fabrication](https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/PCB): `media/Fabricating/PCB`
- [Hardware assembly](https://github.com/hugofurther/midi-controller/tree/main/media/Fabricating/Assembly): `media/Fabricating/Assembly`
- [Finished units](https://github.com/hugofurther/midi-controller/tree/main/media/Final%20Product): `media/Final Product`
- [Live deployment](https://github.com/hugofurther/midi-controller/tree/main/media/Being%20Used): `media/Being Used`

### Other components

- **Stage operator**
- **Show-control receiver**

## Connections

- Stage operator → Action and safety buttons: presses
- Action and safety buttons → Controller firmware: provides input
- Controller firmware → Safety gate and press detection: checks state
- Safety gate and press detection → Action and safety LEDs: drives feedback
- Safety gate and press detection → Serial MIDI output: triggers MIDI
- Serial MIDI output → DIN MIDI connection: writes bytes
- DIN MIDI connection → Show-control receiver: sends MIDI
- Breadboard prototype → PCB fabrication: develops into
- PCB fabrication → Hardware assembly: leads to
- Hardware assembly → Finished units: produces
- Finished units → Live deployment: deployed as
