Show HN: Tweak your chord progressions for practice or composition (chord-alt.vercel.app)
The project uses GPT-4 to generate unique and interesting chord combinations based on user input chord progression. It's akin to having a virtual musical assistant that can help non-musicians and musicians alike explore and create harmonious sound without needing any prior knowledge of music theory. The generated chord suggestions maintain a similar vibe to the user input. Alternative chord progression includes extended chords, chord substitutions, unique passing chords, and more.
Additionally, musical theory explanations within the tool is helpful for users not just to create music, but understand the underlying structure it's built on a bit better. These chord progression suggestions can be used for practice or composition. As a musician myself, I am having quite a lot of fun playing around with it.
One of the things I'm proud of is how the application really dips into music theory. It includes nuanced aspects such as dominant chords, secondary dominant chords, and the famous 2-5-1 chord progressions.
That said, the development journey was full of lessons. Dealing with the latency of the GPT-4 API was particularly challenging. I used a Celery based queue system + client polling to manage the delay between request and response (from OpenAI API). Additionally, to keep the chord names consistent, I used a combination of prompting and regex. There are still some bugs that need to be squashed but overall I am pretty happy with the results.
I'd love to hear your thoughts and feedback on the project. Also, if you're curious about anything, I am happy to delve into the details in comments.
Feel free to take Chord Variations for a spin here: https://chord-alt.vercel.app/
Looking forward to some interesting discussions!
48 comments
[ 3.4 ms ] story [ 74.6 ms ] threadNot only display, it would be nice to be able to choose chords by function instead of absolute, too.
That's because it's using GPT-4. Which means it just makes stuff up, and you can't rely on it to tell the truth. It's a fun tool to see possibly novel output, but you can never rely on it to be accurate or correct.
*speaking from experience. I built a web app at tapcompose.com (desktop only for now) that uses pure randomness for both chords and melody. Initially I used randomness for testing only and planned to substitute an AI model later — but I was delightfully satisfied with the results and kept it in
It'd be cool to train text embeddings and musical chord embeddings (by analyzing song lyrics perhaps) and then build something to type in moods like "happy jaunty progression" and get a matching chord progression with a similar embedding (assuming you give it a large library of progressions). No generative AI would be needed :)
A chord is two or more different notes being played close together in time. That's all.
I found a bug: for one of the generated progressions it had 4 chords but played multiple chords at the same time. Progression was G9, Am11, D13, Bm9. But it played G9 and Am11 at once, the D13 and Bm9 at once and cycled between these two states. Clicking stop and play again and it plays normally.
I tried Em D Am6 Cadd9 which is a kind of stock alternative rock / indie rock jangly guitar progression. The variations thing suggested some really jazzy chords that didn't preserve the vibe.
Can you have a slider that lets me choose between that strategy and something more like THIS: https://www.youtube.com/watch?v=mU8HQ7O4nTc
i.e. using simple major and minor chords borrowed from "nearby" keys, so it ends up sounding more like a pop or rock song and less like jazz?
Because that's what I'm really interested in!
https://youtu.be/lz3WR-F_pnM
I made something similar a while ago, desktop only:
https://songmine.io/
Pretty much anything except delete them. My initial thought was that clicking would edit them.
Looks like a 403 - Site disabled on the call
Quick question; how do manage the playing of the chords audio? Is there a library that can handle that?
To play the audio, I take chord name, list out notes in the chord, and send the notes to a synthesizer. I used Tonejs and Tonaljs libraries.
I'm curious to see how well you think the GPT solution works for you (I'm having trouble trying it because I'm so far back in the queue. Congrats on all the traffic!) My suspicion is that it would struggle to capture more nuanced substitutions, because it doesn't really have the underlying context (things like harmonic tendencies of individual notes and voice leading) to draw from but I've been surprised before. Hope I can try it next week!