ChromaLite is a machine learning pipeline for predicting Western musical scales from audio using chromagrams. It includes a custom dataset generator, chroma feature extraction, and a simple neural network built with PyTorch.
Think of it as the underlying system for a βShazam for scale detectionβ β trained on music theory data.
Music and Audio: Librosa, music21, FluidSynth
-
π§ Synthetic Dataset Generator
Generates labeled chroma tensors for 24 Western scales usingmusic21
,librosa
, and MIDI-to-audio synthesis. -
πΌ 1,900+ Samples Across 24 Scales
Each sample contains randomized notes in a specific scale, saved as chroma tensors and scale indices. -
π§ Custom Neural Network Model (ChromaLite)
A simple PyTorch-based neural network that learns to classify musical scales from[1, 12, T]
chroma inputs.
- Input: Chroma tensor
[1, 12, T]
(12 pitch classes, variable time) - Output: Integer scale index (0β23, covering major and minor scales)
- Format:
.pt
and.csv
versions provided - π View Dataset on Kaggle
Train Accuracy | Test Accuracy |
---|---|
79.1% | 78.28% |
- Add rhythmic diversity, chords, and velocity variation
- Generate more unique samples
- Build more models