jamiebullock / libxtract Goto Github PK
View Code? Open in Web Editor NEWLibXtract is a simple, portable, lightweight library of audio feature extraction functions.
License: MIT License
LibXtract is a simple, portable, lightweight library of audio feature extraction functions.
License: MIT License
Currently there are a number of ways xtract_failsafe_f0() can return an F0 of 0 for spectra with non-zero bins.
The only time it should return zero is when the source is pure silence.
Hello Jamie,
I'm running into something that is probably my fault, but I wanted to run it by you to see what you thought the cause could be. Occasionally, I'm seeing a +Inf at nyquist that is throwing off the rest of my extraction chain. I haven't been able to deduce why it's happening yet with my setup and I'm just going to zero it out for the sake of getting this project out the door, but for record's sake here is my setup and usage. Simplified code below:
class XtractNode {
public:
void initialize();
void process( double *buf );
private:
double *mWindow;
std::vector<double> mFft;
size_t mNumFramesPerBlock, mNumChannels;
};
void XtractNode::initialize()
{
mNumFramesPerBlock = 512;
mNumChannels = 2;
mWindow = xtract_init_window( mNumFramesPerBlock, XTRACT_HANN );
mFft.resize( mNumFramesPerBlock );
xtract_init_fft( mNumFramesPerBlock, XTRACT_SPECTRUM );
}
void XtractNode::process( double *buf )
{
xtract_windowed( buf, mNumFramesPerBlock, mWindow, buf );
double argv[4] = {0};
argv[0] = mSampleRate / (double)mNumFramesPerBlock;
argv[1] = XTRACT_MAGNITUDE_SPECTRUM;
argv[2] = 0.f;
argv[3] = 0.f; // No Normalisation
xtract_spectrum( buf, mNumFramesPerBlock, &argv[0], mFft.data() );
}
After xtract_spectrum
, I'm seeing tha buf[255] = +Inf, but as I mentioned only rarely - other times the analysis and subsequent feature extraction chain works as expected. Does anything pop out to you that I'm doing wrong, or am I hitting an implementation issue?
Thanks,
Rich
Hi,
I'm trying to import xtract in a python script. Your test.py in LibXtract/swig/python worked fine, but when I try to import xtract from a simple script I write, it doesn't find the module (even though I've added /usr/local/lib/python2.7/site-packages/libxtract/xtract.py to the PYTHONPATH).It says:
File "test1.py", line 5, in <module> import xtract ImportError: No module named xtract
But now, even if I save my python script in LibXtract/swig/python and do import xtract
I get:
import xtract File "/Users/jonathan/Desktop/LibXtract/swig/python/xtract.py", line 31, in <module> _xtract = swig_import_helper() File "/Users/jonathan/Desktop/LibXtract/swig/python/xtract.py", line 23, in swig_import_helper import _xtract ImportError: No module named extract
Thanks for your help!
If the last element in the input array is below or equal to the threshold it will always be returned.
The function accesses the (N + 1)th element of the input data.
If using the output of xtract_spectrum this will cause the first piece of bin frequency data to be used in the calculation unless you pass (spectrumLength / 2 - 1) as the value for N. If you do that it makes it inconsistent with how one would use xtract_irregularity_k.
Changing the first line in the function body from:
int n = N
to:
int n = N - 1
Makes everything more consistent.
Hi,
even though this seems pretty obvious I want to double check that xtract_f0 only accepts the spectrum to get the pitch, the results then should be the frequency in Hz, is this correct?
I'm testing the function with a software that generates tones and the results don't match, basically higher tones generate small numbers and lower tones generate big ones.
Also the function seems to ignore input signals below 100Hz, the pcm signal is oscillating but the f0 doesn't move and I'm looking at the raw data.
If help I can upload a short video to show the problem.
thanks.
Hi,
I'm trying to install LibXtract with the sudo make install command, but I am getting the following error message:
Making install in puredata
install -d /usr/local/lib/pd/extra
install -m 644 ../../examples/puredata/.libs/xtract.pd_darwin /usr/local/lib/pd/extra/xtract~.pd_darwin
install: ../../examples/puredata/.libs/xtract.pd_darwin: No such file or directory
make[2]: *** [install] Error 71
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
I kind of think the "" shouldn't be in the directory /usr/local/lib/pd/extra/xtract.pd_darwin, but then again I'm really no expert...
Could you help me with this problem?
Thanks!
I'm a bit confused about the documentation for xtract_irregularity_k
and xtract_irregularity_k
concerning the size of the data param - should it be the size of the FFT or the size of the magnitude spectrum bins? My hunch is the latter, these are the results I'm getting:
N = blocksize (512):
N = blocksize / 2:
Any thoughts?
Thanks,
Rich
I presume LibXtract switched from Subversion to Git permanently. If so, SVN is mentioned several times in README.md .
@jamiebullock How could I call those functions in Java? I have installed the tool by the configuration "./configure --enable-fft --enable-swig --with-java". Thank you.
Hi,
there is a random issue with the irregularity, its behaviour seems not consistent and I can't replicate this problem, just happens randomly, at some point it kind of stop working, did you notice this issue before?
LibXtract compiled with ooura FFT.
libxtract: error: only power-of-two FFT sizes are supported by Ooura FFT.
Hi,
I'm a bit confused abotu the fft size, I tried different settings, but the one that's working doesn't seem to be right.
I'm starting with interleaved pcm buffer of 2048 samples(1024 per channel), therefor I should initialised mPcmData with 1024 samples.
The spectrum array size then should be 1024 too, 512 bin frequencies followed by 512 frequency labels.
The xtract_init_fft initialisation really confuses me, in my understanding the fft size is 512, however the only value that works is 2048, in the screenshot below you can see different results using 2048, 1024 and 512 fft size.
#define PCM_SIZE 1024
// init
mPcmData = std::shared_ptr<double>( new double[ PCM_SIZE ] );
xtract_init_fft( PCM_SIZE << 1, XTRACT_SPECTRUM );
// ...
// get pcm data 2048 samples
audio::Buffer32fRef buff = mPcmBuffer->getInterleavedData();
for( size_t k=0; k < PCM_SIZE; k++ )
mPcmData.get()[k] = buff->mData[k*2];
// ...
// get spectrum
argd[0] = SAMPLERATE / (double)PCM_SIZE;
argd[1] = XTRACT_MAGNITUDE_SPECTRUM;
argd[2] = 0.0f;
argd[3] = 0.0f;
xtract_spectrum( mPcmData.get(), PCM_SIZE, _argd, mSpectrum.get() );
Hi!
I have been looking for a library like that for a while, and that look very promising! Any place where I could find docs online?
I have tried to look for what features are available, and there doesn't seem to be "perceived loudness", are you planning to implement it in the future?
@jamiebullock Thank you for your instructions. The test.java works very well. When I call the functions in my project, I fail to load the library "jxtract". Where is the ".libs" in "java.library.path=.libs"? What should I set to java.library.path? Thank you so much!
I am trying to install libxtract on ubuntu. My configure step was successful, but make fails.
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 21 has invalid symbol index 22
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function _start': (.text+0x18): undefined reference to
main'
xtract~.o: In function xtract_tilde_show_help': xtract~.c:(.text+0x17): undefined reference to
post'
xtract~.c:(.text+0x3d): undefined reference to post' xtract~.o: In function
xtract_tilde_get_args':
xtract~.c:(.text+0x7d): undefined reference to getbytes' xtract~.c:(.text+0x9d): undefined reference to
atom_getfloat'
xtract~.c:(.text+0xdf): undefined reference to atom_getfloat' xtract~.o: In function
xtract_perform':
Hi,
xtract_smoothness as well as some other functions, require a pointer to an array of integers, would it be possible to uniform all the functions in order to only accept pointers to array of double or is it an issue?
Hi,
I'm trying to find a consistent way to normalise the scalar values, I thought to use the descriptor to get min and max values, but I noticed that not all the functions has a descriptor, is there another way to get min/max values for each function?
Hello Jamie. When using the built in Accelerate framework and malloc_scribble is enabled, the last elements of the fft structure are non-zero. (Throwing off pretty much scalar functions!)
fix...(clear the structure instead of just malloc).
xtract_init_vdsp_data.c
vdsp_data->fft.realp = (double *) calloc((N >> 1) + 1,sizeof(double));
vdsp_data->fft.imagp = (double *) calloc((N >> 1) + 1,sizeof(double));
I am unable to create the Pd examples for LibXtract on Linux Mint Debian Edition. When I run make, I get the following errors:
j~/Desktop/LibXtract-master $ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/james/Desktop/LibXtract-master/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make all-recursive
make[1]: Entering directory /home/james/Desktop/LibXtract-master' Making all in src make[2]: Entering directory
/home/james/Desktop/LibXtract-master/src'
make[2]: Nothing to be done for all'. make[2]: Leaving directory
/home/james/Desktop/LibXtract-master/src'
Making all in xtract
make[2]: Entering directory /home/james/Desktop/LibXtract-master/xtract' make[2]: Nothing to be done for
all'.
make[2]: Leaving directory /home/james/Desktop/LibXtract-master/xtract' Making all in examples make[2]: Entering directory
/home/james/Desktop/LibXtract-master/examples'
Making all in puredata
make[3]: Entering directory /home/james/Desktop/LibXtract-master/examples/puredata' /bin/bash ../../libtool --tag=CC --mode=link gcc -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -fPIC -DPD -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -shared -export_dynamic -lxtract -L../../src/ -lm -o xtract.pd_linux xtract~.o libtool: link: gcc -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -fPIC -DPD -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -export_dynamic -o .libs/xtract.pd_linux xtract~.o /home/james/Desktop/LibXtract-master/src/.libs/libxtract.so -L../../src/ -lm /usr/bin/ld: warning: cannot find entry symbol xport_dynamic; defaulting to 0000000000400ef0 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: In function
_start':
(.text+0x20): undefined reference to main' xtract~.o: In function
xtract_tilde_show_help':
xtract~.c:(.text+0x22): undefined reference to post' xtract~.c:(.text+0x46): undefined reference to
post'
xtract~.o: In function xtract_tilde_get_args': xtract~.c:(.text+0x84): undefined reference to
getbytes'
xtract~.c:(.text+0xb7): undefined reference to atom_getfloat' xtract~.c:(.text+0xea): undefined reference to
atom_getfloat'
xtract~.o: In function xtract_perform': xtract~.c:(.text+0x1be): undefined reference to
outlet_float'
xtract~.c:(.text+0x1ed): undefined reference to pd_error' xtract~.o: In function
xtract_perform_vector':
xtract~.c:(.text+0x30f): undefined reference to pd_error' xtract~.o: In function
xtract_tilde_free':
xtract~.c:(.text+0x371): undefined reference to freebytes' xtract~.o: In function
xtract_new':
xtract~.c:(.text+0x39c): undefined reference to pd_new' xtract~.c:(.text+0x3dc): undefined reference to
getbytes'
xtract~.c:(.text+0x3ea): undefined reference to getbytes' xtract~.c:(.text+0x3ff): undefined reference to
atom_getsymbol'
xtract~.c:(.text+0x40e): undefined reference to gensym' xtract~.c:(.text+0x41f): undefined reference to
atom_getsymbol'
xtract~.c:(.text+0x445): undefined reference to atom_getsymbol' xtract~.c:(.text+0x4b1): undefined reference to
gensym'
xtract~.c:(.text+0x539): undefined reference to post' xtract~.c:(.text+0x59b): undefined reference to
gensym'
xtract~.c:(.text+0x5aa): undefined reference to gensym' xtract~.c:(.text+0x5bb): undefined reference to
inlet_new'
xtract~.c:(.text+0x5c9): undefined reference to s_signal' xtract~.c:(.text+0x5d1): undefined reference to
outlet_new'
xtract~.c:(.text+0x612): undefined reference to post' xtract~.c:(.text+0x623): undefined reference to
s_float'
xtract~.c:(.text+0x62b): undefined reference to outlet_new' xtract~.c:(.text+0x639): undefined reference to
atom_getint'
xtract~.c:(.text+0x650): undefined reference to atom_getint' xtract~.c:(.text+0x6bd): undefined reference to
post'
xtract~.c:(.text+0x6de): undefined reference to getbytes' xtract~.c:(.text+0x712): undefined reference to
post'
xtract~.c:(.text+0x731): undefined reference to post' xtract~.c:(.text+0x74e): undefined reference to
post'
xtract~.c:(.text+0x781): undefined reference to post' xtract~.c:(.text+0x78d): undefined reference to
getbytes'
xtract~.c:(.text+0x7ca): undefined reference to getbytes' xtract~.c:(.text+0x876): undefined reference to
post'
xtract~.c:(.text+0x8ce): undefined reference to getbytes' xtract~.c:(.text+0x8ec): undefined reference to
getbytes'
xtract~.o: In function xtract_tilde_setup': xtract~.c:(.text+0x96c): undefined reference to
gensym'
xtract~.c:(.text+0x999): undefined reference to class_new' xtract~.c:(.text+0x9ac): undefined reference to
gensym'
xtract~.c:(.text+0x9c6): undefined reference to class_addmethod' xtract~.c:(.text+0x9d2): undefined reference to
gensym'
xtract~.c:(.text+0x9f2): undefined reference to class_addmethod' xtract~.c:(.text+0x9fe): undefined reference to
gensym'
xtract~.c:(.text+0xa1e): undefined reference to class_addmethod' xtract~.c:(.text+0xa2f): undefined reference to
class_domainsignalin'
xtract~.c:(.text+0xa3b): undefined reference to gensym' xtract~.o: In function
xtract_dsp':
xtract~.c:(.text+0x923): undefined reference to dsp_add' xtract~.c:(.text+0x951): undefined reference to
dsp_add'
xtract~.o: In function xtract_tilde_setup': xtract~.c:(.text+0xa4e): undefined reference to
class_sethelpsymbol'
collect2: error: ld returned 1 exit status
make[3]: *** [xtract.pd_linux] Error 1
make[3]: Leaving directory /home/james/Desktop/LibXtract-master/examples/puredata' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory
/home/james/Desktop/LibXtract-master/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/james/Desktop/LibXtract-master'
make: *** [all] Error 2
I'm trying to generate the documentation using the config file provided, but the generated index.html is empty.
doxygen doc/documentation.doxygen.in
The simpletest example crashes on Linux:
*** glibc detected *** /home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest: free(): invalid next size (normal): 0x085ec250 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x75ee2)[0xb75e8ee2]
/home/ryan/Downloads/LibXtract-master/src/.libs/libxtract.so.0(xtract_init_mfcc+0x494)[0xb773be44]
/home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest[0x804877f]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb758c4d3]
/home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest[0x804886d]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:01 3550801 /home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest
08049000-0804a000 r--p 00000000 08:01 3550801 /home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest
0804a000-0804b000 rw-p 00001000 08:01 3550801 /home/ryan/Downloads/LibXtract-master/examples/simpletest/.libs/lt-simpletest
085d1000-085f2000 rw-p 00000000 00:00 0 [heap]
b7512000-b752e000 r-xp 00000000 08:01 132020 /lib/i386-linux-gnu/libgcc_s.so.1
b752e000-b752f000 r--p 0001b000 08:01 132020 /lib/i386-linux-gnu/libgcc_s.so.1
b752f000-b7530000 rw-p 0001c000 08:01 132020 /lib/i386-linux-gnu/libgcc_s.so.1
b7545000-b7546000 rw-p 00000000 00:00 0
b7546000-b7570000 r-xp 00000000 08:01 131202 /lib/i386-linux-gnu/libm-2.15.so
b7570000-b7571000 r--p 00029000 08:01 131202 /lib/i386-linux-gnu/libm-2.15.so
b7571000-b7572000 rw-p 0002a000 08:01 131202 /lib/i386-linux-gnu/libm-2.15.so
b7572000-b7573000 rw-p 00000000 00:00 0
b7573000-b7716000 r-xp 00000000 08:01 131085 /lib/i386-linux-gnu/libc-2.15.so
b7716000-b7717000 ---p 001a3000 08:01 131085 /lib/i386-linux-gnu/libc-2.15.so
b7717000-b7719000 r--p 001a3000 08:01 131085 /lib/i386-linux-gnu/libc-2.15.so
b7719000-b771a000 rw-p 001a5000 08:01 131085 /lib/i386-linux-gnu/libc-2.15.so
b771a000-b771d000 rw-p 00000000 00:00 0
b7730000-b7732000 rw-p 00000000 00:00 0
b7732000-b7749000 r-xp 00000000 08:01 3550740 /home/ryan/Downloads/LibXtract-master/src/.libs/libxtract.so.0.0.0
b7749000-b774a000 r--p 00016000 08:01 3550740 /home/ryan/Downloads/LibXtract-master/src/.libs/libxtract.so.0.0.0
b774a000-b774b000 rw-p 00017000 08:01 3550740 /home/ryan/Downloads/LibXtract-master/src/.libs/libxtract.so.0.0.0
b774b000-b774d000 rw-p 00000000 00:00 0
b774d000-b774e000 r-xp 00000000 00:00 0 [vdso]
b774e000-b776e000 r-xp 00000000 08:01 131203 /lib/i386-linux-gnu/ld-2.15.so
b776e000-b776f000 r--p 0001f000 08:01 131203 /lib/i386-linux-gnu/ld-2.15.so
b776f000-b7770000 rw-p 00020000 08:01 131203 /lib/i386-linux-gnu/ld-2.15.so
bfb03000-bfb24000 rw-p 00000000 00:00 0 [stack]
Aborted (core dumped)
ryan@ryan-VGN-T2XP-S:/Downloads/LibXtract-master/examples/simpletest$ ^C/Downloads/LibXtract-master/examples/simpletest$
ryan@ryan-VGN-T2XP-S:
Hello,
I can't build on ubuntu 12.04. I type commands:
$ ./configure --enable-swig --with-python --enable-fft --prefix=$HOME/.local
$ make
and get finally the error:
/usr/bin/ld: cannot find -lxtract
the complete log is available here:
Regards,
Alexis
hello,
i keep getting a make error while building that says:
simpletest.o: In function main': /home/mansi/SOFT/libxtract-0.6.6/examples/simpletest/simpletest.c:37: undefined reference to
xtract_init_fft'come
please help to overcome this error
mansi
I have the following error when running the python test.py file:
Running libxtract Python bindings test...
Traceback (most recent call last):
File "test.py", line 12, in
a = xtract.floatArray(len)
AttributeError: 'module' object has no attribute 'floatArray'
I checked out xtract.py and there is no floatArray defined, so I'm wondering if the test file might be old. If so, can you push an update? Otherwise, indicate where I've gone wrong in the compilation process?
Thanks
To reproduce:
Extract the peak spectrum of a sine tone and window size of 1024
Expected:
A single peak at the frequency of the sine tone
Actual:
A single peak around 50Hz below the sine frequency (dependent on block size)
Hello,
compiling libxtract, I get the following error (m_pd.h in directory):
Making all in puredata
make[3]: Betrete Verzeichnis '/home/iber/Downloads/LibXtract-master/examples/puredata'
/bin/bash ../../libtool --tag=CC --mode=link gcc -DUNIX -Wall -Wimplicit -Wunused -DPD -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -shared -lxtract -L../../src/ -lm -o xtract.pd_linux xtract~.o
libtool: link: gcc -DUNIX -Wall -Wimplicit -Wunused -DPD -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -o .libs/xtract.pd_linux xtract~.o /home/iber/Downloads/LibXtract-master/src/.libs/libxtract.so -L../../src/ -lm
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crt1.o: In function _start': (.text+0x18): undefined reference to
main'
xtract~.o: In function xtract_tilde_show_help': xtract~.c:(.text+0x17): undefined reference to
post'
xtract~.c:(.text+0x3e): undefined reference to post' xtract~.o: In function
xtract_tilde_get_args':
xtract~.c:(.text+0x7a): undefined reference to getbytes' xtract~.c:(.text+0xa5): undefined reference to
atom_getfloat'
xtract~.c:(.text+0xcf): undefined reference to atom_getfloat' xtract~.o: In function
xtract_perform':
xtract~.c:(.text+0x18f): undefined reference to outlet_float' xtract~.c:(.text+0x1bc): undefined reference to
pd_error'
xtract~.o: In function xtract_perform_vector': xtract~.c:(.text+0x2c4): undefined reference to
pd_error'
xtract~.o: In function xtract_new': xtract~.c:(.text+0x328): undefined reference to
pd_new'
xtract~.c:(.text+0x360): undefined reference to getbytes' xtract~.c:(.text+0x36f): undefined reference to
getbytes'
xtract~.c:(.text+0x382): undefined reference to atom_getsymbol' xtract~.c:(.text+0x390): undefined reference to
gensym'
xtract~.c:(.text+0x3a0): undefined reference to atom_getsymbol' xtract~.c:(.text+0x3cb): undefined reference to
atom_getsymbol'
xtract~.c:(.text+0x3de): undefined reference to atom_getint' xtract~.c:(.text+0x42c): undefined reference to
gensym'
xtract~.c:(.text+0x4ae): undefined reference to post' xtract~.c:(.text+0x507): undefined reference to
gensym'
xtract~.c:(.text+0x515): undefined reference to gensym' xtract~.c:(.text+0x529): undefined reference to
inlet_new'
xtract~.c:(.text+0x538): undefined reference to s_signal' xtract~.c:(.text+0x540): undefined reference to
outlet_new'
xtract~.c:(.text+0x578): undefined reference to post' xtract~.c:(.text+0x58c): undefined reference to
s_float'
xtract~.c:(.text+0x594): undefined reference to outlet_new' xtract~.c:(.text+0x5a1): undefined reference to
atom_getint'
xtract~.c:(.text+0x5de): undefined reference to post' xtract~.c:(.text+0x5f5): undefined reference to
getbytes'
xtract~.c:(.text+0x61b): undefined reference to post' xtract~.c:(.text+0x652): undefined reference to
post'
xtract~.c:(.text+0x668): undefined reference to post' xtract~.c:(.text+0x696): undefined reference to
post'
xtract~.c:(.text+0x6a7): undefined reference to getbytes' xtract~.c:(.text+0x6e5): undefined reference to
getbytes'
xtract~.c:(.text+0x79b): undefined reference to post' xtract~.o: In function
xtract_tilde_free':
xtract~.c:(.text+0x82b): undefined reference to freebytes' xtract~.o: In function
xtract_dsp':
xtract~.c:(.text+0x876): undefined reference to dsp_add' xtract~.c:(.text+0x8ad): undefined reference to
dsp_add'
xtract~.o: In function xtract_tilde_setup': xtract~.c:(.text+0x8cb): undefined reference to
gensym'
xtract~.c:(.text+0x903): undefined reference to class_new' xtract~.c:(.text+0x914): undefined reference to
gensym'
xtract~.c:(.text+0x935): undefined reference to class_addmethod' xtract~.c:(.text+0x941): undefined reference to
gensym'
xtract~.c:(.text+0x96a): undefined reference to class_addmethod' xtract~.c:(.text+0x976): undefined reference to
gensym'
xtract~.c:(.text+0x99f): undefined reference to class_addmethod' xtract~.c:(.text+0x9b4): undefined reference to
class_domainsignalin'
xtract~.c:(.text+0x9c0): undefined reference to gensym' xtract~.c:(.text+0x9d1): undefined reference to
class_sethelpsymbol'
collect2: ld returned 1 exit status
make[3]: *** [xtract.pd_linux] Fehler 1
make[3]: Verlasse Verzeichnis '/home/iber/Downloads/LibXtract-master/examples/puredata'
make[2]: *** [all-recursive] Fehler 1
make[2]: Verlasse Verzeichnis '/home/iber/Downloads/LibXtract-master/examples'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/iber/Downloads/LibXtract-master'
make: *** [all] Fehler 2
Could you please help,
thank you,
Michael
I can't find configure
in the directory.
It looks like the Python bindings are always installed to /usr/local/lib rather than to the site-packages or dist-packages for the python that is being used. The build seems to find python in its path, but goes ahead and installs to /usr/local/lib.
Not sure how to fix this in this build system but I as able to copy the "/usr/local/lib/python2.7/dist-packages/libxtract" directory to where I needed it to get it running for the Python I was using.
It would probably be good to change this to use setuptools or distribute instead.
Hallo,
xtract seems quite interesting. I like the lightweight do one thing and do it well design. Can't wait to try it out, but I struggle compiling the xtract~ external.
I'm on OSX 10.9. xtract worked, but "cd examples/MSP/ && make" not.
Probably just wrong dependencies or parameters. Which OSX SDK and Max SDK did you use?
Or can I get a compiled Version somewhere?
I am trying to install LibXtract on my MacOSX, but it won't work.
First of all, when I configure everything, I get the following message:
Summary:
fft: no (not using fftw3, no fft functions)
simpletest example: yes
PD external: yes
Although I have installed fftw 3.3.3. I tried by adding --with-ooura, but it won't change to fft: yes. Then when I hit make, the following message appears:
Undefined symbols for architecture x86_64:
"_xtract_init_fft", referenced from:
_main in simpletest.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [simpletest] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Are these problems linked? Does the make not work because it cannot find the fftw3 or is it another problem?
Thanks for helping!
I'm trying to implement simpletest.c example in c++, the app throws malloc error, while running Guard Malloc the app breaks on vDSP_ctozD called by XTRACT_SPECTRUM, however despite it breaks, it output the data correctly(spectral bins, MFCCs).
@jamiebullock I am playing your awesome tool in Java but the result makes me confusing when extracting the result from the vector extractions, e.g. xtract_spectrum.
int len = 1000;
int retval = 0;
float sampleRate = 16000.0f;
float result[] = new float[len];
float arg[] = new float[3];
arg[0] = sampleRate / len;
arg[1] = 0;
arg[2] = 0;
float data[] = new float[len];
Random rand = new Random();
for (int i = 0; i < len; i++) {
data[i] = rand.nextFloat();
}
retval = xtract.xtract_spectrum(data, len, arg, result);
"result" has only one non-zero value at result[0]. Is it correct?
BTW, I met fatal errors when I was calling xtract_autocorrelation, xtract_amdf and xtract_asdf to extract a sequence, whose length is over 7.
Gammatone frequency cepstral coefficients (gfcc), exhibits superior noise robustness to mfcc.
It looks like a call to "/sbin/ldconfig" is missing when installing for Ubuntu 12.04. When I try to use the Python bindings I get an error that libxtract.so.0 is not found:
In [2]: import libxtract.xtract
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/sim/Downloads/LibXtract/swig/python/<ipython-input-2-df994e04a1f2> in <module>()
----> 1 import libxtract.xtract
/usr/local/lib/python2.7/dist-packages/libxtract/xtract.py in <module>()
24 fp.close()
25 return _mod
---> 26 _xtract = swig_import_helper()
27 del swig_import_helper
28 else:
/usr/local/lib/python2.7/dist-packages/libxtract/xtract.py in swig_import_helper()
20 if fp is not None:
21 try:
---> 22 _mod = imp.load_module('_xtract', fp, pathname, description)
23 finally:
24 fp.close()
ImportError: libxtract.so.0: cannot open shared object file: No such file or directory
I found that the library is installed to /usr/local/lib and this goes away when I run the following:
sudo /sbin/ldconfig
I get an error on Ubuntu 12.04 building "examples/simpletest".
$ ./configure --enable-simpletest
...
$ make
...
make[3]: Entering directory `/home/sim/Downloads/LibXtract/examples/simpletest'
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -MT simpletest.o -MD -MP -MF .deps/simpletest.Tpo -c -o simpletest.o simpletest.c
simpletest.c: In function ‘fill_wavetable’:
simpletest.c:81:17: warning: implicit declaration of function ‘arc4random_uniform’ [-Wimplicit-function-declaration]
mv -f .deps/simpletest.Tpo .deps/simpletest.Po
/bin/bash ../../libtool --tag=CC --mode=link gcc -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -lm -o simpletest simpletest.o ../../src/libxtract.la
libtool: link: gcc -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -o .libs/simpletest simpletest.o -lm ../../src/.libs/libxtract.so
simpletest.o: In function `fill_wavetable':
simpletest.c:(.text+0x148): undefined reference to `arc4random_uniform'
collect2: ld returned 1 exit status
make[3]: *** [simpletest] Error 1
make[3]: Leaving directory `/home/sim/Downloads/LibXtract/examples/simpletest'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sim/Downloads/LibXtract/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sim/Downloads/LibXtract'
make: *** [all] Error 2
It looks like Ubuntu has that in a library called 'libbsd'. But even if I make sure that is installed, it isn't linking to the library.
Hi Jamie,
Any chance you would implement node.js bindings :) ?
Hi,
there is a consistent issue with my app, after a while it usually crash, I didn't spend time digging the problem yet, but it seems to be related to the auto correlation fft.
Generally this function seems causing quite a few problems, sometimes it doesn't work, sometimes it stop all the other features to work properly like all the function results are 0.
did anybody notice these issues before?
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/hari/LibXtract/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make all-recursive
make[1]: Entering directory /home/hari/LibXtract' Making all in src make[2]: Entering directory
/home/hari/LibXtract/src'
make[2]: Nothing to be done for all'. make[2]: Leaving directory
/home/hari/LibXtract/src'
Making all in xtract
make[2]: Entering directory /home/hari/LibXtract/xtract' make[2]: Nothing to be done for
all'.
make[2]: Leaving directory /home/hari/LibXtract/xtract' Making all in examples make[2]: Entering directory
/home/hari/LibXtract/examples'
Making all in simpletest
make[3]: Entering directory /home/hari/LibXtract/examples/simpletest' /bin/bash ../../libtool --tag=CC --mode=link gcc -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -lm -o simpletest simpletest.o ../../src/libxtract.la libtool: link: gcc -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include -O3 -o .libs/simpletest simpletest.o -lm ../../src/.libs/libxtract.so simpletest.o: In function
fill_wavetable':
simpletest.c:(.text+0x58): undefined reference to arc4random_uniform' collect2: error: ld returned 1 exit status make[3]: *** [simpletest] Error 1 make[3]: Leaving directory
/home/hari/LibXtract/examples/simpletest'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /home/hari/LibXtract/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/home/hari/LibXtract'
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.