Skip to content

A simple, custom neural network trained on 1,900+ synthetically generated chromagrams to classify Western musical scales.

Notifications You must be signed in to change notification settings

omavashia2005/ChromaLite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต ChromaLite: Neural Network-based Musical Scale Classifier

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.


๐Ÿ› ๏ธ Tech Stack

PyTorch Logo NumPy pandas Logo Matplotlib Logo

Music and Audio: Librosa, music21, FluidSynth


๐Ÿ“ Project Highlights

  • ๐Ÿ”ง Synthetic Dataset Generator
    Generates labeled chroma tensors for 24 Western scales using music21, 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.


๐Ÿ”ฌ Dataset Overview

  • 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

๐Ÿ“ˆ Results

Train Accuracy Test Accuracy
79.1% 78.28%

๐Ÿ”ญ Future Work

  • Add rhythmic diversity, chords, and velocity variation
  • Generate more unique samples
  • Build more models

About

A simple, custom neural network trained on 1,900+ synthetically generated chromagrams to classify Western musical scales.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published