# corrados/edrumulus architecture

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

- Interactive diagram: https://gitdiagram.com/corrados/edrumulus
- Repository: https://github.com/corrados/edrumulus

## Overview

Edrumulus is embedded e-drum trigger firmware: analog pad signals are sampled, conditioned and interpreted as hits, then exposed as MIDI-oriented velocity, position, rim/choke and hi-hat-control results. The terminal GUI provides a separate settings and monitoring interface. The map includes documented trigger capabilities, but unsampled implementation details are not inferred; edges are limited to relationships visible in excerpts or explicitly documented.

Main entry points: [`pad.cpp`](https://github.com/corrados/edrumulus/blob/main/pad.cpp) (Pad detection), [`edrumulus.cpp`](https://github.com/corrados/edrumulus/blob/main/edrumulus.cpp) (Trigger controller), [`tools/edrumulus_gui.py`](https://github.com/corrados/edrumulus/blob/main/tools/edrumulus_gui.py) (Terminal GUI), [`hardware.cpp`](https://github.com/corrados/edrumulus/blob/main/hardware.cpp) (ADC and timing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Signal capture"]
  node_firmware["Trigger controller<br/>[edrumulus.cpp]"]
  node_hardware["ADC and timing<br/>[hardware.cpp]"]
end

subgraph group_trigger["Trigger processing"]
  node_pad["Pad detection<br/>[pad.cpp]"]
  node_parameters["Pad presets<br/>[parameters.cpp]"]
  node_signal["Peak and clipping"]
end

subgraph group_interface["Device interface"]
  node_gui["Terminal GUI<br/>[edrumulus_gui.py]"]
end

node_player(("Drummer"))
node_pads{{"Drum pads"}}
node_midi(("MIDI host"))
node_operator(("Device operator"))

node_player -->|"strikes"| node_pads
node_pads -->|"analog signals"| node_hardware
node_firmware -->|"captures samples"| node_hardware
node_firmware -->|"processes samples"| node_pad
node_pad -.->|"uses pad settings"| node_parameters
node_pad -.->|"uses peak correction"| node_signal
node_pad -.->|"reports hit results"| node_midi
node_operator -->|"configures"| node_gui
node_gui -->|"sends settings"| node_firmware

click node_firmware "https://github.com/corrados/edrumulus/blob/main/edrumulus.cpp"
click node_hardware "https://github.com/corrados/edrumulus/blob/main/hardware.cpp"
click node_pad "https://github.com/corrados/edrumulus/blob/main/pad.cpp"
click node_parameters "https://github.com/corrados/edrumulus/blob/main/parameters.cpp"
click node_signal "https://github.com/corrados/edrumulus/blob/main/signalprocessing.cpp"
click node_gui "https://github.com/corrados/edrumulus/blob/main/tools/edrumulus_gui.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_firmware,node_hardware toneBlue
class node_pad,node_parameters,node_signal toneAmber
class node_gui toneMint
class node_player,node_pads,node_midi,node_operator toneIndigo
```

## Components

### Signal capture

- [Trigger controller](https://github.com/corrados/edrumulus/blob/main/edrumulus.cpp): `edrumulus.cpp`
- [ADC and timing](https://github.com/corrados/edrumulus/blob/main/hardware.cpp): `hardware.cpp`

### Trigger processing

- [Pad detection](https://github.com/corrados/edrumulus/blob/main/pad.cpp): `pad.cpp`
- [Pad presets](https://github.com/corrados/edrumulus/blob/main/parameters.cpp): `parameters.cpp`
- [Peak and clipping](https://github.com/corrados/edrumulus/blob/main/signalprocessing.cpp): `signalprocessing.cpp`

### Device interface

- [Terminal GUI](https://github.com/corrados/edrumulus/blob/main/tools/edrumulus_gui.py): `tools/edrumulus_gui.py`

### Other components

- **Drummer**
- **Drum pads**
- **MIDI host**
- **Device operator**

## Connections

- Drummer → Drum pads: strikes (evidence: `README.md`)
- Drum pads → ADC and timing: analog signals (evidence: `README.md`)
- Trigger controller → ADC and timing: captures samples (evidence: `edrumulus.cpp`)
- Trigger controller → Pad detection: processes samples (evidence: `edrumulus.cpp`)
- Pad detection → Pad presets: uses pad settings
- Pad detection → Peak and clipping: uses peak correction
- Pad detection → MIDI host: reports hit results (evidence: `README.md`)
- Device operator → Terminal GUI: configures (evidence: `tools/edrumulus_gui.py`)
- Terminal GUI → Trigger controller: sends settings (evidence: `tools/edrumulus_gui.py`)
