# schollz/bloom architecture

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

- Interactive diagram: https://gitdiagram.com/schollz/bloom
- Repository: https://github.com/schollz/bloom

## Overview

Bloom is a norns/SuperCollider generative-music instrument. The main workflow is user input or idle evolution producing patterns, which play scale-based sounds; users can adjust sound and routing parameters. The README documents these capabilities, but the sampled source does not show runtime wiring, so the diagram keeps relationships to those documented there and does not infer calls between library modules.

Main entry points: [`Engine_Bloom.sc`](https://github.com/schollz/bloom/blob/main/Engine_Bloom.sc) (Audio engine), [`bloom.lua`](https://github.com/schollz/bloom/blob/main/bloom.lua) (Norns controls), [`lib/BloomPattern.sc`](https://github.com/schollz/bloom/blob/main/lib/BloomPattern.sc) (Pattern lanes), [`data`](https://github.com/schollz/bloom/tree/main/data) (Scale notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Interaction"]
  node_norns["Norns controls<br/>[bloom.lua]"]
  node_grid["Grid input<br/>[bloom.lua]"]
  node_screen["Screen display<br/>[bloom.lua]"]
end

subgraph group_sequencing["Pattern and scales"]
  node_patterns["Pattern lanes<br/>[BloomPattern.sc]"]
  node_generation["Generate and evolve<br/>[bloom.lua]"]
  node_scales["Scale notes"]
end

subgraph group_audio["Sound and output"]
  node_engine["Audio engine<br/>[Engine_Bloom.sc]"]
  node_sample["Kalimba samples"]
  node_midi["MIDI output<br/>[bloom.lua]"]
  node_crow["Crow output<br/>[bloom.lua]"]
end

subgraph group_runtime["Runtime components"]
  node_record["Record behavior<br/>[BloomRecord.sc]"]
  node_wildly["Wild evolution<br/>[BloomWildly.sc]"]
  node_samplelib["Sample support<br/>[BloomSample.sc]"]
end

node_player(("Player"))
node_supercollider(("SuperCollider user"))

node_player -->|"controls"| node_norns
node_player -->|"selects notes"| node_grid
node_norns -->|"generates patterns"| node_generation
node_grid -->|"creates sequences"| node_patterns
node_generation -->|"creates patterns"| node_patterns
node_patterns -->|"plays sounds"| node_engine
node_scales -->|"provides notes"| node_engine
node_sample -->|"blends with synthesis"| node_engine
node_norns -->|"routes output"| node_midi
node_norns -->|"routes output"| node_crow
node_supercollider -->|"runs instrument"| node_engine
node_engine -->|"redraws display"| node_screen

click node_norns "https://github.com/schollz/bloom/blob/main/bloom.lua"
click node_grid "https://github.com/schollz/bloom/blob/main/bloom.lua"
click node_screen "https://github.com/schollz/bloom/blob/main/bloom.lua"
click node_patterns "https://github.com/schollz/bloom/blob/main/lib/BloomPattern.sc"
click node_generation "https://github.com/schollz/bloom/blob/main/bloom.lua"
click node_scales "https://github.com/schollz/bloom/tree/main/data"
click node_record "https://github.com/schollz/bloom/blob/main/lib/BloomRecord.sc"
click node_wildly "https://github.com/schollz/bloom/blob/main/lib/BloomWildly.sc"
click node_engine "https://github.com/schollz/bloom/blob/main/Engine_Bloom.sc"
click node_sample "https://github.com/schollz/bloom/tree/main/samples/kalimba_small"
click node_samplelib "https://github.com/schollz/bloom/blob/main/lib/BloomSample.sc"
click node_midi "https://github.com/schollz/bloom/blob/main/bloom.lua"
click node_crow "https://github.com/schollz/bloom/blob/main/bloom.lua"

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_norns,node_grid,node_screen,node_supercollider toneBlue
class node_patterns,node_generation,node_scales toneAmber
class node_engine,node_sample,node_midi,node_crow toneMint
class node_record,node_wildly,node_samplelib toneRose
class node_player toneIndigo
```

## Components

### Interaction

- [Norns controls](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`
- [Grid input](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`
- [Screen display](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`

### Pattern and scales

- [Pattern lanes](https://github.com/schollz/bloom/blob/main/lib/BloomPattern.sc): `lib/BloomPattern.sc`
- [Generate and evolve](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`
- [Scale notes](https://github.com/schollz/bloom/tree/main/data): `data`

### Sound and output

- [Audio engine](https://github.com/schollz/bloom/blob/main/Engine_Bloom.sc): `Engine_Bloom.sc`
- [Kalimba samples](https://github.com/schollz/bloom/tree/main/samples/kalimba_small): `samples/kalimba_small`
- [MIDI output](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`
- [Crow output](https://github.com/schollz/bloom/blob/main/bloom.lua): `bloom.lua`

### Runtime components

- [Record behavior](https://github.com/schollz/bloom/blob/main/lib/BloomRecord.sc): `lib/BloomRecord.sc`
- [Wild evolution](https://github.com/schollz/bloom/blob/main/lib/BloomWildly.sc): `lib/BloomWildly.sc`
- [Sample support](https://github.com/schollz/bloom/blob/main/lib/BloomSample.sc): `lib/BloomSample.sc`

### Other components

- **Player**
- **SuperCollider user**

## Connections

- Player → Norns controls: controls (evidence: `README.md`)
- Player → Grid input: selects notes (evidence: `README.md`)
- Norns controls → Generate and evolve: generates patterns (evidence: `README.md`)
- Grid input → Pattern lanes: creates sequences (evidence: `README.md`)
- Generate and evolve → Pattern lanes: creates patterns (evidence: `README.md`)
- Pattern lanes → Audio engine: plays sounds (evidence: `README.md`)
- Scale notes → Audio engine: provides notes (evidence: `README.md`)
- Kalimba samples → Audio engine: blends with synthesis (evidence: `README.md`)
- Norns controls → MIDI output: routes output (evidence: `README.md`)
- Norns controls → Crow output: routes output (evidence: `README.md`)
- SuperCollider user → Audio engine: runs instrument (evidence: `README.md`)
- Audio engine → Screen display: redraws display (evidence: `README.md`)
