# taha715/midi-era-clustering architecture

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

- Interactive diagram: https://gitdiagram.com/taha715/midi-era-clustering
- Repository: https://github.com/taha715/midi-era-clustering

## Overview

This repository packages a KNIME workflow for clustering classical MIDI compositions by era. The documented path is feature extraction from raw MIDI, CSV ingestion, filtering, normalization, PCA, and k-means, followed by visualization and evaluation against known labels. The tree contains node settings and workflow metadata, but no feature-extraction source or source excerpts; edges therefore reflect only README-documented flow, and the documented Python stage has no repository path.

Main entry points: [`workflow.knime`](https://github.com/taha715/midi-era-clustering/blob/main/workflow.knime) (KNIME workflow), [`PCA/settings.xml`](https://github.com/taha715/midi-era-clustering/blob/main/PCA/settings.xml) (PCA), [`kMeans/settings.xml`](https://github.com/taha715/midi-era-clustering/blob/main/kMeans/settings.xml) (k-means), [`Scatter Plot/settings.xml`](https://github.com/taha715/midi-era-clustering/blob/main/Scatter%20Plot/settings.xml) (Scatter Plot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input preparation"]
  node_extraction["Feature extraction"]
  node_reader["CSV Reader<br/>[settings.xml]"]
  node_filter["Column Filter<br/>[settings.xml]"]
  node_normalizer["Normalizer<br/>[settings.xml]"]
end

subgraph group_analysis["Clustering"]
  node_pca["PCA<br/>[settings.xml]"]
  node_kmeans["k-means<br/>[settings.xml]"]
end

subgraph group_results["Visualization and evaluation"]
  node_scatter["Scatter Plot<br/>[settings.xml]"]
  node_color["Color Manager<br/>[settings.xml]"]
  node_joiner["Joiner<br/>[settings.xml]"]
  node_writer["CSV Writer<br/>[settings.xml]"]
end

node_midi[("MIDI dataset")]
node_groundtruth[("Era ground truth")]
node_workflow["KNIME workflow<br/>[workflow.knime]"]

node_midi -->|"extracts features"| node_extraction
node_extraction -->|"provides feature CSV"| node_reader
node_reader -->|"ingests for"| node_filter
node_filter -->|"then filters"| node_normalizer
node_normalizer -->|"then normalizes"| node_pca
node_pca -->|"then reduces"| node_kmeans
node_kmeans -->|"visualizes clusters"| node_scatter
node_kmeans -->|"scores against"| node_groundtruth
node_pca -->|"plots 2D projection"| node_scatter
node_workflow -->|"orchestrates"| node_reader
node_workflow -->|"orchestrates"| node_filter
node_workflow -->|"orchestrates"| node_normalizer
node_workflow -->|"orchestrates"| node_pca
node_workflow -->|"orchestrates"| node_kmeans
node_workflow -->|"orchestrates"| node_scatter
node_joiner -.->|"may join labels"| node_groundtruth
node_color -.->|"may color clusters"| node_scatter

click node_reader "https://github.com/taha715/midi-era-clustering/blob/main/CSV%20Reader/settings.xml"
click node_filter "https://github.com/taha715/midi-era-clustering/blob/main/Column%20Filter/settings.xml"
click node_normalizer "https://github.com/taha715/midi-era-clustering/blob/main/Normalizer/settings.xml"
click node_pca "https://github.com/taha715/midi-era-clustering/blob/main/PCA/settings.xml"
click node_kmeans "https://github.com/taha715/midi-era-clustering/blob/main/kMeans/settings.xml"
click node_scatter "https://github.com/taha715/midi-era-clustering/blob/main/Scatter%20Plot/settings.xml"
click node_color "https://github.com/taha715/midi-era-clustering/blob/main/Color%20Manager/settings.xml"
click node_joiner "https://github.com/taha715/midi-era-clustering/blob/main/Joiner/settings.xml"
click node_writer "https://github.com/taha715/midi-era-clustering/blob/main/CSV%20Writer/settings.xml"
click node_workflow "https://github.com/taha715/midi-era-clustering/blob/main/workflow.knime"

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_extraction,node_reader,node_filter,node_normalizer toneBlue
class node_pca,node_kmeans,node_midi,node_groundtruth toneAmber
class node_scatter,node_color,node_joiner,node_writer toneMint
class node_workflow toneTeal
```

## Components

### Input preparation

- **Feature extraction**
- [CSV Reader](https://github.com/taha715/midi-era-clustering/blob/main/CSV%20Reader/settings.xml): `CSV Reader/settings.xml`
- [Column Filter](https://github.com/taha715/midi-era-clustering/blob/main/Column%20Filter/settings.xml): `Column Filter/settings.xml`
- [Normalizer](https://github.com/taha715/midi-era-clustering/blob/main/Normalizer/settings.xml): `Normalizer/settings.xml`

### Clustering

- [PCA](https://github.com/taha715/midi-era-clustering/blob/main/PCA/settings.xml): `PCA/settings.xml`
- [k-means](https://github.com/taha715/midi-era-clustering/blob/main/kMeans/settings.xml): `kMeans/settings.xml`

### Visualization and evaluation

- [Scatter Plot](https://github.com/taha715/midi-era-clustering/blob/main/Scatter%20Plot/settings.xml): `Scatter Plot/settings.xml`
- [Color Manager](https://github.com/taha715/midi-era-clustering/blob/main/Color%20Manager/settings.xml): `Color Manager/settings.xml`
- [Joiner](https://github.com/taha715/midi-era-clustering/blob/main/Joiner/settings.xml): `Joiner/settings.xml`
- [CSV Writer](https://github.com/taha715/midi-era-clustering/blob/main/CSV%20Writer/settings.xml): `CSV Writer/settings.xml`

### Other components

- **MIDI dataset**
- **Era ground truth**
- [KNIME workflow](https://github.com/taha715/midi-era-clustering/blob/main/workflow.knime): `workflow.knime`

## Connections

- MIDI dataset → Feature extraction: extracts features (evidence: `README.md`)
- Feature extraction → CSV Reader: provides feature CSV (evidence: `README.md`)
- CSV Reader → Column Filter: ingests for (evidence: `README.md`)
- Column Filter → Normalizer: then filters (evidence: `README.md`)
- Normalizer → PCA: then normalizes (evidence: `README.md`)
- PCA → k-means: then reduces (evidence: `README.md`)
- k-means → Scatter Plot: visualizes clusters (evidence: `README.md`)
- k-means → Era ground truth: scores against (evidence: `README.md`)
- PCA → Scatter Plot: plots 2D projection (evidence: `README.md`)
- KNIME workflow → CSV Reader: orchestrates (evidence: `README.md`)
- KNIME workflow → Column Filter: orchestrates (evidence: `README.md`)
- KNIME workflow → Normalizer: orchestrates (evidence: `README.md`)
- KNIME workflow → PCA: orchestrates (evidence: `README.md`)
- KNIME workflow → k-means: orchestrates (evidence: `README.md`)
- KNIME workflow → Scatter Plot: orchestrates (evidence: `README.md`)
- Joiner → Era ground truth: may join labels
- Color Manager → Scatter Plot: may color clusters
