Hacker News new | ask | show | jobs
by notfed 1656 days ago
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.

4 comments

There are various commercial offerings that do this, including Chordify and Capo.

Alternatively if you want a flexible free (GPLv2) option with source code, consider the Chordino plugin (http://www.isophonics.net/nnls-chroma, C++ code at https://github.com/c4dm/nnls-chroma) which you can run in Sonic Visualiser (https://www.sonicvisualiser.org/), or indeed in Audacity.

There is a reference describing the Chordino method in the page linked above, but roughly it's not too far from the description of the parent poster - a non-negative least-squares method produces a frame-by-frame semitone-scaled decomposition which is then matched against templates and turned into a chord sequence using a hidden Markov model. Some sort of intelligent smoothing like this is certainly needed, the raw template matching is not especially useful on its own.

This type of method is now routinely outperformed by neural networks (see e.g. these MIREX evaluation results from 2018 which compare Chordino with a few other academic methods https://www.music-ir.org/mirex/wiki/2018:Audio_Chord_Estimat...) but I would suggest that it's still good enough to be useful - and I encourage the parent to continue their work, as it's an interesting area to explore.

Success! Per your suggestion, I used Chordino plugin with Sonic Visualizer. I pumped in one of my old recordings and it showed me "B6" and "Dmaj7".

However, this was only so helpful. It would have been better if it showed me a fretboard and lit up which notes are active. Instead it just showed me e.g. "B6" which unfortunately has multiple implementations so I had to try many of the implementations across many capo positions, and it ended up being a "B6" that I don't even see documented in any chord guides, probably because I was using a capo. I was eventually able to find it by guess and check: randomly moving my fingers and capo around the fretboard then if it sounds close look it up to make sure it's "B6" in a reverse chord finder (i.e. oolimo.de). Still pretty painful for amateur me.

Perhaps the fact that a given chord has multiple implementations makes it impossible for the analyzer to know which one I'm using, but in my case I'm strumming all 6 strings so I suspect it's doable. Do you know if any tools can show the results as dots-on-fretboard? Or maybe I need a more thorough reverse chord finder?

Ableton Live has a Audio to Midi [1] feature that works pretty well to extract notes from audio. Melodyne [2] is a very powerful tool to mess around with notes in general.

There's also some open source projects out there, such as aubio [3] and Omnizart [4].

[1] https://www.ableton.com/en/manual/converting-audio-to-midi/

[2] https://www.celemony.com/en/melodyne/what-is-melodyne

[3] https://aubio.readthedocs.io/en/latest/cli.html#aubionotes

[4] https://music-and-culture-technology-lab.github.io/omnizart-...

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.

> The polyphonic case (like chord detection) is trickier

Very true, but for practical purposes chord detection is easier than polyphonic note transcription - it isn't necessary to transcribe all the notes with perfect fidelity to identify a likely chord, and there are many issues around note timing that become simpler when you assume one chord at a time.

> I'm pretty sure Chorify's solution is based on "deep learning" (ANN) techniques

At least at launch, I believe they were using a method more like that of Chordino - in fact using the same chromagram decomposition - but with a more sophisticated language model for chord transitions than Chordino's HMM.

(See this publication from one of Chordify's founders, et al, which I think is relevant, or at least interesting http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.294...)

I may have to blow the dust off of my prototype.
If you do, make sure to make it a Show HN to let us know!