# isod89/sloop-fm1 architecture

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

- Interactive diagram: https://gitdiagram.com/isod89/sloop-fm1
- Repository: https://github.com/isod89/sloop-fm1

## Overview

SLOOP is live groovebox firmware for the M-VAVE FM-1. The principal workflow is playing keys or entering patterns, shaping tracks with synth or drum sounds and effects, then hearing the mix through the device or USB audio; MIDI can also provide input and clock. The map includes documented editing, song, sample, preset, and update capabilities. Some implementation connections are inferred from the product description because the corresponding source was not sampled; those edges are marked unverified.

Main entry points: [`firmware/src/seq.c`](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/seq.c) (Sequencer and song mode), [`firmware/src/ui.c`](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/ui.c) (Performance UI), [`firmware/src/fx.c`](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/fx.c) (Track and bus effects), [`firmware/hal/fm1_input.h`](https://github.com/isod89/sloop-fm1/blob/main/firmware/hal/fm1_input.h) (FM-1 controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_performance["Performance and sequencing"]
  node_fm1_controls["FM-1 controls<br/>[fm1_input.h]"]
  node_ui["Performance UI<br/>[ui.c]"]
  node_editor["Track editor<br/>[editor.c]"]
  node_sequencer["Sequencer and song mode<br/>[seq.c]"]
  node_arranger["Section arranger<br/>[arranger.c]"]
end

subgraph group_sound["Sound generation"]
  node_drums["Drum machine<br/>[drums.c]"]
  node_drum_synth["Drum synthesis<br/>[drum_synth.c]"]
  node_voices["Voice rendering<br/>[voice.c]"]
  node_engines["Synthesis engines<br/>[engines.c]"]
  node_fm6["Six-operator FM<br/>[eng_fm6.c]"]
  node_fm6_core["FM synthesis core<br/>[fm6_core.c]"]
  node_effects["Track and bus effects<br/>[fx.c]"]
  node_punch["Punch-in effects<br/>[punch.c]"]
end

subgraph group_connectivity["I/O and connectivity"]
  node_audio["USB audio and device output<br/>[usb.c]"]
  node_midi["MIDI input and output<br/>[midi_uart.c]"]
end

subgraph group_device["Projects and device"]
  node_storage[("Persistent storage<br/>[storage.c]")]
  node_projects["Projects and presets<br/>[project.c]"]
  node_sample_editor["Web editor<br/>[preview.js]"]
  node_updater["Update loader<br/>[loader.c]"]
end

node_player(("Player"))

node_player -->|"plays"| node_fm1_controls
node_fm1_controls -.->|"controls"| node_ui
node_ui -.->|"operates"| node_sequencer
node_ui -->|"opens"| node_editor
node_editor -->|"edits patterns"| node_sequencer
node_sequencer -->|"triggers notes"| node_voices
node_sequencer -.->|"triggers drum steps"| node_drums
node_arranger -->|"selects sections"| node_sequencer
node_drums -->|"uses"| node_drum_synth
node_voices -.->|"renders voices"| node_engines
node_engines -->|"dispatches FM6"| node_fm6
node_fm6 -->|"uses core"| node_fm6_core
node_effects -->|"uses effects"| node_punch
node_sequencer -->|"sends MIDI"| node_midi
node_midi -->|"provides input"| node_sequencer
node_effects -.->|"outputs USB audio"| node_audio
node_projects -.->|"persists data"| node_storage
node_sample_editor -.->|"previews patterns"| node_sequencer
node_player -.->|"initiates update"| node_updater

click node_fm1_controls "https://github.com/isod89/sloop-fm1/blob/main/firmware/hal/fm1_input.h"
click node_ui "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/ui.c"
click node_editor "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/editor.c"
click node_sequencer "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/seq.c"
click node_arranger "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/arranger.c"
click node_drums "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/drums.c"
click node_drum_synth "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/drum_synth.c"
click node_voices "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/voice.c"
click node_engines "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/engines.c"
click node_fm6 "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/eng_fm6.c"
click node_fm6_core "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/fm6_core.c"
click node_effects "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/fx.c"
click node_punch "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/punch.c"
click node_audio "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/usb.c"
click node_midi "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/midi_uart.c"
click node_storage "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/storage.c"
click node_projects "https://github.com/isod89/sloop-fm1/blob/main/firmware/src/project.c"
click node_sample_editor "https://github.com/isod89/sloop-fm1/blob/main/web/preview.js"
click node_updater "https://github.com/isod89/sloop-fm1/blob/main/firmware/loader/loader.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_fm1_controls,node_ui,node_editor,node_sequencer,node_arranger toneBlue
class node_drums,node_drum_synth,node_voices,node_engines,node_fm6,node_fm6_core,node_effects,node_punch toneAmber
class node_audio,node_midi toneMint
class node_storage,node_projects,node_sample_editor,node_updater toneRose
class node_player toneIndigo
```

## Components

### Performance and sequencing

- [FM-1 controls](https://github.com/isod89/sloop-fm1/blob/main/firmware/hal/fm1_input.h): `firmware/hal/fm1_input.h`
- [Performance UI](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/ui.c): `firmware/src/ui.c`
- [Track editor](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/editor.c): `firmware/src/editor.c`
- [Sequencer and song mode](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/seq.c): `firmware/src/seq.c`
- [Section arranger](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/arranger.c): `firmware/src/arranger.c`

### Sound generation

- [Drum machine](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/drums.c): `firmware/src/drums.c`
- [Drum synthesis](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/drum_synth.c): `firmware/src/drum_synth.c`
- [Voice rendering](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/voice.c): `firmware/src/voice.c`
- [Synthesis engines](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/engines.c): `firmware/src/engines.c`
- [Six-operator FM](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/eng_fm6.c): `firmware/src/eng_fm6.c`
- [FM synthesis core](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/fm6_core.c): `firmware/src/fm6_core.c`
- [Track and bus effects](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/fx.c): `firmware/src/fx.c`
- [Punch-in effects](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/punch.c): `firmware/src/punch.c`

### I/O and connectivity

- [USB audio and device output](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/usb.c): `firmware/src/usb.c`
- [MIDI input and output](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/midi_uart.c): `firmware/src/midi_uart.c`

### Projects and device

- [Persistent storage](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/storage.c): `firmware/src/storage.c`
- [Projects and presets](https://github.com/isod89/sloop-fm1/blob/main/firmware/src/project.c): `firmware/src/project.c`
- [Web editor](https://github.com/isod89/sloop-fm1/blob/main/web/preview.js): `web/preview.js`
- [Update loader](https://github.com/isod89/sloop-fm1/blob/main/firmware/loader/loader.c): `firmware/loader/loader.c`

### Other components

- **Player**

## Connections

- Player → FM-1 controls: plays (evidence: `README.md`)
- FM-1 controls → Performance UI: controls
- Performance UI → Sequencer and song mode: operates
- Performance UI → Track editor: opens (evidence: `README.md`)
- Track editor → Sequencer and song mode: edits patterns (evidence: `README.md`)
- Sequencer and song mode → Voice rendering: triggers notes (evidence: `firmware/src/seq.c`)
- Sequencer and song mode → Drum machine: triggers drum steps
- Section arranger → Sequencer and song mode: selects sections (evidence: `README.md`)
- Drum machine → Drum synthesis: uses (evidence: `firmware/src/drums.c`)
- Voice rendering → Synthesis engines: renders voices
- Synthesis engines → Six-operator FM: dispatches FM6 (evidence: `firmware/src/engines.c`)
- Six-operator FM → FM synthesis core: uses core (evidence: `firmware/src/eng_fm6.c`)
- Track and bus effects → Punch-in effects: uses effects (evidence: `firmware/src/fx.c`)
- Sequencer and song mode → MIDI input and output: sends MIDI (evidence: `README.md`)
- MIDI input and output → Sequencer and song mode: provides input (evidence: `README.md`)
- Track and bus effects → USB audio and device output: outputs USB audio
- Projects and presets → Persistent storage: persists data
- Web editor → Sequencer and song mode: previews patterns
- Player → Update loader: initiates update
