Audio-Input : Frequency Spectrum + Recording

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Audio-Input : Frequency Spectrum + Recording

Post 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 !
Attachments
lua_audioin_src.zip
SourceCode, MIT License
(152.89 KiB) Downloaded 578 times
lua_audioin.zip
Binaries for Win (32Bit) and Linux Ubuntu 10.04 (32Bit)
(177.27 KiB) Downloaded 552 times
love-android - gamejams
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Audio-Input : Frequency Spectrum + Recording

Post 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'
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Audio-Input : Frequency Spectrum + Recording

Post 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.)
Hello, I am not dead.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Audio-Input : Frequency Spectrum + Recording

Post 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)
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Audio-Input : Frequency Spectrum + Recording

Post 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...
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests