How i can cet the system volume with löve

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
NewReasonz
Prole
Posts: 3
Joined: Sun Sep 27, 2015 5:13 pm

How i can cet the system volume with löve

Post by NewReasonz »

Hey, i want to program something like an equalizer with bars that react to music(I'am sure you all know what i mean). But i don't want that the qualizer works only with music which gets imported to the program, but rather with any sound of the system(master volume). e.g that the equalizer react to music on youtube. But how can i get the volume peaks of the whole system?

I know it's old: but sorry for my bad english :P
User avatar
TheOdyssey
Citizen
Posts: 52
Joined: Mon Jul 13, 2015 4:29 pm
Location: Turn Around...

Re: How i can cet the system volume with löve

Post by TheOdyssey »

I don't think that's possible with Love2d. It would have to be very specific for each OS. But maybe I'm wrong
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: How i can cet the system volume with löve

Post by Jasoco »

It would be neat if Löve could do this, get the audio currently playing in the system, as it would make for some cool interesting games. Maybe expand it so Löve can control your music player and get playlist data to play specific songs.

But I think Odyssey is right. You can't do this through normal means at least.
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How i can cet the system volume with löve

Post by zorg »

I agree with Odyssee and Jasoco, but then again,creating a löve project that can visualize music you play -inside- it is not easy either, since there's no inbuilt queueable sources in löve, so technically, you can't "feed" data to be visualized continuously. (there is an implementation by someone from here though) You'd need to pre-generate the whole track's worth of visual states, which would take up much space, or alternatively, always use sounddata:tell() to get the current sample position, and use that to set the bar height constantly every update tick; that may be hard on the processor.
Last edited by zorg on Mon Dec 07, 2015 9:54 am, edited 1 time in total.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: How i can cet the system volume with löve

Post by Jasoco »

Way back in the '90s when I was into QBASIC I found a file that actually took the audio volume from the computer and visualized it as a waveform. Now remember this was QBASIC running in a DOS prompt on Windows 95.

Can that not be done today through some means or another?
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How i can cet the system volume with löve

Post by zorg »

It can, if the system one uses (on windows at least) has an input called wave out/stereo mix/what-u-hear or similar, since that is the loopback interface, or literally what you hear; openAL can theoretically access that, and you can record from it with lpghatguy's microphone implementation, then use that data to visualize it.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 132 guests