Asking for replaygain support

Alternative Android Client for Subsonic

Moderators: daneren2005, moderators

Asking for replaygain support

Postby gorman » Wed Sep 17, 2014 12:16 pm

While looking to solve a couple of other problems here: viewtopic.php?f=2&t=14712 I discovered that Subsonic with the FFMPEG transcoding line I use is copying over to the transcoded files the replaygain tags used in the original files.

Since the difference in replaygain values due to transcoding should be negligible, I think it would be great if D-Sub was capable of interpreting and applying these replaygain values.

The standard is described here: http://wiki.hydrogenaud.io/index.php?ti ... cification

The correct implementation would see the player using album replaygain values when playing back consecutive tracks of the same album (by tags, I guess), while applying the track replaygain values when playing back mixed tracks from different albums. This is how Squeezebox has handled it for a long time and it's really efficient.

Thanks for reading.
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: Asking for replaygain support

Postby daneren2005 » Wed Sep 17, 2014 10:27 pm

Replaygain is probably the oldest non fulfilled request I have. To be honest, I still am not entirely sure as to how to implement it, as I'm not much of an audio buff. I just use the standard system API's to do everything. On of these days I will have to just sit down and spend the time to figure it out.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby Reith » Fri Sep 19, 2014 4:33 am

Long-time user of DSub, just poking my head in to say I would also love ReplayGain support as I use it on all my music.

I don't know a lot about coding, but you could look into another open source player like Vanilla Music (https://github.com/adrian-bl/vanilla) to see how it implements it.
Reith
 
Posts: 21
Joined: Fri Sep 19, 2014 4:28 am

Re: Asking for replaygain support

Postby daneren2005 » Fri Sep 19, 2014 6:04 am

Actually, that does help. I will take a look at how it is implemented there. Thank you.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby gorman » Sat Sep 20, 2014 1:52 pm

The developer for Vanilla does several things right in implementing RG.

Actually, he pretty much does a by the book implementation. Track gain, album gain, pre-amp value, gain value for songs with no RG info.

He just misses the "smart gain" option that one can find in Squeezebox players, the one I described in the opening post. But it's a really good start.

Thanks for looking into this, much appreciated.
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: Asking for replaygain support

Postby daneren2005 » Sun Sep 21, 2014 11:10 pm

Here is a test apk with the basic logic implemented. Can you guys test it for me maybe? Or provide me with an account on your server and a list of a good set of files to test for this? Everything I try doesn't seem to have the tags :(

https://www.dropbox.com/s/6p72izbk7aaam ... 9.apk?dl=0
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby Reith » Mon Sep 22, 2014 9:33 pm

Wow, that was fast!

I'll test it out. Did you add RG-related options anywhere or is it just a basic setup to make sure it works properly first?

/e: It sounds like it's working, but it's difficult to tell without being able to do direct comparisons by switching RG on and off. I'm listening to a classical song I listened to last night and it sounds like it was boosted a bit. Let me know if you want a login to my server if you want to test things directly.
Reith
 
Posts: 21
Joined: Fri Sep 19, 2014 4:28 am

Re: Asking for replaygain support

Postby daneren2005 » Mon Sep 22, 2014 9:52 pm

That was just a basic test without any sort of switch. I will do a proper version with it toggleable as well as fix some stuff in the next couple of days. The initial version was just a copy paste from that project, I need to add in all of DSub's specific logic as well (ex: maps playing will lower the volume to 20% then put it back up to a full 100% instead of the correct replaygain value). And yes, if you can either PM or email me a temp username/password + a good example set of songs to test directly with, it would be appreciated :D
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby daneren2005 » Wed Sep 24, 2014 3:58 am

Ok, here is another version of apk (it is the same link, but the file has been updated). Changes are that now it is optional (in settings under Playback). Album tags are used if you are playing all songs where the album matches, or track tags are used if they are not similar to how it was asked for in the first post. I have the couple of issues I was aware of. I need feedback such as is this normalizing the volume correctly, etc.

https://www.dropbox.com/s/6p72izbk7aaam ... 9.apk?dl=0
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby Reith » Wed Sep 24, 2014 7:34 am

Just tested that latest apk out and I feel confident saying volume normalization is working, but changing the ReplayGain option (to enable or disable it) doesn't seem to apply until you close and reopen DSub.
Reith
 
Posts: 21
Joined: Fri Sep 19, 2014 4:28 am

Re: Asking for replaygain support

Postby daneren2005 » Wed Sep 24, 2014 12:19 pm

You actually only need to switch to another song, but that is a fairly simple fix. In the next or release version it is already fixed to change as soon as you toggle it.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby gorman » Wed Sep 24, 2014 2:33 pm

Installing the updated version now. I'm now going out, but I'll be in the car and trying this out. I'll report back.

Let me just say that this is really, really cool to be happening. :D
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: Asking for replaygain support

Postby gorman » Wed Sep 24, 2014 5:30 pm

It seems to be working but... does it disable the equalizer or am I mistaken?
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: Asking for replaygain support

Postby daneren2005 » Wed Sep 24, 2014 5:54 pm

It does not disable the EQ. It only calls setVolume which should have no bearing on the EQ functionality.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Asking for replaygain support

Postby gorman » Wed Sep 24, 2014 7:46 pm

I tried activating the EQ to raise the master level. It seemed to have no effect.
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Next

Return to DSub for Android

Who is online

Users browsing this forum: No registered users and 77 guests