New open source key detection tool

Home :: General Discussion :: New open source key detection toolReply
New open source key detection tool
Posted on: 30.09.2011 by Kari Spindel
Hey all,

I just finished a computer science course and built a key detection tool for DJs as my final project. The tool is called KeyFinder. It's designed to work primarily with EDM, but it's highly tweakable and I've had decent results with various genres.

In addition to a batch key detection interface which can write to metadata tags, it includes a musical visualisation tool called a chromagram. I've found this quite useful for visualising chord structures, melodies and key changes, and I believe it's pretty unique in the DJ software world; I haven't seen any other tools that have something similar.

I got good accuracy during my experiments but unfortunately I didn't test it on a wide selection of music. I had very little time and had to key it all manually and then get the results verified. It would be great to improve KeyFinder to work on a wide variety of genres.

So I'm releasing it for free under the GPL, in the hope the community finds it useful. It's a bit primitive, and for Mac only at present, but it should be pretty simple to port to Windows if there's interest.

If you want to try it you can download a Mac binary here. My write-up which describes the algorithms is also there if you're into that kind of thing. If anyone has any interest in working on it, or any comments or questions, feel free to get in touch here or using the email address on that page.

Cheers
Pierre Massner
22.02.2013
Pretty much had enough of MIK's ...offensive online-only operation as well as a few other things and looking at other options and came across Keyfinder...fantastic! Good work sir! One question, processing flacs doesn't seem to write to the key tag, is this because flac doesn't have a native key tag? No way to implement in KF even by doing semi manually in KF? A little research suggests no key tags in flac....maybe I'll just prepend them all to comments then batch write them to the key field as and when.

Thanks again, look forward to donating if/when I get an MIK refund
Mackenzie Weersing
20.02.2013
Originally Posted by ibsh
Slightly fewer than MIK (see the comparison chart)

Seems quite comperable to the competition, then.
Kari Spindel
20.02.2013
Originally Posted by droxpopuli
Nice number of exact, but what about compatible matches?
Slightly fewer than MIK (see the comparison chart)

Mackenzie Weersing
20.02.2013
Originally Posted by ibsh
Now Traktor has a key detection feature, it seems; sneaked it into the latest point release. Based on some very basic research, it's a good algorithm, too. Higher number of exact matches than MIK and solid overall accuracy.

They also added a great colour coding feature when you sort by key. Very cool stuff.
Nice number of exact, but what about compatible matches?
Kari Spindel
20.02.2013
Now Traktor has a key detection feature, it seems; sneaked it into the latest point release. Based on some very basic research, it's a good algorithm, too. Higher number of exact matches than MIK and solid overall accuracy.

They also added a great colour coding feature when you sort by key. Very cool stuff.
Tamela Batara
18.02.2013
Downloaded this. Will give it a try out.
Yu Santellano
18.02.2013
I tried this for myself yesterday, and I was amazed at the speed at which it works, it's just incredible, but I just thought I'd add a few things:

1. This may have been mentioned, but it doesn't appear to want to analyze protected iTunes files (some iTunes files have this - but only seems to be very old ones, don't seem to get them anymore so probably a bit of a non-issue).

2. There seems to be a large favouring of Minor keys - I assume this is natural: I understand a lot of dance music is done in minor keys to avoid sounding "cheesy", and Virtual DJ (back when I used that) always used to give me minor keys exclusively. The only change was when I used Rapid Evo 3, which balanced it out a bit and included a lot more major keys. The balance seems to have shifted back now.

These aren't real issues at all, but just a couple of things I thought bore believeing about.
Anyway, it's a real gem of a program, fantastically fast and easy to use!
DJ MENSAH
17.02.2013
Really like "o fortuna", gonna check out the rest of the tunes. (audio player on bandcamp is crap)
Kari Spindel
24.01.2013
Originally Posted by Student
Thank you for this update; there is one small problem I have. When I run a batch from my music in iTunes, downloaded from iTunes so no 'local' mp3's, it overwrites the comments and puts the key in the Key tag, but when I search for the track in Traktor it still doesn't mention the key, nor does it in iTunes. Both the comments and key section stay blank. Am I overlooking something?

And second, is there another way to make a small donation to you for your hard work? Sadly I'm not the proud owner of a Paypal account...
Hey Student, sorry it took so long to get back to you, I overlooked your message.
iTunes doesn't look at the Key tag in any case, so you'd never see it there. I can't recall offhand if Traktor uses the Key tag but if it does, it'll be necessary to "check consistency" on the tagged files after writing to them for the new tags to be read by Traktor.
I hope that answers your question; if not just hit me up at the contact address on the KF site.

As for a donation, if you're not into Paypal you could buy a couple of my dnb tunes at counterfeit.bandcamp.com. =)
Trula Willadsen
11.12.2012
Originally Posted by ibsh
Good evening.

KeyFinder v1.17 is now available.

This version includes:
* Hack for the key tag in iTunes metadata (AAC, ALAC etc)

As always, any feedback welcome. And if you have the linguistic chops to write a translation of the GUI into your language, let me know (it's easy; no programming knowledge is required).
Thank you for this update; there is one small problem I have. When I run a batch from my music in iTunes, downloaded from iTunes so no 'local' mp3's, it overwrites the comments and puts the key in the Key tag, but when I search for the track in Traktor it still doesn't mention the key, nor does it in iTunes. Both the comments and key section stay blank. Am I overlooking something?

And second, is there another way to make a small donation to you for your hard work? Sadly I'm not the proud owner of a Paypal account...
Latina Samon
09.12.2012
No idea how accurate it is but love it. Dead easy to use and quick. Cheers
Isa Erik
13.10.2012
Originally Posted by Sn0wday
I checked for a read-only option. I'm on a Mac, and i just got it a couple months ago, where wold this read-only thing be?
http://www.cultofmac.com/56414/100-t...le-properties/
Madelene Witek
11.10.2012
I checked for a read-only option. I'm on a Mac, and i just got it a couple months ago, where wold this read-only thing be?
Isa Erik
11.10.2012
Originally Posted by Sn0wday
Well, if I can edit them manually in iTunes and Traktor, they wouldn't be read only, right?
Is that a "Yes, i checked that my mp3's don't have "read-only" selected in properties" or a "It can't be that simple so I'm gonna just write something in reply"?

What I'm trying to say is: I had the same problem, this was my solution so try it first. And yes, my files were "read-only" and I could still edit them in Mp3Tag editor so I would suspect the same is with iTunes and other commercial programs.

And oh...Ibsh: you might wanna fix that in the next version
Madelene Witek
10.10.2012
Well, if I can edit them manually in iTunes and Traktor, they wouldn't be read only, right?
Isa Erik
11.10.2012
Originally Posted by Sn0wday
I cannot for the life of me get this thing to write to my files.

I have it told to write to files during jobs in preferences.

That doesn't work.

Tried just right clicking and telling it to do so, but it will just sit there saying "0 key tags written to 0 files".
make sure your mp3 files don't have "read-only" selected
Madelene Witek
09.10.2012
I cannot for the life of me get this thing to write to my files.

I have it told to write to files during jobs in preferences.

That doesn't work.

Tried just right clicking and telling it to do so, but it will just sit there saying "0 key tags written to 0 files".
Brunilda Kora
04.10.2012
Originally Posted by jester.NZ
Also MiK converts each file to a wav before analysing, this one doesn't do that so is awesome fast for batch processing.
FASTER than MiK? Sign me up...
Mitzie Baarda
21.09.2012
Hi Ibsh. Having a lil problem with keyfinder on win 7. It runs fine on 4 year old amd desktop. On my dj i7 win 7 laptop, keyfinder opens then windows closes it down within seconds. Any help would be appreciated. Thanks in advance. Jay.
Cole Maroto
20.09.2012
Yeah, when I saw your post with the ability to put the camelot keys in, that put me over the edge. Plus no conversion to wav! Even better.
Latoria Kavulich
20.09.2012
Also MiK converts each file to a wav before analysing, this one doesn't do that so is awesome fast for batch processing.
Latoria Kavulich
20.09.2012
squidot just rememmber if you want to use the camelot system, you will have to add custom keys in the preferences, just scroll back a few posts for a hint
Cole Maroto
20.09.2012
Nice! This is the first I'm seeing this so I'm going to give it a try over mik. Thanks for sharing it!
Latoria Kavulich
20.09.2012
Congrats!

Mate i've been using your tool pretty much since it popped up on djtt, i was a MiK user for a few years but IMO your tool is faster and more accurate. I will have a test with the new version this weekend and expect a few sheckles in your paypal from me next week
Kari Spindel
19.09.2012
Good evening.

KeyFinder v1.17 is now available.

This version includes:
* Hack for the key tag in iTunes metadata (AAC, ALAC etc)
* Localisable interface, with translations for French and Swedish users: more to follow.
* Updated library binaries
* Various small changes

As always, any feedback welcome. And if you have the linguistic chops to write a translation of the GUI into your language, let me know (it's easy; no programming knowledge is required).

This release also marks KeyFinder's first birthday; I launched it a year ago today. After a slow start, it's been downloaded more than 5000 times in its first year, by users in 120 countries. I've been thoroughly humbled by the response to my little app, and having it used by hundreds of DJs has been very rewarding. I've also had tons of feedback, which has been fascinating at least as many times as it's been infuriating. So in short, thank you all so much for your support!

And if you want to thank me in return, why not drop a small PayPal donation alongside your next download, so I can celebrate this auspicious occasion in some style? =)
Kari Spindel
18.07.2012
Originally Posted by DJ JaeSea
This is so badass, props to the creator for making this software. This is a full blown implementation of a software that I wanted to make about 6 months ago but just thought about the use of FFTs during my DSP class (Electrical Engineering at Texas A&M). So cool and I wish there was a way that I could help with some of the math/ coding but it looks like I am about 6 months too late

Let me know if you need anything though, I am trying to help advocate the use of freeware in this day and age since so many things can be accessed without money now-a-days (dj knowledge, circuit help, personal advice etc)
Yeah, you're a bit late to the party =) But if you have any ideas about efficient and accurate tempo detection, or if you fancy trying to improve KF's key detection algorithm, let me know.
Jennell Danio
17.07.2012
This is so badass, props to the creator for making this software. This is a full blown implementation of a software that I wanted to make about 6 months ago but just thought about the use of FFTs during my DSP class (Electrical Engineering at Texas A&M). So cool and I wish there was a way that I could help with some of the math/ coding but it looks like I am about 6 months too late

Let me know if you need anything though, I am trying to help advocate the use of freeware in this day and age since so many things can be accessed without money now-a-days (dj knowledge, circuit help, personal advice etc)
DJ MENSAH
16.07.2012
Jester, you are making it easy for them.

TL;DR: MIK can sue anyone who is redistributing/using their patent. They cannot touch you if you are using that patent for yourself. So, as long as you use custom codes, and you are doing that only for yourself, everything is fine legally. I'm not sure if you should avoid redistribution of these tracks over the internet.
Latoria Kavulich
15.07.2012
Yee Bedilion
15.07.2012
I'm sure you could come up with your own style camelot wheel.

Look up the frequency of each key and they will have an associated color band. Make up your own word code.

Its just the circle of fifths? how do they have that copy-writted/patented. it must be the 1A/1B part of it.


I'm sure that mixed in key circle exists on the internet without there twist to it.

Yeah you could just make a relationship chart NEW SYMBOL=1a/1b and its all alike.
DJ MENSAH
15.07.2012
ThinkAboutIt,

it can work with the camelot wheel, you just have to use your brain (start by looking at some earlier posts of this thread).
DJ MENSAH
15.07.2012
Snowday,

- what categories are you referring to?
- you can throw in as many tracks as you want, and it will analyze only those without key set, so what's the problem?
- why would you need two keyfinders?? you have directory browser supplied by your OS...
- there is no sense in saving sessions when tracks are there (in keyfinder) only for purpose of tagging.

Seems to me that you are trying to shoehorn this app...
Ulysses Vittetoe
14.07.2012
I get lots of memory allocation failures using this on Windows. Wish I knew enough about programming to pick up the Windows side of the project and fix things.:/ Thank you for all your hard work so far though.
Madelene Witek
14.07.2012
Been using this for a while, I like it, but ALOT of stuff is still pretty messed up. Things that would help IMMENSELY.

-Choose which categories you have visible, rather than every time you open have to drag them as small as they go.
-Make it so I can select individual/multiple tracks to analyze rather than have to do the whole things (i.e. I get new tracks all the time, and I load my whole "dubstep" collection in, and I have to analyze every single track which takes forever, to get the new ones analyzed.)
-Or, if thats too complicated, make it so I can highlight tracks, and drag them to a new keyfinder window.
-If keyfinder could save it's sessions, instead of opening an entirely new one every time.
Lela Umanskaya
14.07.2012
I've been using MIK for a few months now, works great, kudos to the developer.

It's nice to have the keys laid out as a guideline, even if you gotta break away from it now and then, always good to have a "safe zone" to work with.
Georgianna Eurick
14.07.2012
No
Kari Spindel
14.07.2012
Originally Posted by ThinkAboutIt
This doesn't work with the camelot wheel, right?
Check the FAQ.
Georgianna Eurick
14.07.2012
This doesn't work with the camelot wheel, right?
Latoria Kavulich
14.07.2012
thanks again for your hard work.
Kari Spindel
14.07.2012
KeyFinder v1.16 is now up. There is now also a US mirror, kindly hosted in Dallas TX by a generous user; just click on the appropriate flag =)

This version includes:
* Prepend/append options for writing metadata
* Option to skip tracks over a certain length (for avoiding mixes/audiobooks/whatever)
* Improved logic for skipping tracks that already have keys
* Updated library binaries
* Improved Linux support
* Multiple bug fixes etc

So, this is the first update in a while, because most of the feedback I've been getting has been related to memory allocation problems affecting a minority of Windows users. Those issues are not fixed, and are unlikely to be in the near future. I've spent as long on them as I'm willing to at the moment. So I'm afraid the Windows build will only improve in reliability if another developer picks it up or I get a second wind.

Onward and upward. Hope this helps people out; any feedback welcome.

<< Back to General DiscussionReply

Copyright 2012-2023
DJRANKINGS.ORG n.g.o.
Chuo-ku, Osaka, Japan

Created by Ajaxel CMS

Terms & Privacy