REPLAYGAIN_TRACK_PEAK

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

simonbrads
Posts: 46
Joined: Mon Mar 08, 2010 2:15 am

REPLAYGAIN_TRACK_PEAK

Post by simonbrads »

Hi all,

Quick question: Is there a property on SDBSongData (or elsewhere) to get/set the REPLAYGAIN_TRACK_PEAK value?

REPLAYGAIN_TRACK_GAIN and REPLAYGAIN_ALBUM_GAIN are available via SDBSongData.Leveling and LevelingAlbum, respectively, but I can't see anything for the peak value.

Thanks,
Simon
simonbrads
Posts: 46
Joined: Mon Mar 08, 2010 2:15 am

Re: REPLAYGAIN_TRACK_PEAK

Post by simonbrads »

To answer my own question, I think the answer is:

SDPSongData has a property called PeakValue -- however, this is unimplemented, and throws an exception.

Despite the fact that "analyse volume" sets three tags (REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_ALBUM_GAIN, and REPLAYGAIN_TRACK_PEAK), the database only stores the track gain and the album gain.

I assume that SDBSongData only deals with the database (?). Therefore, there's no way to get/set the track peak using the API. (Sadly, as it means I can't copy all tags/data from an album to another copy of the same -- I'll have to re-analyse volume later.)

Cheers,
Simon
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: REPLAYGAIN_TRACK_PEAK

Post by nohitter151 »

simonbrads wrote: I assume that SDBSongData only deals with the database (?). Therefore, there's no way to get/set the track peak using the API. (Sadly, as it means I can't copy all tags/data from an album to another copy of the same -- I'll have to re-analyse volume later.)
fyi, There's already a script that does this, ie. copies all tags and DB values from one track or set of tracks to another track or set of tracks. It's called "Advanced duplicate find and fix". Even updates playlists.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
simonbrads
Posts: 46
Joined: Mon Mar 08, 2010 2:15 am

Re: REPLAYGAIN_TRACK_PEAK

Post by simonbrads »

Thanks for the pointer! I've taken a look, and it looks pretty good. But I'm trying to do something slightly different, so I'll stick with it. It's interesting learning, anyway. :)
Post Reply