Live data from Hacker News

Show HN: Get the guitar chords from your Spotify playlists

spotifychords.luca.gg

51–60 of 83 posts

Re: Show HN: Get the guitar chords from your Spotify playlists

#51
post #22

Earlier quoted context omitted.

The trouble with analysing "notes" in a composition (or even just with a polyphonic instrument) is the pesky harmonics. The timbre of different instruments produce harmonics that happen to be the fundamental frequencies of other notes.

Would it be possible to eke out the harmonics by saying (for 'x' type of guitar tuned in 'y' way with 'z' effect, harmonics look like this). Like if the fundamental frequency is f, then the whole note looks like 0db at f and -5db at 2 f and -10db at 3 f or something. Then, when you're looking at the frequency domain, you start from the lower notes and say "hmm, looks like there's a fundamental at f, are the expected…

This is basically how you'd do it with non-negative matrix factorization. You take the spectrogram of a bunch of known notes for that type of guitar, and store them in a template library (just a vector of vectors, where each inner vector is a spectrogram of that note). Then NNMF determines how much of each template contributes to some given signal. The templates are the "harmonics look like this" thing you're talking about. It works pretty well.

By the way, the reason it is easier to use NNMF than try to implement your suggestion as a heuristic is because there's much more overlap between the different notes than you might think, and (worst of all) the timbre of the note:

1. evolves over time!

2. depends on the velocity of the note (how hard the string was strum)

3. and the notes actually interact with each other. If you play an E, the A string will mildly reverberate too because of the shared harmonics

Re: Show HN: Get the guitar chords from your Spotify playlists

#53

You would think getting the notes and converting them to chords, and tablature, would be one of those "exactly suited for neural nets" type of problem. If you want the chords to "Here comes the sun," you can find dozens of hits, but try something slightly obscure and they are hard to come by. (People with great ears have no idea what I am talking about.)

I don't think finding individual notes / the inherent notes within a chord is likely that difficult. The problem with this sort of thing is the nuance that's really involved - a player with a decent ear will be able to tell if the same A note is played on an open string, on the lower, fatter strings, or further up the neck. With chords, you also need to start considering voice leading (where you're specifically picki…

Yeah exactly what I was going to say, you have to consider the chord voicing, the strum pattern, and whether the sequence of chords makes sense for a human to comfortably play.

Someone above mentioned: "Here comes the sun", which is a great example.

First gotcha, it sort of sounds finger picked, but it's not it's flat picked. Another unusual thing about that song is that it's played w/ a capo on 7th fret.

Now I'm sure some software could figure out the individual notes, but I wouldn't be surprised if it transcribed it as nonsense sequence of notes all over on the g, b and e strings, instead of arpeggiated chords as it really is played.

Re: Show HN: Get the guitar chords from your Spotify playlists

#54
I built something similar for personal use. It's a Mac app that uses AppleScript to poll Spotify for the track that is currently playing. It then looks for chords on Ultimate Guitar through a small NodeJS API that uses Puppeteer to scrape the site. I'll usually just put my guitar playlist on shuffle and have this app open alongside it.

Re: Show HN: Get the guitar chords from your Spotify playlists

#55
post #26

Earlier quoted context omitted.

Ubisoft has a new version of rocksmith coming out and plans to build most of their library on this technology.

Wait, really? I would think they would use some kind of canonical source for the tabs they've licensed. Maybe I expect too much.

With OG Rocksmith (and 2014), the charts were supposedly all done by the folks at Ubisoft. They'd watch live videos and have multiple go-overs with each other to make it as accurate as possible. Besides, "official" tabs (at least historically) were usually not done by the actual artists, but some company that was just given the recordings and paid to figure it out.

Re: Show HN: Get the guitar chords from your Spotify playlists

#56
post #27
post #17

Earlier quoted context omitted.

I've worked on this problem for some time on a personal project, and I'm pretty convinced you can basically solve this problem without deep learning or AI techniques, and instead use non-negative matrix factorization[0] as a bank of note templates (from their spectrograms). I have a fairly well working proof of concept and the approach is supported by the literature. [0]: https://en.wikipedia.org/wiki/Non-negative_ma…

As an amateur musician I see this as a missing holy grail killer app. I'd love to have it just to pull the chords out of some of my own old recordings that I can't figure out how to repeat. If anyone knows of any apps (even prototypes) that can do this, please provide links.

Automated music transcription - the process of generating a musical score from an audio recording - is a pretty active topic in signal processing (and has been for a couple of decades at least).

The monophonic case (one note at a time) is fairly well solved at this point: there are decades old solutions in both the frequency domain (like FFT) and time domain (like auto-correlation and the dozens of refinements of that basic concept) that work quite well under less than ideal conditions and in near real-time. Even naive solution like just counting the number of zero-crossings in the audio signal to estimate the fundamental frequency works pretty well.

The polyphonic case (like chord detection) is trickier, especially depending on what you're looking for exactly. I.e., is it sufficient to say "that's a C Major chord" or are you looking for a specific inversion or even fingering? Does it need to happen in real-time based off a microphone or could you batch-process an audio file instead?

But there are both academic solutions and consumer-oriented tools that can do a reasonable job of it (again, depending on what you're looking for).

If you're looking for guitar-chord detection in particular, I'd recommend you take a look at Chordify (https://chordify.net/). I'm even the developer of a product that competes with (or at least overlaps with) Chordify, but frankly it pretty much does what it says on the tin (extracts chords from audio recordings with more than acceptable fidelity, especially if you're willing and able to refine that by ear using the automated transcription as a starting point).

I'm pretty sure Chorify's solution is based on "deep learning" (ANN) techniques, but others have noted in this thread that's not the only viable way to do it. I suspect some combination of increasing computational power and algorithmic refinements will eventually lead to a "direct analysis" approach that becomes as common/conventional for polyphonic pitch detection as FFT and AC are for the monophonic case. There are already a number of fairly effective techniques depending on the constraints you want to put on the problem.

Re: Show HN: Get the guitar chords from your Spotify playlists

#57

Earlier quoted context omitted.

Does your site or any other allow a user to click notes on a fretboard and have the app deduce the chord from the positions? I know a lot of chords the names of which I have forgotten, and don't have the theory chops to work it out myself

Heres one https://jguitar.com/chordname

Amazing!

  Search for finger pattern = {5 4 3 4 1 1}: 16 results found.
  A+add9add#9  A Augmented Add 9th Add Sharp 9th
  C#+7add7/A  C#/A Augmented 7th Add Major 7th
  F5addb5addb11addb13/A  F/A 5th Add Flat 5th Add Flat 11th Add Flat 13th
  ...

Re: Show HN: Get the guitar chords from your Spotify playlists

#58
post #26

Earlier quoted context omitted.

Ubisoft has a new version of rocksmith coming out and plans to build most of their library on this technology.

Wait, really? I would think they would use some kind of canonical source for the tabs they've licensed. Maybe I expect too much.

They have two modes: 1. Transcribed tabs. They own the transcription as they have done with their catalogue in existing Rocksmith games. I believe they claim they use some “AI assistance” here, but I could be wrong. At the end of the day, they pay a large number of musicians to chew through songs and write tabs. 2. Chord following. They use automated transcription to get the chords for a very large number of songs. This is a new mode in the newest game and is entirely automated, but limited.

Re: Show HN: Get the guitar chords from your Spotify playlists

#59
post #14

Hi! In terms of your credential flow - did you get a quote extension from Spotify for your use-case? I know that this kind of log in flow is really restricted without requested (at least in my experience working with the API).

Hi, I didn't get a quote extension, I never actually looked at the quote limitation because I was only using it myself. Edit: I checked on the Spotify developer dashboard and it says "App Status: Granted quota extension"

Someone from Spotify should have read this on HN and decided to give you a present :)
Post reply on HN