libmodplug and song volume

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
Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

libmodplug and song volume

Post by Pilo »

Hi everyone!

I recently added music made with milkytracker in my löve game, but I noticed that the volume of the song is quite low.

I looked into love's sources and noticed that for the files opened with modplug the master volume is set to 128, which wouldn't be a problem if we can increase it via love API, but it seems it's not possible?
Even changing the source volume above 1.0 doesn't work (and wouldn't be a good way for doing this I think for keeping the "best" sound quality).

Is there any way to change this without recompiling love (which I did, setting the master volume to max value, ie 512, but it works of course only on my linux computer...)?

Or am I missing something?

Thank you for reading ;)

Pilo
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: libmodplug and song volume

Post by Zilarrezko »

Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

Re: libmodplug and song volume

Post by Pilo »

Not really, this will only lower the volume of everything, but I want to increase the volume of the music track only
I want to increase it so 0dBFS in the song will be 0dBFS on soundcard output when playing the song in the game (which is not possible I think, as the libmodplug master volume is set to 128 when I think it should be 512).

By now the music is very low, I can lower the other sound FX too, but in this case, the user as to increase is audio system sound to make it as loud as any other apps/game.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: libmodplug and song volume

Post by kikito »

Pilo wrote:I want to increase the volume of the music track only
That looks like a job for [wiki]Source:setVolume[/wiki]
When I write def I mean function.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: libmodplug and song volume

Post by zorg »

In the mean time, you could set every other source's volume below 1.0, so in a way, instead of raising the volume of the module you're lowering everything else; not the best solution, but at least it will work.

On the other hand, i believe that the master volume is "more correct" at 128 than at 512, mostly because, for one, milkytracker allows between 0 and 256 (according to its reference manual), not 0-512; and because in modplug tracker, it's between 0 and 128.
Throw those two facts together, and you'll get inconsistency with a reason: this isn't really a module thing, but a player thing, since, from the XM and MOD references i gathered, the master volume does not get saved in those formats (s3m-s and it-s do save the global volume (along with a bunch of others), and that has a range of 0-128, probably the reason why in mpt, it's in that range)

What may be happening, is that inside milkytracker, the application itself amplifies the final volume for you; that may be why it sounds more quiet with libmodplug/löve
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: Bing [Bot] and 5 guests