CoolFace
Apppublic

ohollo/harmonic-analysis

sourceHugging Facecc-by-nc-nd-4.0updated 4mo agoView on Hugging Face
0likes
how_it_works.md33 linesDownload Raw Back to root
1### Step by step2 3**1. Input**4The pipeline takes chords directly as text. Alternatively, an audio file can be uploaded which is then converted into5the text using [chord-extractor](https://github.com/ohollo/chord-extractor).6 7**2. Preprocess**8The chord sequence is sent to an internal API which first performs custom 9preprocessing (this includes making the chords independent of key).10 11**3. Embed**12A private model is applied to perform the embedding. This is currently a Transformer model trained on the 13[lmd_chords](https://huggingface.co/datasets/ohollo/lmd_chords) dataset.14 15**4. Search**16Both eventual outputs rely on comparing that vector is against a prebuilt index of chord sequences and sub-sequences of the songs 17forming the above lmd_chords dataset. 18 19**5. Score**20By analysing vector similarity and specifically the number of songs within different radii of similarity, a score is 21derived to show the originality (between 0 and 1 with 1 being most original, i.e. with no neighbours found in any radius used).22A scaler is used to aid the scorer cope with different lengths of sequence, pretrained on the contents of the embeddings index.23 24**6. Neighbours**25The IDs of the closest matching vectors (within a minimum radius) are cross-referenced with the lmd_chords dataset to get 26song names and artists, so that the user can see the details of what songs appear similar to the model. 27 28 29### APIs, MCPs and Hooking up to Agents30 31Furthermore, this space can easily be used as an API or plugged into your AI agent via MCP. This opens up the possibility32of using the tool to feedback on loose song ideas (e.g. try asking it to "Create the chords of a simple song using a 33I-V-vi-IV progression and analyze it for uniqueness"). Click below on "Use via API or MCP" to find out how to connect.