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
libmodplug and song volume
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: libmodplug and song volume
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.
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.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: libmodplug and song volume
That looks like a job for [wiki]Source:setVolume[/wiki]Pilo wrote:I want to increase the volume of the music track only
When I write def I mean function.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: libmodplug and song volume
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
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 True 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.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 6 guests