# mat1jaczyyy/lpp-performance-cfw architecture

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

- Interactive diagram: https://gitdiagram.com/mat1jaczyyy/lpp-performance-cfw
- Repository: https://github.com/mat1jaczyyy/lpp-performance-cfw

## Overview

This is custom firmware for the Novation Launchpad Pro. The principal workflow is that pad, MIDI, and device events enter the firmware, the active mode handles them, and the firmware updates LEDs or sends MIDI/SysEx results. It also includes setup and palette editing, persistent settings and custom modes, and the stock-style operating modes alongside Performance mode. The README documents these capabilities; some implementation links below are inferred because their source files were not excerpted, so those links are dashed and uncited.

Main entry points: [`src/modes/mode.c`](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/mode.c) (Mode dispatcher), [`src/app.c`](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/app.c) (Event runtime), [`src/modes/normal/performance.c`](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/performance.c) (Performance mode), [`src/modes/normal/ableton.c`](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/ableton.c) (Ableton mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and modes"]
  node_app["Event runtime<br/>[app.c]"]
  node_dispatch["Mode dispatcher<br/>[mode.c]"]
  node_performance["Performance mode<br/>[performance.c]"]
  node_ableton["Ableton mode<br/>[ableton.c]"]
  node_note["Note mode<br/>[note.c]"]
  node_drum["Drum mode<br/>[drum.c]"]
  node_fader["Fader mode<br/>[fader.c]"]
  node_piano["Piano mode<br/>[piano.c]"]
  node_chord["Chord mode<br/>[chord.c]"]
  node_custom["Custom modes<br/>[custom.c]"]
  node_programmer["Programmer mode<br/>[programmer.c]"]
  node_text["Text mode<br/>[text.c]"]
end

subgraph group_special["Device screens"]
  node_setup["Setup screen<br/>[setup.c]"]
  node_editor["Palette editor<br/>[editor.c]"]
  node_scale["Scale setup<br/>[scale.c]"]
  node_boot["Boot screen<br/>[boot.c]"]
  node_idle["Idle screen<br/>[idle.c]"]
  node_puyo["Puyo mode<br/>[puyo.c]"]
end

subgraph group_io["MIDI and display"]
  node_led["LED rendering<br/>[led.c]"]
  node_palettes["Palette data<br/>[palettes.c]"]
  node_midi["MIDI output<br/>[send.c]"]
  node_aftertouch["Aftertouch<br/>[aftertouch.c]"]
  node_sysex["SysEx handling<br/>[sysex.c]"]
  node_conversion["MIDI conversion<br/>[conversion.c]"]
  node_tempo["Tempo tracking<br/>[tempo.c]"]
end

subgraph group_state["Settings and storage"]
  node_settings["Settings<br/>[settings.c]"]
  node_flash[("Flash storage<br/>[write.c]")]
end

node_device(("Launchpad Pro"))

node_device -.->|"sends events"| node_app
node_app -.->|"routes events"| node_dispatch
node_dispatch -->|"dispatches"| node_performance
node_dispatch -->|"dispatches"| node_ableton
node_dispatch -->|"dispatches"| node_note
node_dispatch -->|"dispatches"| node_drum
node_dispatch -->|"dispatches"| node_fader
node_dispatch -->|"dispatches"| node_piano
node_dispatch -->|"dispatches"| node_chord
node_dispatch -->|"dispatches"| node_custom
node_dispatch -->|"dispatches"| node_programmer
node_dispatch -->|"dispatches"| node_text
node_dispatch -->|"dispatches"| node_setup
node_dispatch -->|"dispatches"| node_editor
node_dispatch -->|"dispatches"| node_scale
node_dispatch -->|"dispatches"| node_boot
node_dispatch -->|"dispatches"| node_idle
node_dispatch -->|"dispatches"| node_puyo
node_performance -->|"displays velocities"| node_device
node_ableton -->|"integrates Live"| node_device
node_note -->|"plays notes"| node_device
node_piano -->|"lays out keys"| node_device
node_custom -.->|"exchanges modes"| node_sysex
node_setup -.->|"changes options"| node_settings
node_editor -.->|"edits palette"| node_palettes
node_settings -.->|"persists settings"| node_flash
node_led -->|"reads colors"| node_palettes
node_led -.->|"plots LEDs"| node_device
node_app -.->|"handles messages"| node_sysex
node_app -.->|"handles input"| node_aftertouch
node_aftertouch -->|"sends pressure"| node_midi
node_app -.->|"tracks tempo"| node_tempo
node_ableton -->|"converts data"| node_conversion
node_performance -->|"converts data"| node_conversion

click node_app "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/app.c"
click node_dispatch "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/mode.c"
click node_performance "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/performance.c"
click node_ableton "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/ableton.c"
click node_note "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/note.c"
click node_drum "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/drum.c"
click node_fader "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/fader.c"
click node_piano "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/piano.c"
click node_chord "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/chord.c"
click node_custom "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/custom.c"
click node_programmer "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/programmer.c"
click node_text "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/text.c"
click node_setup "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/setup.c"
click node_editor "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/editor.c"
click node_scale "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/scale.c"
click node_boot "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/boot.c"
click node_idle "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/idle.c"
click node_puyo "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/puyo.c"
click node_led "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/led/led.c"
click node_palettes "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/led/palettes.c"
click node_midi "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/send/send.c"
click node_aftertouch "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/aftertouch/aftertouch.c"
click node_sysex "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/sysex/sysex.c"
click node_settings "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/flash/settings.c"
click node_flash "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/flash/write.c"
click node_conversion "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/other/conversion.c"
click node_tempo "https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/other/tempo.c"

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_dispatch,node_performance,node_ableton,node_note,node_drum,node_fader,node_piano,node_chord,node_custom,node_programmer,node_text toneBlue
class node_setup,node_editor,node_scale,node_boot,node_idle,node_puyo toneAmber
class node_led,node_palettes,node_midi,node_aftertouch,node_sysex,node_conversion,node_tempo toneMint
class node_settings,node_flash toneRose
class node_device toneIndigo
```

## Components

### Runtime and modes

- [Event runtime](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/app.c): `src/app.c`
- [Mode dispatcher](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/mode.c): `src/modes/mode.c`
- [Performance mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/performance.c): `src/modes/normal/performance.c`
- [Ableton mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/ableton.c): `src/modes/normal/ableton.c`
- [Note mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/note.c): `src/modes/normal/note.c`
- [Drum mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/drum.c): `src/modes/normal/drum.c`
- [Fader mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/fader.c): `src/modes/normal/fader.c`
- [Piano mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/piano.c): `src/modes/normal/piano.c`
- [Chord mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/chord.c): `src/modes/normal/chord.c`
- [Custom modes](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/custom.c): `src/modes/normal/custom.c`
- [Programmer mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/programmer.c): `src/modes/normal/programmer.c`
- [Text mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/normal/text.c): `src/modes/normal/text.c`

### Device screens

- [Setup screen](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/setup.c): `src/modes/special/setup.c`
- [Palette editor](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/editor.c): `src/modes/special/editor.c`
- [Scale setup](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/scale.c): `src/modes/special/scale.c`
- [Boot screen](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/boot.c): `src/modes/special/boot.c`
- [Idle screen](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/idle.c): `src/modes/special/idle.c`
- [Puyo mode](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/modes/special/puyo.c): `src/modes/special/puyo.c`

### MIDI and display

- [LED rendering](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/led/led.c): `src/led/led.c`
- [Palette data](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/led/palettes.c): `src/led/palettes.c`
- [MIDI output](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/send/send.c): `src/send/send.c`
- [Aftertouch](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/aftertouch/aftertouch.c): `src/aftertouch/aftertouch.c`
- [SysEx handling](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/sysex/sysex.c): `src/sysex/sysex.c`
- [MIDI conversion](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/other/conversion.c): `src/other/conversion.c`
- [Tempo tracking](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/other/tempo.c): `src/other/tempo.c`

### Settings and storage

- [Settings](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/flash/settings.c): `src/flash/settings.c`
- [Flash storage](https://github.com/mat1jaczyyy/lpp-performance-cfw/blob/master/src/flash/write.c): `src/flash/write.c`

### Other components

- **Launchpad Pro**

## Connections

- Launchpad Pro → Event runtime: sends events
- Event runtime → Mode dispatcher: routes events
- Mode dispatcher → Performance mode: dispatches
- Mode dispatcher → Ableton mode: dispatches
- Mode dispatcher → Note mode: dispatches
- Mode dispatcher → Drum mode: dispatches
- Mode dispatcher → Fader mode: dispatches
- Mode dispatcher → Piano mode: dispatches
- Mode dispatcher → Chord mode: dispatches
- Mode dispatcher → Custom modes: dispatches
- Mode dispatcher → Programmer mode: dispatches
- Mode dispatcher → Text mode: dispatches
- Mode dispatcher → Setup screen: dispatches
- Mode dispatcher → Palette editor: dispatches
- Mode dispatcher → Scale setup: dispatches
- Mode dispatcher → Boot screen: dispatches
- Mode dispatcher → Idle screen: dispatches
- Mode dispatcher → Puyo mode: dispatches
- Performance mode → Launchpad Pro: displays velocities
- Ableton mode → Launchpad Pro: integrates Live
- Note mode → Launchpad Pro: plays notes
- Piano mode → Launchpad Pro: lays out keys
- Custom modes → SysEx handling: exchanges modes
- Setup screen → Settings: changes options
- Palette editor → Palette data: edits palette
- Settings → Flash storage: persists settings
- LED rendering → Palette data: reads colors
- LED rendering → Launchpad Pro: plots LEDs
- Event runtime → SysEx handling: handles messages
- Event runtime → Aftertouch: handles input
- Aftertouch → MIDI output: sends pressure
- Event runtime → Tempo tracking: tracks tempo
- Ableton mode → MIDI conversion: converts data
- Performance mode → MIDI conversion: converts data
