Coder Social home page Coder Social logo

jorensix / olaf Goto Github PK

View Code? Open in Web Editor NEW
316.0 316.0 33.0 5.72 MB

Olaf: Overly Lightweight Acoustic Fingerprinting is a portable acoustic fingerprinting system.

License: GNU Affero General Public License v3.0

Makefile 0.98% Ruby 7.14% C 85.78% HTML 0.64% Zig 0.37% Dockerfile 0.13% C++ 1.39% R 0.41% TeX 1.79% Python 1.38%
acoustic-fingerprinting audio-fingerprinting esp32 music-information-retrieval wasm

olaf's People

Contributors

danielskatz avatar jorensix avatar taf2 avatar toy avatar vagahbond 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  avatar  avatar  avatar

olaf's Issues

Automated test failures

I'm on an M1 Mac running Ventura. gcc is symlinked to clang on my system, which isn't unusual on macOS.

When I build the test binary using make test, and then run bin/olaf_tests, an assertion fails:

(array_size == 512), function olaf_max_filter, file olaf_max_filter_perceptual.c, line 43.

Further, when I run eval/olaf_functional_tests.rb I get the following output:

PASS: Test dataset check: If not found, download it first! call e.g. 'ruby eval/olaf_download_dataset.rb'
1/1 1051039.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/1051039.mp3'
1/1 1071559.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/1071559.mp3'
1/1 1075784.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/1075784.mp3'
1/1 11266.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/11266.mp3'
1/1 147199.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/147199.mp3'
1/1 173050.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/173050.mp3'
1/1 189211.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/189211.mp3'
1/1 297888.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/297888.mp3'
1/1 612409.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/612409.mp3'
1/1 852601.mp3 SKIP: already stored audio
PASS: Command : olaf store 'dataset/ref/852601.mp3'
FAIL: Expected 10 stored, was 11
FAIL: Expected 10 stored, was 11

Related to: openjournals/joss-reviews#5459

Missing file

Hi,

I'm trying to compile the web version but 'wasm/js/olaf_processor_edit.js' is missing.
And I'm getting this error in Chrome:
DOMException: Failed to construct 'AudioWorkletNode': AudioWorkletNode cannot be created: The node name 'olaf-processor' is not defined in AudioWorkletGlobalScope.

Can you please upload this file also to the repository ?

Thank you!

Typos in eval page

Related to: openjournals/joss-reviews#5459

Could you run a spell-checker on this page? There a few typos. For example:

The tests check __wether Olaf works__.The evaluation verifies __how well__ Olaf works. The benchmark checks __how fast__ Olaf works and how it deals with scalability and resources. There are a few evaluation and benchmarking scripts available for Olaf. This text describes each script

  • "whether"
  • missing space after first sentence

A script is provided to measure memory use while running a query. First a few tracks are added to the index, then memory use for a 20 second fragment is measured and

  • incomplete sentence

h2(#test). Testing Olaf - check __wether Olaf works__

  • "whether"

Segmentation fault on store action

Hi,

I have just installed Olaf in Debian Buster and I can't get it to work.
Whenever I try to add a reference track, either with
olaf store filename.mp3
or
olaf_c store filename.mp3

I get a Segmentation fault (core dumped).

Do you reckon what could be going on?

Thank you.

Success in adding track, but web build doesn't recognise track

Hi there! I am working on a proof of concept, and I have managed to correctly install Olaf and fingerprint a track. However, when I run the web build I can't get a successful response. I am running make web after adding the track and then running the server - are there any steps I am missing?

Additional: After testing olaf monitor test.mp3 it threw the following error:

query index,total queries, query name, match name, match id, match count (#), q to ref time delta (s), ref start (s), ref stop (s), query time (s) Traceback (most recent call last): 8: from /usr/local/bin/olaf:372:in `<main>' 7: from /usr/local/bin/olaf:372:in `each_with_index' 6: from /usr/local/bin/olaf:372:in `each' 5: from /usr/local/bin/olaf:373:in `block in <main>' 4: from /usr/local/bin/olaf:80:in `monitor' 3: from /usr/local/bin/olaf:180:in `with_converted_audio_part' 2: from /usr/local/bin/olaf:84:in `block in monitor' 1: from /usr/local/bin/olaf:84:in `each' /usr/local/bin/olaf:91:in `block (2 levels) in monitor': undefined local variable or method `filename' for main:Object (NameError)

Could this be related to the issue I am having in failing to recognise tracks or is this another issue?

Running on Windows

Can Olaf be compiled and run on windows OS? If yes kindle post compile instructions

changing audio fingerprint of a song

Tell me how to change a song sufficiently that the audio fingerprint changes enough to make the song pass filters looking for duplicate songs. I'm looking for advice that works for most stringent filters. Tell me what to do, code, program already available or algorithm. Absolutely anything that works is acceptable.

Audio not matching

Hello Joren!
First of all, I want to thank you for publishing this project on Github!

Have the problem that an audio snippet is not recognized.

olaf store store.mp3
olaf query external-stream.mp3

Side note, in my case the monitor command throws an error, maybe this is related.

olaf monitor external-stream.mp3
$ olaf monitor external-stream.mp3
1/1_0s external-stream.mp3 matches trimmed.mov q_to_ref_time_delta: 0.00, q_time: 5.44, score: 146, match_id: 779030374, ref_start: 0.29, ref_stop: 5.44
1/1_0s external-stream.mp3 Proccessed 471 fp's from 7.0s in 0.004s (1962 times realtime)
1/1_0s external-stream.mp3 Audio file 151390292 not found or unreadable.
1/1_7s external-stream.mp3 Proccessed 502 fp's from 7.0s in 0.004s (1969 times realtime)
1/1_7s external-stream.mp3 Audio file 151390292 not found or unreadable.
1/1_14s external-stream.mp3 Proccessed 515 fp's from 7.0s in 0.003s (2020 times realtime)
1/1_14s external-stream.mp3 Audio file 151390292 not found or unreadable.
Traceback (most recent call last):
	9: from /usr/local/bin/olaf:460:in `<main>'
	8: from /usr/local/bin/olaf:460:in `each_with_index'
	7: from /usr/local/bin/olaf:460:in `each'
	6: from /usr/local/bin/olaf:461:in `block in <main>'
	5: from /usr/local/bin/olaf:84:in `monitor'
	4: from /usr/local/bin/olaf:189:in `with_converted_audio_part'
	3: from /usr/local/bin/olaf:88:in `block in monitor'
	2: from /usr/local/bin/olaf:88:in `each'
	1: from /usr/local/bin/olaf:95:in `block (2 levels) in monitor'
/usr/local/bin/olaf:95:in `basename': no implicit conversion of nil into String (TypeError)

Maybe you can help me with that.

Greetings Fred
Archive.zip

Generating fingerprints for ESP32

Hi,

I am developing an application which communicates with external device and it should be able to perform diagnostics on this device according to sound made by it. I found your project today and I thought it fits ideally in my needs, however I have some serious problems with running it.

I am using ESP32 as my platform with I2S microphone (it is already working), so I wanted to build OLAF Mem version. It succeeded, but calling ./olaf_mem store sample.mp3 wav 666 generates following output:

Stored 0 fp's from 16.8s in 0.108s (156 times realtime)

I think that Ruby script is responsible for generating fingerprints, however I don't know how to use it correctly. Of course both ruby and ffmpeg are in my PATH.

Are you able to help me with generating fingerprints?

Clearer install

Related to openjournals/joss-reviews#5459

<pre>

You do it later on for the tests, but perhaps you could also give the full installation steps even if it's "obvious":

sudo apt-get install ffmpeg ruby
git clone https://github.com/JorenSix/Olaf
cd Olaf
make && make install

On a similar note, is it possible to make Olaf "apt-get install"-able? And such that dependencies are also installed. That would be nice for convenience.

Multithreaded queries problem

Hi, @JorenSix .

I tried to add multithreading and find out, that there is a problem with multithreading:

  • in unrestricted mode(new threads created as fast as it is possible) from 464 input files Olaf found only 26 in DB
  • with delay of 1-0.5 second there was a result as good as in serial mode(no threading at all)
  • with delay of 0.25 second or less results are degrading

Could you explain, is it 'by design' or is it a BUG also?

AltiVec code fails to compile on ppc

@JorenSix Could you please take a look? AltiVec code does not compile on ppc:

--->  Building olaf-devel
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_olaf-devel/olaf-devel/work/Olaf-4442e91b65d151211afc22a161c30fb07cf6ce3b" && /usr/bin/make -j6 -w compile 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_olaf-devel/olaf-devel/work/Olaf-4442e91b65d151211afc22a161c30fb07cf6ce3b'
/opt/local/bin/gcc-mp-13 -c src/pffft.c 					-W -Wall -std=gnu11 -pedantic -O2 #pfft needs M_PI and other constants not in the ANSI c standard
src/pffft.c: In function 'ld_ps1':
src/pffft.c:107:45: warning: implicit declaration of function 'vec_lde' [-Wimplicit-function-declaration]
  107 | inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,p); return vec_splat(vec_perm(v, v, vec_lvsl(0, p)), 0); }
      |                                             ^~~~~~~
src/pffft.c:107:45: error: incompatible types when initializing type 'v4sf' {aka '__vector(4) float'} using type 'int'
src/pffft.c:107:66: warning: implicit declaration of function 'vec_splat' [-Wimplicit-function-declaration]
  107 | inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,p); return vec_splat(vec_perm(v, v, vec_lvsl(0, p)), 0); }
      |                                                                  ^~~~~~~~~
src/pffft.c:107:76: warning: implicit declaration of function 'vec_perm' [-Wimplicit-function-declaration]
  107 | inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,p); return vec_splat(vec_perm(v, v, vec_lvsl(0, p)), 0); }
      |                                                                            ^~~~~~~~
src/pffft.c:107:91: warning: implicit declaration of function 'vec_lvsl' [-Wimplicit-function-declaration]
  107 | inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,p); return vec_splat(vec_perm(v, v, vec_lvsl(0, p)), 0); }
      |                                                                                           ^~~~~~~~
src/pffft.c:107:1: error: AltiVec argument passed to unprototyped function
  107 | inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,p); return vec_splat(vec_perm(v, v, vec_lvsl(0, p)), 0); }
      | ^~~~~~
src/pffft.c: In function 'validate_pffft_simd':
src/pffft.c:102:35: warning: implicit declaration of function 'vec_splat_u8' [-Wimplicit-function-declaration]
  102 | #  define VZERO() ((vector float) vec_splat_u8(0))
      |                                   ^~~~~~~~~~~~
src/pffft.c:221:25: note: in expansion of macro 'VZERO'
  221 |   t = a0; u = a1; t.v = VZERO();
      |                         ^~~~~
src/pffft.c:221:3: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  221 |   t = a0; u = a1; t.v = VZERO();
      |   ^
src/pffft.c:104:21: warning: implicit declaration of function 'vec_add' [-Wimplicit-function-declaration]
  104 | #  define VADD(a,b) vec_add(a,b)
      |                     ^~~~~~~
src/pffft.c:223:9: note: in expansion of macro 'VADD'
  223 |   t.v = VADD(a1.v, a2.v);
      |         ^~~~
src/pffft.c:223:3: error: AltiVec argument passed to unprototyped function
  223 |   t.v = VADD(a1.v, a2.v);
      |   ^
src/pffft.c:103:21: warning: implicit declaration of function 'vec_madd' [-Wimplicit-function-declaration]
  103 | #  define VMUL(a,b) vec_madd(a,b, VZERO())
      |                     ^~~~~~~~
src/pffft.c:225:9: note: in expansion of macro 'VMUL'
  225 |   t.v = VMUL(a1.v, a2.v);
      |         ^~~~
src/pffft.c:225:3: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  225 |   t.v = VMUL(a1.v, a2.v);
      |   ^
src/pffft.c:225:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:227:3: error: AltiVec argument passed to unprototyped function
  227 |   t.v = VMADD(a1.v, a2.v,a0.v);
      |   ^
src/pffft.c:109:60: warning: implicit declaration of function 'vec_mergeh' [-Wimplicit-function-declaration]
  109 | #  define INTERLEAVE2(in1, in2, out1, out2) { v4sf tmp__ = vec_mergeh(in1, in2); out2 = vec_mergel(in1, in2); out1 = tmp__; }
      |                                                            ^~~~~~~~~~
src/pffft.c:230:3: note: in expansion of macro 'INTERLEAVE2'
  230 |   INTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~
src/pffft.c:230:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:109:89: warning: implicit declaration of function 'vec_mergel' [-Wimplicit-function-declaration]
  109 | #  define INTERLEAVE2(in1, in2, out1, out2) { v4sf tmp__ = vec_mergeh(in1, in2); out2 = vec_mergel(in1, in2); out1 = tmp__; }
      |                                                                                         ^~~~~~~~~~
src/pffft.c:230:3: note: in expansion of macro 'INTERLEAVE2'
  230 |   INTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~
src/pffft.c:230:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:111:60: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                            ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:62: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                              ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:66: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                  ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:68: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                    ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:70: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                      ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:73: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                         ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:76: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                            ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:79: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                               ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:82: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                  ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:85: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                     ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:88: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                        ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:91: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                           ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:94: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                              ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:111:97: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  111 |     vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
      |                                                                                                 ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:233:3: error: cannot convert a value of type 'int' to vector type '__vector(16) unsigned char' which has different size
src/pffft.c:112:60: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                            ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:62: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                              ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:66: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                  ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:69: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                     ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:72: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                        ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:75: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                           ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:78: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                              ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:81: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                 ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:84: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                    ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:87: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                       ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:90: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                          ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:93: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                             ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:96: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                                ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:112:99: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  112 |     vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
      |                                                                                                   ^
src/pffft.c:233:3: note: in expansion of macro 'UNINTERLEAVE2'
  233 |   UNINTERLEAVE2(a1.v,a2.v,t.v,u.v);
      |   ^~~~~~~~~~~~~
src/pffft.c:233:3: error: cannot convert a value of type 'int' to vector type '__vector(16) unsigned char' which has different size
src/pffft.c:233:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:233:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:125:63: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                               ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:66: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                  ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:69: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                     ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:72: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                        ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:75: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                           ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:78: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                              ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:81: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                 ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:84: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                    ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:86: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                      ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:88: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                        ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:91: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                           ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:94: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                              ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:97: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                                 ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:100: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                                    ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:125:103: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  125 | #  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
      |                                                                                                       ^
src/pffft.c:240:9: note: in expansion of macro 'VSWAPHL'
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |         ^~~~~~~
src/pffft.c:240:3: error: cannot convert a value of type 'int' to vector type '__vector(16) unsigned char' which has different size
  240 |   t.v = VSWAPHL(a1.v, a2.v);
      |   ^
src/pffft.c:240:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
  243 |   VTRANSPOSE4(a0.v, a1.v, a2.v, a3.v);
      |   ^~~~~~~~~~~
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c:243:3: error: AltiVec argument passed to unprototyped function
src/pffft.c: In function 'passf2_ps':
src/pffft.c:275:7: error: AltiVec argument passed to unprototyped function
  275 |       ch[0]         = VADD(cc[0], cc[ido+0]);
      |       ^~
src/pffft.c:106:21: warning: implicit declaration of function 'vec_sub' [-Wimplicit-function-declaration]
  106 | #  define VSUB(a,b) vec_sub(a,b)
      |                     ^~~~~~~
src/pffft.c:276:23: note: in expansion of macro 'VSUB'
  276 |       ch[l1ido]     = VSUB(cc[0], cc[ido+0]);
      |                       ^~~~
src/pffft.c:276:7: error: AltiVec argument passed to unprototyped function
  276 |       ch[l1ido]     = VSUB(cc[0], cc[ido+0]);
      |       ^~
src/pffft.c:277:7: error: AltiVec argument passed to unprototyped function
  277 |       ch[1]         = VADD(cc[1], cc[ido+1]);
      |       ^~
src/pffft.c:278:7: error: AltiVec argument passed to unprototyped function
  278 |       ch[l1ido + 1] = VSUB(cc[1], cc[ido+1]);
      |       ^~
src/pffft.c:283:9: error: AltiVec argument passed to unprototyped function
  283 |         v4sf tr2 = VSUB(cc[i+0], cc[i+ido+0]);
      |         ^~~~
src/pffft.c:284:9: error: AltiVec argument passed to unprototyped function
  284 |         v4sf ti2 = VSUB(cc[i+1], cc[i+ido+1]);
      |         ^~~~
src/pffft.c:285:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  285 |         v4sf wr = LD_PS1(wa1[i]), wi = VMUL(LD_PS1(fsign), LD_PS1(wa1[i+1]));
      |         ^~~~
src/pffft.c:285:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:286:9: error: AltiVec argument passed to unprototyped function
  286 |         ch[i]   = VADD(cc[i+0], cc[i+ido+0]);
      |         ^~
src/pffft.c:287:9: error: AltiVec argument passed to unprototyped function
  287 |         ch[i+1] = VADD(cc[i+1], cc[i+ido+1]);
      |         ^~
src/pffft.c:288:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  288 |         VCPLXMUL(tr2, ti2, wr, wi);
      |         ^~~~~~~~
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:288:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:288:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:288:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:288:9: error: AltiVec argument passed to unprototyped function
src/pffft.c: In function 'passf3_ps':
src/pffft.c:310:7: error: AltiVec argument passed to unprototyped function
  310 |       tr2 = VADD(cc[i+ido], cc[i+2*ido]);
      |       ^~~
src/pffft.c:311:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  311 |       cr2 = VADD(cc[i], SVMUL(taur,tr2));
      |       ^~~
src/pffft.c:311:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:311:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:312:7: error: AltiVec argument passed to unprototyped function
  312 |       ch[i]    = VADD(cc[i], tr2);
      |       ^~
src/pffft.c:313:7: error: AltiVec argument passed to unprototyped function
  313 |       ti2 = VADD(cc[i+ido+1], cc[i+2*ido+1]);
      |       ^~~
src/pffft.c:314:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  314 |       ci2 = VADD(cc[i    +1], SVMUL(taur,ti2));
      |       ^~~
src/pffft.c:314:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:314:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:315:7: error: AltiVec argument passed to unprototyped function
  315 |       ch[i+1]  = VADD(cc[i+1], ti2);
      |       ^~
src/pffft.c:316:7: error: AltiVec argument passed to unprototyped function
  316 |       cr3 = SVMUL(taui, VSUB(cc[i+ido], cc[i+2*ido]));
      |       ^~~
src/pffft.c:316:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:316:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:317:7: error: AltiVec argument passed to unprototyped function
  317 |       ci3 = SVMUL(taui, VSUB(cc[i+ido+1], cc[i+2*ido+1]));
      |       ^~~
src/pffft.c:317:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:317:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:318:7: error: AltiVec argument passed to unprototyped function
  318 |       dr2 = VSUB(cr2, ci3);
      |       ^~~
src/pffft.c:319:7: error: AltiVec argument passed to unprototyped function
  319 |       dr3 = VADD(cr2, ci3);
      |       ^~~
src/pffft.c:320:7: error: AltiVec argument passed to unprototyped function
  320 |       di2 = VADD(ci2, cr3);
      |       ^~~
src/pffft.c:321:7: error: AltiVec argument passed to unprototyped function
  321 |       di3 = VSUB(ci2, cr3);
      |       ^~~
src/pffft.c:323:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  323 |       VCPLXMUL(dr2, di2, LD_PS1(wr1), LD_PS1(wi1));
      |       ^~~~~~~~
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:323:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:323:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:323:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:323:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  326 |       VCPLXMUL(dr3, di3, LD_PS1(wr2), LD_PS1(wi2));
      |       ^~~~~~~~
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:326:7: error: AltiVec argument passed to unprototyped function
src/pffft.c: In function 'passf4_ps':
src/pffft.c:342:7: error: AltiVec argument passed to unprototyped function
  342 |       tr1 = VSUB(cc[0], cc[2*ido + 0]);
      |       ^~~
src/pffft.c:343:7: error: AltiVec argument passed to unprototyped function
  343 |       tr2 = VADD(cc[0], cc[2*ido + 0]);
      |       ^~~
src/pffft.c:344:7: error: AltiVec argument passed to unprototyped function
  344 |       ti1 = VSUB(cc[1], cc[2*ido + 1]);
      |       ^~~
src/pffft.c:345:7: error: AltiVec argument passed to unprototyped function
  345 |       ti2 = VADD(cc[1], cc[2*ido + 1]);
      |       ^~~
src/pffft.c:346:7: error: AltiVec argument passed to unprototyped function
  346 |       ti4 = VMUL(VSUB(cc[1*ido + 0], cc[3*ido + 0]), LD_PS1(fsign));
      |       ^~~
src/pffft.c:346:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:346:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:347:7: error: AltiVec argument passed to unprototyped function
  347 |       tr4 = VMUL(VSUB(cc[3*ido + 1], cc[1*ido + 1]), LD_PS1(fsign));
      |       ^~~
src/pffft.c:347:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:347:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:348:7: error: AltiVec argument passed to unprototyped function
  348 |       tr3 = VADD(cc[ido + 0], cc[3*ido + 0]);
      |       ^~~
src/pffft.c:349:7: error: AltiVec argument passed to unprototyped function
  349 |       ti3 = VADD(cc[ido + 1], cc[3*ido + 1]);
      |       ^~~
src/pffft.c:351:7: error: AltiVec argument passed to unprototyped function
  351 |       ch[0*l1ido + 0] = VADD(tr2, tr3);
      |       ^~
src/pffft.c:352:7: error: AltiVec argument passed to unprototyped function
  352 |       ch[0*l1ido + 1] = VADD(ti2, ti3);
      |       ^~
src/pffft.c:353:7: error: AltiVec argument passed to unprototyped function
  353 |       ch[1*l1ido + 0] = VADD(tr1, tr4);
      |       ^~
src/pffft.c:354:7: error: AltiVec argument passed to unprototyped function
  354 |       ch[1*l1ido + 1] = VADD(ti1, ti4);
      |       ^~
src/pffft.c:355:7: error: AltiVec argument passed to unprototyped function
  355 |       ch[2*l1ido + 0] = VSUB(tr2, tr3);
      |       ^~
src/pffft.c:356:7: error: AltiVec argument passed to unprototyped function
  356 |       ch[2*l1ido + 1] = VSUB(ti2, ti3);
      |       ^~
src/pffft.c:357:7: error: AltiVec argument passed to unprototyped function
  357 |       ch[3*l1ido + 0] = VSUB(tr1, tr4);
      |       ^~
src/pffft.c:358:7: error: AltiVec argument passed to unprototyped function
  358 |       ch[3*l1ido + 1] = VSUB(ti1, ti4);
      |       ^~
src/pffft.c:364:9: error: AltiVec argument passed to unprototyped function
  364 |         tr1 = VSUB(cc[i + 0], cc[i + 2*ido + 0]);
      |         ^~~
src/pffft.c:365:9: error: AltiVec argument passed to unprototyped function
  365 |         tr2 = VADD(cc[i + 0], cc[i + 2*ido + 0]);
      |         ^~~
src/pffft.c:366:9: error: AltiVec argument passed to unprototyped function
  366 |         ti1 = VSUB(cc[i + 1], cc[i + 2*ido + 1]);
      |         ^~~
src/pffft.c:367:9: error: AltiVec argument passed to unprototyped function
  367 |         ti2 = VADD(cc[i + 1], cc[i + 2*ido + 1]);
      |         ^~~
src/pffft.c:368:9: error: AltiVec argument passed to unprototyped function
  368 |         tr4 = VMUL(VSUB(cc[i + 3*ido + 1], cc[i + 1*ido + 1]), LD_PS1(fsign));
      |         ^~~
src/pffft.c:368:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:368:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:369:9: error: AltiVec argument passed to unprototyped function
  369 |         ti4 = VMUL(VSUB(cc[i + 1*ido + 0], cc[i + 3*ido + 0]), LD_PS1(fsign));
      |         ^~~
src/pffft.c:369:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:369:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:370:9: error: AltiVec argument passed to unprototyped function
  370 |         tr3 = VADD(cc[i + ido + 0], cc[i + 3*ido + 0]);
      |         ^~~
src/pffft.c:371:9: error: AltiVec argument passed to unprototyped function
  371 |         ti3 = VADD(cc[i + ido + 1], cc[i + 3*ido + 1]);
      |         ^~~
src/pffft.c:373:9: error: AltiVec argument passed to unprototyped function
  373 |         ch[i] = VADD(tr2, tr3);
      |         ^~
src/pffft.c:374:9: error: AltiVec argument passed to unprototyped function
  374 |         cr3    = VSUB(tr2, tr3);
      |         ^~~
src/pffft.c:375:9: error: AltiVec argument passed to unprototyped function
  375 |         ch[i + 1] = VADD(ti2, ti3);
      |         ^~
src/pffft.c:376:9: error: AltiVec argument passed to unprototyped function
  376 |         ci3 = VSUB(ti2, ti3);
      |         ^~~
src/pffft.c:378:9: error: AltiVec argument passed to unprototyped function
  378 |         cr2 = VADD(tr1, tr4);
      |         ^~~
src/pffft.c:379:9: error: AltiVec argument passed to unprototyped function
  379 |         cr4 = VSUB(tr1, tr4);
      |         ^~~
src/pffft.c:380:9: error: AltiVec argument passed to unprototyped function
  380 |         ci2 = VADD(ti1, ti4);
      |         ^~~
src/pffft.c:381:9: error: AltiVec argument passed to unprototyped function
  381 |         ci4 = VSUB(ti1, ti4);
      |         ^~~
src/pffft.c:383:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  383 |         VCPLXMUL(cr2, ci2, LD_PS1(wr1), LD_PS1(wi1));
      |         ^~~~~~~~
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:383:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:383:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:383:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:383:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  388 |         VCPLXMUL(cr3, ci3, LD_PS1(wr2), LD_PS1(wi2));
      |         ^~~~~~~~
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:388:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  393 |         VCPLXMUL(cr4, ci4, LD_PS1(wr3), LD_PS1(wi3));
      |         ^~~~~~~~
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c:393:9: error: AltiVec argument passed to unprototyped function
src/pffft.c: In function 'passf5_ps':
src/pffft.c:425:7: error: AltiVec argument passed to unprototyped function
  425 |       ti5 = VSUB(cc_ref(i  , 2), cc_ref(i  , 5));
      |       ^~~
src/pffft.c:426:7: error: AltiVec argument passed to unprototyped function
  426 |       ti2 = VADD(cc_ref(i  , 2), cc_ref(i  , 5));
      |       ^~~
src/pffft.c:427:7: error: AltiVec argument passed to unprototyped function
  427 |       ti4 = VSUB(cc_ref(i  , 3), cc_ref(i  , 4));
      |       ^~~
src/pffft.c:428:7: error: AltiVec argument passed to unprototyped function
  428 |       ti3 = VADD(cc_ref(i  , 3), cc_ref(i  , 4));
      |       ^~~
src/pffft.c:429:7: error: AltiVec argument passed to unprototyped function
  429 |       tr5 = VSUB(cc_ref(i-1, 2), cc_ref(i-1, 5));
      |       ^~~
src/pffft.c:430:7: error: AltiVec argument passed to unprototyped function
  430 |       tr2 = VADD(cc_ref(i-1, 2), cc_ref(i-1, 5));
      |       ^~~
src/pffft.c:431:7: error: AltiVec argument passed to unprototyped function
  431 |       tr4 = VSUB(cc_ref(i-1, 3), cc_ref(i-1, 4));
      |       ^~~
src/pffft.c:432:7: error: AltiVec argument passed to unprototyped function
  432 |       tr3 = VADD(cc_ref(i-1, 3), cc_ref(i-1, 4));
      |       ^~~
src/pffft.c:433:7: error: AltiVec argument passed to unprototyped function
  433 |       ch_ref(i-1, 1) = VADD(cc_ref(i-1, 1), VADD(tr2, tr3));
      |       ^~~~~~
src/pffft.c:433:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:434:7: error: AltiVec argument passed to unprototyped function
  434 |       ch_ref(i  , 1) = VADD(cc_ref(i  , 1), VADD(ti2, ti3));
      |       ^~~~~~
src/pffft.c:434:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:435:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  435 |       cr2 = VADD(cc_ref(i-1, 1), VADD(SVMUL(tr11, tr2),SVMUL(tr12, tr3)));
      |       ^~~
src/pffft.c:435:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:435:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:435:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:435:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:436:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  436 |       ci2 = VADD(cc_ref(i  , 1), VADD(SVMUL(tr11, ti2),SVMUL(tr12, ti3)));
      |       ^~~
src/pffft.c:436:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:436:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:436:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:436:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:437:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  437 |       cr3 = VADD(cc_ref(i-1, 1), VADD(SVMUL(tr12, tr2),SVMUL(tr11, tr3)));
      |       ^~~
src/pffft.c:437:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:437:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:437:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:437:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:438:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  438 |       ci3 = VADD(cc_ref(i  , 1), VADD(SVMUL(tr12, ti2),SVMUL(tr11, ti3)));
      |       ^~~
src/pffft.c:438:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:438:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:438:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:438:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:439:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  439 |       cr5 = VADD(SVMUL(ti11, tr5), SVMUL(ti12, tr4));
      |       ^~~
src/pffft.c:439:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:439:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
src/pffft.c:439:7: error: AltiVec argument passed to unprototyped function
src/pffft.c:440:7: error: cannot convert a value of type 'int' to vector type '__vector(4) float' which has different size
  440 |       ci5 = VADD(SVMUL(ti11, ti5), SVMUL(ti12, ti4));
      |       ^~~
. . .

Does it require VSX or some other issue causes the error?

(If AltiVec code cannot be fixed, perhaps an easy way would be to disable it, falling back to scalar mode.)

Understanding the Output

For testing I have "stored" an mp3 (compilation.mp3) made from several tracks against which I have run 3 queries.
Query 1 = .mp3 of one of the tracks (made from the original .flac used to make the compilation) so would expect a single match but got the following:
1/3 TestAll54sec.mp3 match id, match count (#), q to ref time delta (s), ref start (s), ref stop (s), query time (s)
1, 3, TestAll54sec.mp3, 2146557281, /home/apb/Olaf-master/Compilation.mp3, 55, -2594.35, 2637.10, 2648.18, 53.83
1, 3, TestAll54sec.mp3, 2146557281, /home/apb/Olaf-master/Compilation.mp3, 6, -2594.34, 2643.14, 2643.14, 48.80

Query 2 = a 15sec clip from the same track as query 1
2, 3, Test15sec.mp3, 2146557281, /home/apb/Olaf-master/Compilation.mp3, 332, -2608.95, 2609.14, 2623.73, 14.78

Query 3 = the original .flac file used to make the .mp3 for query 1
3, 3, TestAll54secFLAC.flac, 2146557281, /home/apb/Olaf-master/Compilation.mp3, 84, -2594.35, 2637.10, 2648.03, 53.68

Questions:

  1. What do match count (#), q to ref time delta (s), ref start (s), ref stop (s), query time (s) mean? other than -2594.35 which is the negative of the start time of the track in the compilation and 53.83 which seems to match the track length I'm not sure how to interpret the other numbers.
  2. Any thoughts as to why query 1 would return 2 matches?
  3. The only difference between this query and query 1 was the file used was the original .flac not an. mp3 made from the same file so shouldn't the results be the same?

Event Point Extractor

src/olaf_ep_extractor.c:152

void rotate(Olaf_EP_Extractor * ep_extractor){

ep_extractor->maxes[i-1]=ep_extractor->maxes[i];
ep_extractor->mags[i-1]=ep_extractor->mags[i];

Is there a pointer to array row assignment or you meaned array row values assigment?

Units tests "error"?

Related to openjournals/joss-reviews#5459

I think it's normal, but when running the unit tests on Linux (Ubuntu 22.04 LTS) and macOS (Catalina):

git clone https://github.com/JorenSix/Olaf
cd Olaf
make && make install
ruby eval/olaf_functional_tests.rb

I get the following "error" at the very beginning:

Database Error: No such file or directory

But I guess this is normal as there is a "PASS" just after to make sure the Database is empty?

Otherwise all tests pass 👍

Missing/limited instructions for running tests

I think it would be helpful if users/contributors had instructions for running the automated tests locally when possible. The README makes reference to the scripts in the eval/ directory, but it's not clear how to use them, when contributors should execute certain tests, and so on.

Similarly, there appears to be a test target in the Makefile that claims to "build and test" olaf, but no test is actually executed. If this is intended to be part of the testing suite, it'd be a good idea to include that in the README as well.

Related to: openjournals/joss-reviews#5459

OLAF query process is very slow

I have stored 52k files of a total duration of 10837815(s), I processed a one-hour file, which takes more than 24 hours, and is still in process and not showing any output. how I can make it fast?

Mention comparison to Panako

Related to: openjournals/joss-reviews#5459

Olaf/paper.md

Line 40 in 0173ff1

Alternative systems with available implementations are by @neuralfp, Panako by @six2022panako, audfprint by @ellis2014labrosafp, PeakFP by @cortes2022baf, ChromaPrint by @chromaprint, SpectroMap by @spectromap and Dejavu by @dejavu. All have a different focus and trade-offs but none offer the portability to target browsers or have the low memory usage to target microcontrollers.

  • could be interesting to mention and link to the Panako comparison you did

How to optimize config for a huge movie collection track ?

I rewrite the ruby layer to request only the C code, I use the default (stock) config to store cached acoustic fingerprint to a custom directory with a php CLI only script (only exec() line can interest you) :

(TMP operation on tmpfs RAM)

  foreach($audiocodecs as $i => $audiocodec) {
   $acoustic = "$ACOUSTICDIR/$videobase.$filesize.$i.csv.gz";
   if(file_exists($acoustic))
    continue;

   echo "$videofile\n";
   exec("ffmpeg -loglevel quiet -i \"$videofile\" -map 0:a:$i -ac 1 -ar 16000 -f f32le -acodec pcm_f32le \"$TMPRAW\"");

   echo "$acoustic\n";
   exec("Olaf/bin/olaf_c print \"$TMPRAW\" \"$videofile\" | gzip > \"$TMPGZ\" && mv \"$TMPGZ\" \"$acoustic\"", $output);

   unlink($TMPRAW);
  }

And to build the B+ tree I use a loop to load all ~1h40/2h (average movie duration) audio tracks :

  foreach($audiocodecs as $i => $audiocodec) {
   $acoustic = "$ACOUSTICDIR/$videobase.$filesize.$i.csv.gz";
   if(!file_exists($acoustic))
    continue;

   echo "$videofile\n";
   exec("gunzip -c \"$acoustic\"", $output);
   $content = "";
   foreach($output as $line)
    $content .= "1/1,$videobase.$i,$line\n";
   file_put_contents($TMPCSV, $content);
   echo "$acoustic\n";
   exec("Olaf/bin/olaf_c store_cached \"$TMPCSV\"");
  }

I can generate all my audio track fingerprint from movies, all gz are lightweight, but integration into B+ tree part is too slow and db become too huge. even on my i9 64GB DDR5 / PCIE SSD machine :(

How you can store 340 days of audio (around 800GB of mp3s) inside a 15GB database ? mine grow way faster than this with your default config https://github.com/JorenSix/Olaf/blob/master/src/olaf_config.c .... and I have about 4000 days (10 years !) of sound to index !!!!! game over lol But with an estimation based on your result, this must enter inside 150GB database, good for me, but this is not the case (I grow rapidly over multiples terabytes and show as a snail to rebuild the B+ tree from all lightweight fingerprints.csv.gz)

Understanding the Output from ESP32 Example

Im currently trying to run the ESP32 example.

Unfortunately im struggling to understand the Output. It does look like its not working properly but I dont know what the Problem is.

Here is the Output from the Arduino IDE:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
[OLAF] Free memory before init: 273124 bytes
No home directory found, will use './db' as db folderMem DB for '852601.wav', 193.761s duration, 13207 fingerprints, 666 identifier
[OLAF] Free after init: 150444 bytes
[OLAF] Initialized with 32091 audio samples. Sample sample: 0.036510
Event point index: 0 
[OLAF] processed audio block index: 0
Event point index: 0 
[OLAF] processed audio block index: 1
Event point index: 0 
[OLAF] processed audio block index: 2
Event point index: 0 
[OLAF] processed audio block index: 3
Event point index: 0 
[OLAF] processed audio block index: 4
Event point index: 0 
[OLAF] processed audio block index: 5
Event point index: 0 
[OLAF] processed audio block index: 6
Event point index: 0 
[OLAF] processed audio block index: 7
Event point index: 0 
[OLAF] processed audio block index: 8
Event point index: 0 
[OLAF] processed audio block index: 9
Event point index: 0 
[OLAF] processed audio block index: 10
Event point index: 0 
[OLAF] processed audio block index: 11
Event point index: 0 
[OLAF] processed audio block index: 12
Event point index: 0 
...

...
[OLAF] processed audio block index: 106
Event point index: 29 
[OLAF] processed audio block index: 107
Event point index: 30 
[OLAF] processed audio block index: 108
Event point index: 30 
[OLAF] processed audio block index: 109
Event point index: 31 
FP index: 6 
0, 0.00, 0.00, , 0, 0.00, 0.00
[OLAF] processed audio block index: 110
Event point index: 23 
[OLAF] processed audio block index: 111

Question: What is the minimun audio duration that Olaf can identify?

I saw that Fragmented by default use 5 seconds, I'll like to know if OLAF can detect different version of audio, with just 2 or 3 seconds of different between them?

We have some ads that are 20 second long, but inside only 3 seconds or less change, that is common case into retails that has different products ads where they use the same sound and speech just changing Product Brand or name.

Some way to tune, fragmented to can improve the version detection?

thanks!

undefined local variable or method `filename' when using monitor command

Olaf/olaf.rb

Line 91 in 0b08dd9

puts "#{index}, #{length}_#{start}s, #{File.basename audio_filename}, #{File.basename filename}, #{line}\n"

I get an error when I try to use the monitor command (maybe it should be an audio_filename instead of filename)

/tmp/Olaf # olaf monitor input.mp3
/usr/local/bin/olaf:91:in `block (2 levels) in monitor': undefined local variable or method `filename' for main:Object (NameError)
	from /usr/local/bin/olaf:84:in `each'
	from /usr/local/bin/olaf:84:in `block in monitor'
	from /usr/local/bin/olaf:180:in `with_converted_audio_part'
	from /usr/local/bin/olaf:80:in `monitor'
	from /usr/local/bin/olaf:373:in `block in <main>'
	from /usr/local/bin/olaf:372:in `each'
	from /usr/local/bin/olaf:372:in `each_with_index'
	from /usr/local/bin/olaf:372:in `<main>'

Formatting

Related to openjournals/joss-reviews#5459

With respect to other audio search systems, Olaf stands out for three reasons. Olaf runs on embedded devices. Olaf is fast on traditional computers. Olaf runs in the browsers.

Perhaps you can write out the three reasons as a list so that it stands out?

Possible BUG: There is no boundaies control in olaf_fp_extractor.c

Hi, @JorenSix

There is no boundaries control for fp_extractor->fingerprints.fingerprints.
So, [fp_extractor->fingerprints.fingerprintIndex can be incremented and go out of initial allocated for fp_extractor->fingerprints.fingerprints memmory block. I causes memory corruption in other modules and unpredictable behaivior.
I fixed this with additional condition in for loops:
for(int k = j+1; k < eventPoints->eventPointIndex && fp_extractor->fingerprints.fingerprintIndex < fp_extractor->config->maxFingerprints; k++){
and
for(int j = i+1; j < eventPoints->eventPointIndex && fp_extractor->fingerprints.fingerprintIndex < fp_extractor->config->maxFingerprints; j++){

But I do not know how would this affect fingerprinting algotithmus.

Small typos in README

Related to openjournals/joss-reviews#5459

The tests check __wether Olaf works__.The evaluation verifies __how well__ Olaf works. The benchmark checks __how fast__ Olaf works and how it deals with scalability.

  • "whether"
  • "...works. The..."

Zig allso supports WebAssembly as a target platform as an alterative to Emscripten. The @zig.build@ file includes a conditional to build the memory db for WASM. To get a WASM binary call the following:

  • "also"

Less interesting are the unit tests, these are mainly of interest for developing Olaf. The unit test can be compiled with `make test` and ran with `./bin/olaf_tests`.

  • fix code formatting

The audio_item can be:

  • add code formatting here and fix formatting in the list below

To query audio comming from the microphone there is the @olaf microphone@ command. It uses ffmpeg to access the default microphone. See "the ffmpeg input devices docs for your platform:" http://www.ffmpeg.org/ffmpeg-devices.html#Input-Devices

  • "coming"

Question: JAVA and C FP extraction difference

Hi, @JorenSix .

I tryed to compare JAVA and C FP algorithmus ans found out aparts of code in C version:

    uint64_t m1LargerThanm2 = m1 > m2 ? 1 : 0;
    uint64_t m2LargerThanm3 = m2 > m3 ? 1 : 0;
    uint64_t m3LargerThanm1 = m3 > m1 ? 1 : 0;

    m1LargerThanm2 = 0;
    m2LargerThanm3 = 0;
    m3LargerThanm1 = 0;

So in C version mXLargerThenmY is zeroed, but in JAVA it's not. Why? A BUG or a feature?

Missing square brackets around references.

Related to: openjournals/joss-reviews#5459

Olaf/paper.md

Line 34 in 0173ff1

@six2018dupapps and @six2023duplicates describe the applications of acoustic fingerprints for digital music archive management. These range from meta-data quality verification - through the identification of duplicates - to merging archives with potential duplicate material. A less straightforward application of Olaf is audio-to-audio alignment and synchronization [@six2015synchronizing;@six2017framework]. In that case the matching fingerprints are used to align e.g. multiple video recordings of the same event by aligning the audio attached to each video.

Olaf/paper.md

Line 40 in 0173ff1

Alternative systems with available implementations are by @neuralfp, Panako by @six2022panako, audfprint by @ellis2014labrosafp, PeakFP by @cortes2022baf, ChromaPrint by @chromaprint, SpectroMap by @spectromap and Dejavu by @dejavu. All have a different focus and trade-offs but none offer the portability to target browsers or have the low memory usage to target microcontrollers.

cannot compile `olaf_mem`

Trying to run the example to generate header.h file, but i cannot compile olaf_mem

make mem in WSL returns:

make mem

gcc -c src/pffft.c                                       -Dmem -W -Wall -std=gnu11 -pedantic -O2 #pfft needs M_PI and other constants not in the ANSI c standard
gcc -c src/hash-table.c                  -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/queue.c                               -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_deque.c                          -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_max_filter_perceptual_van_herk.c  -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf.c                                        -Dmem -W -Wall -std=gnu11 -pedantic -O2
gcc -c src/olaf_db_mem.c                         -Dmem -W -Wall -std=c11 -pedantic -O2
src/olaf_db_mem.c: In function ‘olaf_db_find’:
src/olaf_db_mem.c:112:42: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  112 |                 for(size_t i = index ; i >= 0  ;i--){
      |                                          ^~
gcc -c src/olaf_fp_db_writer_mem.c       -Dmem -W -Wall -std=c11 -pedantic -O2
src/olaf_fp_db_writer_mem.c: In function ‘olaf_fp_db_writer_destroy’:
src/olaf_fp_db_writer_mem.c:93:36: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   93 |                         printf("%llu,\n",db_writer->hashes[i]);
      |                                 ~~~^     ~~~~~~~~~~~~~~~~~~~~
      |                                    |                      |
      |                                    long long unsigned int uint64_t {aka long unsigned int}
      |                                 %lu
gcc -c src/olaf_fp_file_writer.c         -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_fp_db_writer_cache.c -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_runner.c                         -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_stream_processor.c       -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_ep_extractor.c           -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_fp_extractor.c           -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_reader_stream.c          -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_fp_matcher.c             -Dmem -W -Wall -std=c11 -pedantic -O2
gcc -c src/olaf_config.c                         -Dmem -W -Wall -std=c11 -pedantic -O2
mkdir -p bin
gcc -o bin/olaf_mem *.o                         -lc -lm -ffast-math
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_new':
olaf_db_mem.c:(.text+0x0): multiple definition of `olaf_db_new'; olaf_db.o:olaf_db.c:(.text+0x50): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_store':
olaf_db_mem.c:(.text+0x70): multiple definition of `olaf_db_store'; olaf_db.o:olaf_db.c:(.text+0x7f0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_find':
olaf_db_mem.c:(.text+0xc0): multiple definition of `olaf_db_find'; olaf_db.o:olaf_db.c:(.text+0x8e0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_find_single':
olaf_db_mem.c:(.text+0x2b0): multiple definition of `olaf_db_find_single'; olaf_db.o:olaf_db.c:(.text+0xa50): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_destroy':
olaf_db_mem.c:(.text+0x2f0): multiple definition of `olaf_db_destroy'; olaf_db.o:olaf_db.c:(.text+0xe00): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_stats':
olaf_db_mem.c:(.text+0x300): multiple definition of `olaf_db_stats'; olaf_db.o:olaf_db.c:(.text+0xcc0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_string_hash':
olaf_db_mem.c:(.text+0x320): multiple definition of `olaf_db_string_hash'; olaf_db.o:olaf_db.c:(.text+0x1b0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_store_meta_data':
olaf_db_mem.c:(.text+0x330): multiple definition of `olaf_db_store_meta_data'; olaf_db.o:olaf_db.c:(.text+0x2f0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_find_meta_data':
olaf_db_mem.c:(.text+0x400): multiple definition of `olaf_db_find_meta_data'; olaf_db.o:olaf_db.c:(.text+0x430): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_delete_meta_data':
olaf_db_mem.c:(.text+0x430): multiple definition of `olaf_db_delete_meta_data'; olaf_db.o:olaf_db.c:(.text+0x3b0): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_has_meta_data':
olaf_db_mem.c:(.text+0x440): multiple definition of `olaf_db_has_meta_data'; olaf_db.o:olaf_db.c:(.text+0x780): first defined here
/usr/bin/ld: olaf_db_mem.o: in function `olaf_db_stats_meta_data':
olaf_db_mem.c:(.text+0x450): multiple definition of `olaf_db_stats_meta_data'; olaf_db.o:olaf_db.c:(.text+0x520): first defined here
/usr/bin/ld: olaf_fp_db_writer_mem.o: in function `olaf_fp_db_writer_new':
olaf_fp_db_writer_mem.c:(.text+0x20): multiple definition of `olaf_fp_db_writer_new'; olaf_fp_db_writer.o:olaf_fp_db_writer.c:(.text+0x0): first defined here
/usr/bin/ld: olaf_fp_db_writer_mem.o: in function `olaf_fp_db_writer_store':
olaf_fp_db_writer_mem.c:(.text+0x60): multiple definition of `olaf_fp_db_writer_store'; olaf_fp_db_writer.o:olaf_fp_db_writer.c:(.text+0x40): first defined here
/usr/bin/ld: olaf_fp_db_writer_mem.o: in function `olaf_fp_db_writer_delete':
olaf_fp_db_writer_mem.c:(.text+0x140): multiple definition of `olaf_fp_db_writer_delete'; olaf_fp_db_writer.o:olaf_fp_db_writer.c:(.text+0x140): first defined here
/usr/bin/ld: olaf_fp_db_writer_mem.o: in function `olaf_fp_db_writer_destroy':
olaf_fp_db_writer_mem.c:(.text+0x150): multiple definition of `olaf_fp_db_writer_destroy'; olaf_fp_db_writer.o:olaf_fp_db_writer.c:(.text+0x240): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:95: mem] Error 1```

Segmentation fault on some WAV files (even after FFMPEG converts them to RAW)

OS: Debian 10 x64
gcc version 8.3.0 (Debian 8.3.0-6)

For some reason olaf_c goes to segmentation fault on some files.
It is simply reprodusable on store and on query mode.

query mode make output as:
...
start key: 4365488144 stop key: 4365488154 results 0
start key: 4365488144 stop key: 4365488154 results 0
Segmentation fault

GDB does not show paticular line, but shows :

Program received signal SIGSEGV, Segmentation fault.
0x0000555555565003 in olaf_reader_read ()
(gdb) backtrace
#0 0x0000555555565003 in olaf_reader_read ()
#1 0x000055555556542d in olaf_stream_processor_process ()
#2 0x000055555555674e in main ()
(gdb)

make web fails

Was just trying to compile this and ran into an error when I run make web

$ make web
emcc -o wasm/js/olaf.html  -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="['_malloc','_free']" -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' src/olaf_wasm.c src/pffft.c src/olaf_ep_extractor.c src/olaf_fp_extractor.c src/olaf_fp_db_mem.c src/olaf_fp_db_writer_mem.c src/olaf_fp_matcher_fast.c src/olaf_config.c  -O3 -Wall -lm -lc -W -I.
src/olaf_wasm.c:125:8: error: initializing 'int' with an expression of incompatible type 'void'
                        int maxMatchScore = olaf_fp_matcher_match(state.fp_matcher,state.fingerprints);
                            ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
emcc: error: '/Users/chris/code/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=17 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/chris/code/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -Wall -W -I. src/olaf_wasm.c -c -o /var/folders/gb/dws9z6hs4f12k5m58zl7s1c40000gn/T/emscripten_temp_6q5sozgt/olaf_wasm_0.o' failed (1)
make: *** [web] Error 1
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I'm not too familiar with C these days. Any ideas?

recognize short audio signal with distinct tones

beeping.zip
I'm having a hard time recognizing my audio signal consistently. It is a short sequence of well defined tones (audio file in attachment).

Is the method in this library suited for this type of audio? if so, could you recommend olaf_config.c configuration to fingerprint and recognize this signal using ESP32? Furthermore, is it possible to recognize and distinguish between multiple such audio signals (different tone patterns) on the ESP?
thanks in advance

Delete fails with undefined local variable or method audio_identifer

For a freshly added file, I cannot delete it from the database.

$ olaf delete "test.mp3"
Traceback (most recent call last):
	6: from /usr/local/bin/olaf:340:in `<main>'
	5: from /usr/local/bin/olaf:340:in `each_with_index'
	4: from /usr/local/bin/olaf:340:in `each'
	3: from /usr/local/bin/olaf:341:in `block in <main>'
	2: from /usr/local/bin/olaf:299:in `delete'
	1: from /usr/local/bin/olaf:138:in `with_converted_audio'
/usr/local/bin/olaf:300:in `block in delete': undefined local variable or method `audio_identifer' for main:Object (NameError)
Did you mean?  audio_filename
ERROR: 1

Unfortunately, I do not speak ruby, but I also don't see any sign of the undefined variable, so I daresay the error is correct.

Comparing short audio files

Hi,
I'm interested in finding near-duplicate audio files. My dataset is about 3000 thousands short audio files, between 0.5 seconds to 5 seconds. Unlike Shazam, both the "target" audio (i.e. the songs in Shazam's case) and the user input are short, and both might contain noise.

Can this library help?
If so, are there any recommendations for tuning parameters?

N.B - if a file is matched to multiple other files, it's fine - I have a less efficient algorithm that can verify which match is correct. In other words, I can handle some amount of false positives, but I don't want false negatives.

On performance / low memory

Related to: openjournals/joss-reviews#5459

Olaf/paper.md

Line 38 in 0173ff1

The portability and low memory[^1] usage of Olaf allows it to run on microcontrollers such as the ESP32 or similarly specced microcontrollers. This unique feature facilitates innovative IoT music recognition and music synchronization applications. Olaf also runs in the browser. A compilation emits a WebAssembly binary which, together with the Web Audio API, enables browser based acoustic fingerprinting applications.

  • Typo "...of Olaf allow it..."
  • I would bring the footnote content to the main text, and add a hyperlink to the script you mention.

ESP32 Example(s)

Hi,
The olaf_fp_ref_mem.h included in the zip file from here:
https://0110.be/files/attachments/475/ESP32-Olaf.zip

Has a number of nuls on line 7.
image

In addition to that the content is different from the same file in the arduino sketch folder for esp32_inmp441_olaf

Should the nuls be there?
What song does this file represent?

2nd set of questions -
When trying to compile the arduino sketch esp32_inmp441_olaf.ino

I found I had to copy the content of the files referenced in the esp32_inmp441_olaf folder. Despite that I have been unable to successfully link the code.

Are you able to provide guidance as to how to build your original hardware and ESP32 code that you used here:
https://0110.be/posts/Olaf_-_Acoustic_fingerprinting_on_the_ESP32_and_in_the_Browser
For example what ESP32 board did you use and what pins did you have the microphone connected to?

I believe that this is a very interesting project and would like to replicate it.

Sean

Question: is possible use external database?

From doc say:

On traditional computers fingerprints are stored in a high-performance key-value-store: LMDB. LMDB offers an a B+-tree based persistent storage ideal for small keys and values with low storage overhead.

Is possible hosting the DB into remote server and connect Olaf to them?

I saw into LMDB doc the warning:

Do not use LMDB databases on remote filesystems, even between processes on the same host. This breaks flock() on some OSes, possibly memory map sync, and certainly sync between programs on different hosts.

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.