Hello,
after I was finally able to build libkeyfinder and examples/basic.cpp:
$ sudo pacman -S cmake fftw catch2
-> Extract and cd into folder, then:
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/include -S . -B build
$ cmake --build build --parallel 12
$ sudo cmake --install build
$ cd examples/
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/include -S . -B build
$ cmake --build build --parallel 12
$ cd build/
I'm getting this error when I try to run the basic example:
$ ./basic file1.wav
Sample Rate: 44100
Num Channels: 2
Num Samples: 31
terminate called after throwing an instance of 'KeyFinder::Exception'
what(): Cannot set out-of-bounds sample (31/31)
$ ./basic file2.wav
Sample Rate: 44100
Num Channels: 2
Num Samples: 15125124
terminate called after throwing an instance of 'KeyFinder::Exception'
what(): Cannot set out-of-bounds sample (15125124/15125124)
(file1.wav was converted using the latest version of ffmpeg on arch linux ($ffmpeg -i file1.mp3 file1.wav, while file2.wav was already in .wav format.)
I tried 3 other files (converted from .mp3 to .wav using $ ffmpeg -i filename.mp3 filename.wav) but unfortunately I get the same error.
Edit
As an alternative I found musical-key-finder and librosa itself to be interesting: librosa creates the chromagram image and musical-key-finder gives further details, based on results from librosa, on which key could be the correct one:
# prints the relative prominence of each pitch class
# prints the correlation coefficients associated with each major/minor key
# printout of the key determined by the algorithm; if another key is close, that key is mentioned
Hello,
after I was finally able to build libkeyfinder and
examples/basic.cpp:-> Extract and
cdinto folder, then:I'm getting this error when I try to run the basic example:
(file1.wav was converted using the latest version of ffmpeg on arch linux (
$ffmpeg -i file1.mp3 file1.wav, while file2.wav was already in .wav format.)I tried 3 other files (converted from .mp3 to .wav using
$ ffmpeg -i filename.mp3 filename.wav) but unfortunately I get the same error.Edit
As an alternative I found musical-key-finder and
librosaitself to be interesting:librosacreates the chromagram image andmusical-key-findergives further details, based on results fromlibrosa, on which key could be the correct one: