VibeCanvas

Every song has a visual fingerprint. This is it.

Spotify measures things like energy, danceability, and acousticness for every song. VibeCanvas takes those numbers and turns them into generative art — unique to each track.

🔍
Search a song
Browse or search 28,351 real Spotify tracks across Pop, Rap, Rock, EDM, R&B, and Latin.
→
🎨
Get its art
Each track's audio features — tempo, loudness, valence, and more — drive a one-of-a-kind canvas painting.
→
🎛
Tweak it yourself
Open the Sandbox to drag sliders and watch the art redraw live. See exactly how each feature changes the visual.
⚡ Energy — background density & particle count
💛 Valence — brightness & color warmth
💃 Danceability — shape count & ring complexity
⏱ Tempo — radial ray density from the center
🎸 Acousticness — concentric ring layers
🔊 Loudness — central glow size & intensity
Detected vibe: —
Audio Sandbox
Drag any slider — the art redraws live.
Every visual layer maps to a real audio feature.
Mood Presets
Core Features
Texture & Timbre
Rhythm
Color Palette
How the art works

The canvas is drawn in 7 layered passes, each one controlled by a different audio feature. Every slider you drag rewrites one of those layers and the whole image redraws from scratch. The same feature values always produce the same image — the output is deterministic, driven by a seeded random number generator so the "randomness" is reproducible.

Layer map
🌌
Layer 1 — Background orbs
Radial gradient blobs scattered across the canvas. Energy sets how many there are and how large they grow. Valence controls their opacity — a sad, low-valence track gets dim, near-invisible orbs.
🔷
Layer 2 — Geometric shapes
Circles, lines, and polygons scattered randomly. Danceability drives the count — a high-dance track gets dozens of overlapping shapes. Tempo controls their size.
⭕
Layer 3 — Concentric rings
Rings radiating outward from the canvas center. Acousticness controls how many rings appear — a fully acoustic track (like solo piano) gets dense ring layers, electronic tracks get almost none.
✳️
Layer 4 — Radial rays
Thin lines shooting out from the center point in all directions. Tempo (BPM) controls ray density — a 180 BPM track fires far more rays than a slow 70 BPM ballad.
✨
Layer 5 — Particle field
Tiny dots distributed across the whole image. Energy, Instrumentalness, and Liveness all contribute to particle count. A live, instrumental, high-energy track can produce hundreds of particles.
〰️
Layer 6 — Waveform lines
Horizontal sine waves overlaid across the image. Only appears when Speechiness is above ~8% — it's meant to represent spoken word content like rap verses or podcasts.
💠
Layer 7 — Central glow
A soft radial glow at the exact center of the canvas. Loudness (normalized from dB) sets its radius and brightness. Loud, compressed tracks get a large bloom; quiet acoustic tracks get a small, tight core.
Glossary
Valence
Spotify's 0–1 measure of musical positivity. 1.0 = happy, euphoric. 0.0 = dark, depressed. It's not loudness or tempo — a loud minor-key song can still have low valence.
Danceability
How suitable a track is for dancing, based on tempo stability, beat strength, and rhythm regularity. A chaotic prog-rock track scores low even if it's fast.
Acousticness
Confidence that the track is acoustic (non-electronic). 1.0 = almost certainly acoustic (e.g. unplugged guitar). 0.0 = fully synthesized. EDM and most pop skew very low.
Instrumentalness
Predicts whether a track has no vocals. Values above 0.5 are treated as likely instrumental. "Ooh" and "aah" sounds count as instrumental; rap and spoken word score near zero.
Speechiness
Detects spoken words. Above 0.66 = probably all speech (podcast, audiobook). 0.33–0.66 = mix of music and speech (rap). Below 0.33 = music with little or no speech.
Liveness
Probability that the track was recorded in front of a live audience. Above 0.8 is strongly live. Studio recordings cluster below 0.3.
Loudness (dB)
Average loudness across the whole track in decibels. Typically ranges from −30 dB (very quiet) to 0 dB (maximum). Heavily mastered pop and EDM often hit −4 to −6 dB.
Seeded RNG
The art uses a seeded pseudo-random number generator — random-looking but fully reproducible. Given the same feature values and seed, you always get the exact same image. That's what makes each song's fingerprint consistent.
Generative Art
Art created by an algorithm rather than drawn by hand. The "artist" here is the rule set — 7 layers, each driven by data. The data changes, the art changes. No two songs produce the same canvas.
Portfolio Project · Data Science + Generative Art

Music has a
visual fingerprint

An end-to-end ML pipeline trained on 28,351 real Spotify tracks. From a raw messy CSV to a genre classifier to an interactive art engine — every visual is driven by real audio data.

★ View Source on GitHub
ML Pipeline
7-stage data science workflow
Built entirely from scratch in Python. Every stage is documented and reproducible via src/pipeline.py. No AutoML. No shortcuts.
01
Data Ingestion
Loaded 32,833 rows from the Kaggle Spotify CSV using pandas. 23 raw columns including 9 Spotify audio features per track.
pandas
02
Data Cleaning
Dropped 5 null rows, deduplicated 4,476 track IDs, removed 1 bad-duration track. Full IQR outlier audit on all audio features. Validated all [0,1] ranges — zero violations.
4,482 rows removed
03
EDA
Skewness analysis flagged 4 features needing transformation. Correlation matrix: acousticness is the strongest popularity predictor. Genre balance verified across 6 classes.
Seaborn · Matplotlib
04
Feature Engineering
Created 9 interaction features: intensity_score, chill_score, vocal_score, energy_valence_ratio, and more. Log-transformed 4 skewed features. Min-max normalized loudness and tempo.
9 new features
05
PCA
StandardScaler → PCA on 18 features. 9 components capture 95% of variance. 2D projection (47% variance) used for genre scatter visualization.
18D → 2D
06
KMeans Clustering
Elbow method found k=4 natural clusters — fewer than the 6 labeled genres. This confirms that genre boundaries heavily overlap in audio feature space. An honest and interesting finding.
k=4 elbow
07
Classification
Random Forest (100 trees, 5-fold CV): 54.1% accuracy on 6-class genre prediction — 3.2× the 16.7% random baseline. Benchmarked against Logistic Regression (46%) and Gradient Boosting (52.5%).
RF 54.1% · 3× baseline
Visualizations
5 pipeline charts
Click any chart to enlarge. All generated by src/pipeline.py on the real dataset.
Data Cleaning EDA
01 — Data Cleaning & EDA
Distribution plots and correlation heatmap after removing 4,482 duplicate and null rows. Acousticness shows the strongest negative correlation with popularity — the more acoustic a track, the less popular it tends to be.
Feature Engineering
02 — Feature Engineering
Shows the 9 new interaction features (like intensity_score and chill_score) alongside log-transformed distributions for skewed features. The before/after comparison confirms the transformations brought skewed features much closer to a normal distribution.
PCA Clustering
03 — PCA & KMeans Clustering
Compresses 18 audio features into 2 dimensions for visualization, then overlays KMeans clusters. The heavy genre overlap in this scatter plot explains why classification is hard — EDM and Pop overlap significantly in audio feature space.
ML Evaluation
04 — ML Model Evaluation
Confusion matrix and model comparison bar chart. Random Forest hits 54.1% — more than 3× the 16.7% random baseline. The confusion matrix shows Rock and R&B are the hardest genres to separate, which makes sense given their audio similarity.
Generative Art
05 — Generative Art (data-driven, per genre)
Six canvases — one per genre — each drawn using that genre's average audio feature values. EDM produces dense, bright, high-energy compositions while Latin shows warmer palettes with more geometric shapes driven by high danceability.
Generative Art Engine
Every pixel is a data point
The art is not decorative — each audio feature maps directly to a visual layer rendered on HTML5 Canvas.
⚡
Energy
Background orb count + particle field density
💛
Valence
Orb brightness and overall color opacity
💃
Danceability
Geometric shape count and ring complexity
⏱
Tempo
Radial ray density from the center point
🎸
Acousticness
Concentric ring count around center
🗣
Speechiness
Horizontal waveform line overlays
🔊
Loudness
Central glow intensity and core dot size
Tech Stack
Built with
scikit-learn pandas NumPy Matplotlib Seaborn Random Forest Logistic Regression Gradient Boosting KMeans PCA HTML5 Canvas Vanilla JS CSS3