# eddyvs/drum-software architecture

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

- Interactive diagram: https://gitdiagram.com/eddyvs/drum-software
- Repository: https://github.com/eddyvs/drum-software

## Overview

This is a small browser drum sequencer: it loads drum samples, then runs separate beat and tom timers that trigger sounds from fixed patterns. The excerpts show these runtime behaviors, but not how the HTML starts the sketch or loads p5.js, so those connections are omitted.

Main entry points: [`sketch.js`](https://github.com/eddyvs/drum-software/blob/main/sketch.js) (Tom scheduler), [`Project.mp3`](https://github.com/eddyvs/drum-software/blob/main/Project.mp3) (Snare sample), [`cymbal.mp3`](https://github.com/eddyvs/drum-software/blob/main/cymbal.mp3) (Cymbal sample), [`kick.mp3`](https://github.com/eddyvs/drum-software/blob/main/kick.mp3) (Kick sample)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_setup["Timer setup<br/>[sketch.js]"]
node_beat["Beat scheduler<br/>[sketch.js]"]
node_tom["Tom scheduler<br/>[sketch.js]"]
node_cymbal["Cymbal sample<br/>[cymbal.mp3]"]
node_kick["Kick sample<br/>[kick.mp3]"]
node_snare["Snare sample<br/>[Project.mp3]"]
node_tom1["Tom 1 sample<br/>[tom1.mp3]"]
node_tom2["Tom 2 sample<br/>[tom2.mp3]"]
node_tom3["Tom 3 sample<br/>[tom3.mp3]"]

node_setup -->|"schedules"| node_beat
node_setup -->|"schedules"| node_tom
node_beat -->|"plays"| node_cymbal
node_beat -->|"plays"| node_kick
node_beat -->|"plays"| node_snare
node_tom -->|"plays"| node_tom1
node_tom -->|"plays"| node_tom2
node_tom -->|"plays"| node_tom3
node_tom -->|"plays"| node_snare

click node_setup "https://github.com/eddyvs/drum-software/blob/main/sketch.js"
click node_beat "https://github.com/eddyvs/drum-software/blob/main/sketch.js"
click node_tom "https://github.com/eddyvs/drum-software/blob/main/sketch.js"
click node_cymbal "https://github.com/eddyvs/drum-software/blob/main/cymbal.mp3"
click node_kick "https://github.com/eddyvs/drum-software/blob/main/kick.mp3"
click node_snare "https://github.com/eddyvs/drum-software/blob/main/Project.mp3"
click node_tom1 "https://github.com/eddyvs/drum-software/blob/main/tom1.mp3"
click node_tom2 "https://github.com/eddyvs/drum-software/blob/main/tom2.mp3"
click node_tom3 "https://github.com/eddyvs/drum-software/blob/main/tom3.mp3"

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_setup,node_cymbal,node_kick,node_snare,node_tom1,node_tom2,node_tom3 toneTeal
class node_beat,node_tom toneRose
```

## Components

### Other components

- [Timer setup](https://github.com/eddyvs/drum-software/blob/main/sketch.js): `sketch.js`
- [Beat scheduler](https://github.com/eddyvs/drum-software/blob/main/sketch.js): `sketch.js`
- [Tom scheduler](https://github.com/eddyvs/drum-software/blob/main/sketch.js): `sketch.js`
- [Cymbal sample](https://github.com/eddyvs/drum-software/blob/main/cymbal.mp3): `cymbal.mp3`
- [Kick sample](https://github.com/eddyvs/drum-software/blob/main/kick.mp3): `kick.mp3`
- [Snare sample](https://github.com/eddyvs/drum-software/blob/main/Project.mp3): `Project.mp3`
- [Tom 1 sample](https://github.com/eddyvs/drum-software/blob/main/tom1.mp3): `tom1.mp3`
- [Tom 2 sample](https://github.com/eddyvs/drum-software/blob/main/tom2.mp3): `tom2.mp3`
- [Tom 3 sample](https://github.com/eddyvs/drum-software/blob/main/tom3.mp3): `tom3.mp3`

## Connections

- Timer setup → Beat scheduler: schedules (evidence: `sketch.js`)
- Timer setup → Tom scheduler: schedules (evidence: `sketch.js`)
- Beat scheduler → Cymbal sample: plays (evidence: `sketch.js`)
- Beat scheduler → Kick sample: plays (evidence: `sketch.js`)
- Beat scheduler → Snare sample: plays (evidence: `sketch.js`)
- Tom scheduler → Tom 1 sample: plays (evidence: `sketch.js`)
- Tom scheduler → Tom 2 sample: plays (evidence: `sketch.js`)
- Tom scheduler → Tom 3 sample: plays (evidence: `sketch.js`)
- Tom scheduler → Snare sample: plays (evidence: `sketch.js`)
