Skip to content

Musical key detection for digital audio, GPL v3

Notifications You must be signed in to change notification settings

heyigor/libKeyFinder

This branch is 2 commits ahead of, 228 commits behind ibsh/libKeyFinder:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fdd45e0 · Apr 10, 2013

History

41 Commits
Feb 16, 2013
Jan 29, 2013
Feb 25, 2013
Apr 10, 2013
Jan 18, 2013
Mar 14, 2013
Mar 14, 2013
Jan 21, 2013
Mar 14, 2013
Mar 14, 2013
Feb 11, 2013
Feb 11, 2013
Mar 14, 2013
Mar 14, 2013
Jan 25, 2013
Jan 31, 2013
Feb 11, 2013
Feb 11, 2013
Mar 14, 2013
Mar 14, 2013
Jan 25, 2013
Feb 11, 2013
Feb 11, 2013
Feb 11, 2013
Jan 23, 2013
Feb 25, 2013
Feb 11, 2013
Mar 14, 2013
Mar 14, 2013
Mar 14, 2013
Mar 14, 2013
Jan 21, 2013
Feb 11, 2013
Feb 10, 2013
Feb 11, 2013
Feb 10, 2013
Feb 11, 2013
Feb 10, 2013
Feb 11, 2013
Feb 25, 2013
Mar 14, 2013
Feb 10, 2013
Feb 11, 2013
Feb 25, 2013
Feb 25, 2013

Repository files navigation

libKeyFinder can be used to estimate the musical key of digital recordings.

It is the basis of the KeyFinder GUI app, which is available as a binary download for Mac OSX and Windows at www.ibrahimshaath.co.uk/keyfinder

For the most basic use case, do something like this:

  // Static because it retains useful resources for repeat use
  static KeyFinder::KeyFinder k;

  // Prepare the default set of parameters
  KeyFinder::Parameters p;

  // Build an empty audio object
  KeyFinder::AudioData a;

  // Prepare the object for your audio stream
  a.setFrameRate(yourAudioStream.framerate);
  a.setChannels(yourAudioStream.channels);
  a.addToSampleCount(yourAudioStream.length);

  // Copy your audio into the object
  while (int i = 0; i < yourAudioStream.length; i++) {
    a.setSample(i, yourAudioStream[i]);
  }

  // Run the analysis
  KeyFinder::KeyDetectionResult r =  k.findKey(a, p);

  // And do something with the result!
  doSomethingWith(r.globalKeyEstimate);

About

Musical key detection for digital audio, GPL v3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.9%
  • Prolog 3.4%
  • Other 1.7%