Git Product home page Git Product logo

keyfinder-cli's Introduction

Keyfinder Command Line Interface

This small utility is the automation-oriented DJs best friend. By making use of Ibrahim Sha'ath's high quality libKeyFinder library, this utility can be used to estimate the musical key of many different audio file formats.

Build Status

Usage and Expected Behavior

Installing this software exposes the keyfinder-cli command on your system.

The most basic usage of this utility is to provide a path to an audio file, it will quickly compute the estimated global music key of the audio file and print it to stdout.

$ keyfinder-cli AMajor.mp3
A

In the case that there is no key (silence) nothing will be printed to stdout and the program will exit with a 0 status code.

Different key notations

Three different key notations are supported and can be toggled:

  1. -n standard for Standard Key Notation

    Keys are outputed using the standard notation. For example, Eb is equivelant to E flat. A is equivelant to A Major. Sharps are not used. This is the default notation mode used to output keys when no other otpions are specified

  2. -n openkey for Open Key Notation

    Keys are outputed using BeaTunes Open Key notation. Keys like 1m are equivelant to C Major. This is what Traktor uses for it's key notation.

  3. -n camelot for Camelot Key Notation

    Keys are outputed using the Camelot Easymix Wheel notation. Similar to Open Key notation 8B is equivelant to C Major.

Building

You will need to have the following dependencies installed on your machine

As long as these two dependencies are installed then you should be able to simply type:

$ make
$ make install

# Or suffix with PREFIX= to specify the install prefix
$ PREFIX=$HOME/.local make install

keyfinder-cli's People

Contributors

be-ing avatar evanpurkhiser avatar gluneau avatar marcelhuberfoo avatar nckx avatar sfreed141 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

keyfinder-cli's Issues

Release keyfinder-cli

Hi @evanpurkhiser

I am using keyfinder-cli since almost a year and I like to add it as package to my distro, could you do a github release so I can create the package? (We should not create packages from git directly)

Jean-Louis

fatal error: 'libavutil/avutil.h' file not found

make
c++ keyfinder_cli.cpp -std=c++11 -Wall -lkeyfinder -lavcodec -lavformat -lavutil -lswresample -lfftw3 -o keyfinder-cli
keyfinder_cli.cpp:10:10: fatal error: 'libavutil/avutil.h' file not found

I have installed ffmpeg from homebrew. How can I force define ffmpeg include directory path? Because it can't find it

Mention "make install" in ReadMe

I'm sure this is obvious for many devs, but it took me a minute to remember.
(And there was a time when I would never have figured it out...)

It would be helpful if you added "make install" to the readme.
As in, update it to say:

As long as these two dependencies are installed then you should be able to simply type:

$ make
$ make install

Thanks!

Add TravisCI build test

This way I can more easily catch when the build is no longer working due to changes in libkeyfinder.

Ubuntu 14.04.1 build problem

$ g++ -std=c++11 -Wall -lkeyfinder -lboost_system -lavcodec -lavformat -lavutil -lavresample -o keyfinder-cli keyfinder_cli.cpp -I. -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib -lavresample
keyfinder_cli.cpp: In function ‘void fill_audio_data(const char*, KeyFinder::AudioData&)’:
keyfinder_cli.cpp:162:57: error: ‘av_frame_alloc’ was not declared in this scope
     std::shared_ptr<AVFrame> audio_frame(av_frame_alloc(), &av_free);
                                                         ^
keyfinder_cli.cpp:220:100: error: ‘avresample_convert_frame’ was not declared in this scope
             if (avresample_convert_frame(resample_ctx_ptr, converted_frame.get(), audio_frame.get()) < 0)

fatal error: keyfinder/keyfinder.h: No such file or directory

Hi guys,
I receive an error on make saying:
fatal error: keyfinder/keyfinder.h: No such file or directory

i installed libkeyfinder in /usr/lib/libkeyfinder but also in /usr/lib/keyfinder and /usr/lib/lkeyfinder
I'm on Debian GNU/Linux bookworm/sid
what am I doing wrong??
thanks rob

Cannot find keyfinder library on OSX using make

I get a ld: library not found for -lkeyfinder when trying to make.

I'm running El Capitan, have run qmake, make and make install in libKeyFinder, even with the fixes mentioned in the other commit.

I have a DJ gig tomorrow, but I can't seem to build keyfinder-cli.

Unable to decode packet

I can succesfully compile libKeyfinder and keyfinder-cli on Ubuntu Bash (Windows Subsytem for Linux - WSL). It uses Ubuntu 18.04.2 LTS.
In the past I was able to successfully analyze files. Since reinstalling Windows, however I have issues when running keyfinder-cli:

$ keyfinder-cli test.mp3
Unable to decode packet

What can I do to fix it? Many thanks!

Compiling in OSX

Hi guys,
Thanks for sharing your work. I am very interested in getting this cli version working in OSX (Mavericks: 10.9.5).

I'm not necessarily an Unix expert and wonder if you could give me some pointers/quick guide to get this to compile? (Dependencies/environment). When I try to run $make keyfinder_cli I get a host of missing includes. I tried adding keyfinderlib files and some of their dependencies but I keep getting a lot of errors and warnings.

These are some of the errors:

In file included from keyfinder_cli.cpp:10:
./libavutil/opt.h:727:61: error: ISO C++ forbids forward references to 'enum' types
int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);

./libavcodec/libavutil/frame.h:477:10: error: ISO C++ forbids forward references to 'enum' types
enum AVColorPrimaries color_primaries;
^
./libavcodec/libavutil/frame.h:479:10: note: forward declaration of 'AVColorTransferCharacteristic'
enum AVColorTransferCharacteristic color_trc;
^

./libavutil/opt.h:727:61: note: forward declaration of 'AVPixelFormat'
int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);
^
These are some of the errors ..

Thanks guys

Compiling under Ubuntu 14.04

Hello,

i have trouble compiling wrapper under Ubuntu 14.04. Could you provide build instructions or dependencies and its versions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.