Page 1 of 1

Get sound points.

Posted: Sat Aug 10, 2013 6:58 pm
by Engineer
Hello expert LÖVE users!

I have been working on a music player lately, and now I finally can wrap my head around the love.update/love.draw calls, I started working on it. I wrote up some libraries for later use. Also note that I have in my main.lua just some testing, this is 99.9% away from the finalized project.

But to get to my question, I was wondering if you could get so-called "sound-points" from the song. I was looking through the love.audio and love.sound but couldnt find anything that fits my needs. So to explain those so called "sound-points", those are those point where you can make a graph of what is happening with the music. So if a high sound, that will go up, and when it is hard and low, for example down. The main goal for me is to make a graph according to the song, not some hardcoded songs.

Im hoping I explained this well enough, please ask questions if you dont understand it! :)

Thanks for reading.

- Not yet an "Engineer" with LÖVE :D

Re: Get sound points.

Posted: Sat Aug 10, 2013 7:22 pm
by raidho36
You mean the frequency histogram, ok.

You can't get this witl LÖVE, since that would require to perform fourier transform on streaming samples in real-time, and LÖVE isn't exactly up to the task. Best luck is getting low precision ultra-slow histogram.

Re: Get sound points.

Posted: Sat Aug 10, 2013 7:26 pm
by Engineer
Too bad.. :/
Though I think there should be an option for it in the future, but that is not up to me. That is up for the people who can code in C++ and are interested in this.

Oh well, then that saves me some time on the music player. Thanks for your reply!

Re: Get sound points.

Posted: Sat Aug 10, 2013 8:44 pm
by raidho36
I don't think LÖVE would ever gonna have that. Building sound histograms is a job for anything but game engine/library.

Re: Get sound points.

Posted: Sun Aug 11, 2013 1:16 am
by Mikaboshi
viewtopic.php?f=4&t=8372

LuaFFT looks promising.

Re: Get sound points.

Posted: Sun Aug 11, 2013 6:47 pm
by Engineer
Now on that we are on the topic of music, is there a way to get the length of a track?

Re: Get sound points.

Posted: Sun Aug 11, 2013 7:02 pm
by Ranguna259
With a quick google search I found this viewtopic.php?f=4&t=10011

Re: Get sound points.

Posted: Mon Aug 12, 2013 8:06 am
by Plu
LuaFTT running in a seperate thread can do the trick, I've done that before for an experiment. But the game engine isn't really suited to it, it'll chew up a lot of resources.

Re: Get sound points.

Posted: Fri Aug 16, 2013 6:00 am
by Engineer
Thanks for every reply. I guess its just not going to happen.

But still in the mood of the music player, I stumped across this annoying error:
Image

Im pretty sure I opened the file, but I did something wrong I do not see...
Help is really appreciated :)