Get sound points.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Get sound points.

Post 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
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Get sound points.

Post 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.
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Re: Get sound points.

Post 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!
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Get sound points.

Post 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.
Mikaboshi
Prole
Posts: 12
Joined: Mon Jul 22, 2013 8:55 pm

Re: Get sound points.

Post by Mikaboshi »

viewtopic.php?f=4&t=8372

LuaFFT looks promising.
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Re: Get sound points.

Post by Engineer »

Now on that we are on the topic of music, is there a way to get the length of a track?
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: Get sound points.

Post by Ranguna259 »

With a quick google search I found this viewtopic.php?f=4&t=10011
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: Get sound points.

Post 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.
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Re: Get sound points.

Post 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 :)
Attachments
MusicPlayer.love
(2.99 KiB) Downloaded 185 times
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests