Initial commit: KeySelector implementation

This commit is contained in:
Jannik committed 2026-08-26 00:32:17 +02:00
commit 48cdda01ca
30 files changed
+2272

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
-- Schema for KeySelector and AcousticBrainz data
CREATE TABLE IF NOT EXISTS tracks (
id SERIAL PRIMARY KEY,
mbid VARCHAR(36) UNIQUE NOT NULL, -- MusicBrainz ID
title VARCHAR(255),
artist VARCHAR(255),
camelot_key VARCHAR(3),
bpm INTEGER,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS track_tags (
track_id INTEGER REFERENCES tracks(id),
tag VARCHAR(100),
PRIMARY KEY (track_id, tag)
);
CREATE INDEX IF NOT EXISTS idx_camelot_key ON tracks(camelot_key);
CREATE INDEX IF NOT EXISTS idx_bpm ON tracks(bpm);
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Mock script to seed AcousticBrainz data
echo "Seeding AcousticBrainz data..."
echo "This would typically download the AcousticBrainz dataset,"
echo "parse the JSON archives, calculate the Camelot keys,"
echo "and import them into the PostgreSQL database."
echo "Done."