HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: markj on 2009-03-14 10:08:16

Title: Key checker
Post by: markj on 2009-03-14 10:08:16
Hi all,

I've searched through a few of the main foo plugin sites but can't find what I'm after.

I'm looking for a plugin that will query the track for the key it was produced in. Quite like what mixmeister does when you load tracks into that.

Thanks

Mark
Title: Key checker
Post by: odyssey on 2009-03-14 21:47:02
A plugin for this would be nice, but since the technology behind are quite complicated, 3rd party apps would probably yield better results.

Mixed In Key (http://www.mixedinkey.com) is considered one of the most accurate for this task. However, it only supports mp3 and wav - No lossless support!
Title: Key checker
Post by: markj on 2009-03-16 17:32:23
Its definitely a start - Thank you
Title: Key checker
Post by: ExUser on 2009-03-16 18:07:06
After I get foo_vorbisstream tweaked to be just how I want it, I intend to try my hand at BPM/key analysis.
Title: Key checker
Post by: markj on 2009-03-16 19:01:03
Don't suppose there are any freeware apps like this around?

I don't really want to pay $58 for just analysing the harmonic signal.
Title: Key checker
Post by: ojdo on 2009-03-16 20:00:57
Don't suppose there are any freeware apps like this around?

The CLAM Annotator (http://clam-project.org/download/win/CLAM-Annotator-0.3.10_setup.exe) (CLAM = C++ Library for Audio and Music) is capable of extracting the sequence of chords. In the linked download a commandline "ChordExtractor.exe" is included. However, it is probably a bit of overkill for you. A self-written Perl function can be found below for extracting a sequence of chord keys (A, A#, B, C, C#, ...) and modes (Major, Minor, ...) from the program's output.

Code: [Select]
use XML::Simple;
[...]
sub extract_chords {
my $filename = shift;
my $chordPath = '"C:/Program Files/CLAM/Annotator/bin/ChordExtractor.exe"';

system($chordPath." \"".$filename."\" > clam.log 2>&1"); # run CLAM ChordExtractor
my $ci = XMLin($filename.".pool") or die "Error reading result file for $filename!\n";
unlink $filename.".pool";

my @choords = @{$ci->{ScopePool}->{ExtractedChord}->{AttributePool}->{Root}->{Enumerated}};
my @mode = @{$ci->{ScopePool}->{ExtractedChord}->{AttributePool}->{Mode}->{Enumerated}};


print FO "\"@choords\",\"@mode\"\n";
}
Title: Key checker
Post by: odyssey on 2009-03-16 23:37:17
After I get foo_vorbisstream tweaked to be just how I want it, I intend to try my hand at BPM/key analysis.

That would be AWESOME!!! Which library would you rely on? I know that "Mixed in Key" are using zplane tONaRT (http://www.zplane.de/index.php?page=description-tonart) and aufTAKT (http://www.zplane.de/index.php?page=description-auftakt).
Title: Key checker
Post by: ExUser on 2009-03-17 03:38:06
I've got a couple ideas for my own algorithms which I will probably try. If I fail as miserably as I do sometimes, I might just try those libraries you mentioned. CLAM looks good, but it's pure GPL, so no foobar2000.
Title: Key checker
Post by: odyssey on 2009-03-17 10:52:07
Rapid Evolution is free to use, but it doesn't seem to use libraries, just a closed source algorithm. However the dev, shares a few interesting documents that you could probably use (http://www.mixshare.com/cgi-bin/yabb2/YaBB.pl?num=1168025235)
Title: Key checker
Post by: Chad P on 2009-03-19 21:03:57
After I get foo_vorbisstream tweaked to be just how I want it, I intend to try my hand at BPM/key analysis.

That would be AWESOME!!! Which library would you rely on? I know that "Mixed in Key" are using zplane tONaRT (http://www.zplane.de/index.php?page=description-tonart) and aufTAKT (http://www.zplane.de/index.php?page=description-auftakt).


FYI - Mixed In Key hasn't used tONaRT for about two years now, they've got their own patent pending system.


Cheers,
Chad P
Title: Key checker
Post by: odyssey on 2009-03-19 21:34:08
After I get foo_vorbisstream tweaked to be just how I want it, I intend to try my hand at BPM/key analysis.

That would be AWESOME!!! Which library would you rely on? I know that "Mixed in Key" are using zplane tONaRT (http://www.zplane.de/index.php?page=description-tonart) and aufTAKT (http://www.zplane.de/index.php?page=description-auftakt).


FYI - Mixed In Key hasn't used tONaRT for about two years now, they've got their own patent pending system.

My bad, I didn't really follow development after FLAC/lossless support was promised a long time ago, but never implemented...
Title: Key checker
Post by: odyssey on 2009-06-17 13:13:34
Any news on this, Canar?
Title: Key checker
Post by: ExUser on 2009-06-17 17:08:09
Any news on this, Canar?
Been busy and stressed trying to find a job... I hate this economy. In short, no.