Page 1 of 1

Audio-Input : Frequency Spectrum + Recording

Posted: Sun Oct 31, 2010 6:32 pm
by ghoulsblade
Hi all,

we've been experimenting with recognizing notes from musical instruments using the microphone to make a little "music" game, in löve of course :awesome:

As löve doesn't have audio input, we made a small lua module wrapping SDL,SDL_audioin and kiss_fft (frequency analysis),
which i upload here in case someone else finds it useful (32 bit binaries for win and linux, sourcecode, MIT license).

NOTE : code for recording audio and polling from lua as binary-string is in the lib, but not really tested.

The game itself was made during one of the (almost) monthly 24h-munich-indie-game-jams ( http://munichindie.de ) and is available here :
http://www.open-pvp.de/munichindie/gugicramona.zip

Öbey !

Re: Audio-Input : Frequency Spectrum + Recording

Posted: Mon Nov 01, 2010 12:35 pm
by vrld
I would like to test this, but SDL_config_minimal.h prevents me from it:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/stddef.h:211: error: conflicting declaration 'typedef long unsigned int size_t'
include/SDL/SDL_config_minimal.h:38: error: 'size_t' has a previous declaration as 'typedef unsigned int size_t'

Re: Audio-Input : Frequency Spectrum + Recording

Posted: Mon Nov 01, 2010 1:10 pm
by zac352
vrld wrote:I would like to test this, but SDL_config_minimal.h prevents me from it:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/stddef.h:211: error: conflicting declaration 'typedef long unsigned int size_t'
include/SDL/SDL_config_minimal.h:38: error: 'size_t' has a previous declaration as 'typedef unsigned int size_t'
If I remember correctly, size_t determines whether your OS is 32-or 64-bit. :P (I probably don't.)

Re: Audio-Input : Frequency Spectrum + Recording

Posted: Mon Nov 01, 2010 2:40 pm
by bartbes
zac352 wrote:f I remember correctly, size_t determines whether your OS is 32-or 64-bit. :P (I probably don't.)
You don't.

@vrld: That almost sounds like you're cross-compiling.., are you compiling a 32-bit app on 64-bit? (or vice versa)

Re: Audio-Input : Frequency Spectrum + Recording

Posted: Mon Nov 01, 2010 7:46 pm
by vrld
bartbes wrote:That almost sounds like you're cross-compiling.., are you compiling a 32-bit app on 64-bit? (or vice versa)
I guess the shipped SDL headers are 32 bit while my system is 64 bit. Not using the shipped headers but the system ones results in a linker error (related to SDL_audioin), at which point I stopped trying. I guess I could try to cross compile it and use linux32, but meh...