Description: This is a script to adjust (normalize) volume for streaming media and BGM playing. This require QtRuby Lib. This contains language ja version too.
For local files, you're better off using ReplayGain (it reads the header of the file and sets the volume correctly). For streaming media, however,there are no headers for Amarok to read... that's where AlbumGain comes in.
AlbumGain uses the "artist" and "album" information byitself. The volume you set while listening to a track is automatically associated with anything that has that album name.Last changelog:
--------------------------------------- [0.1.1] albumgain.rb->add SIGTERM trap cfgdlg.rb-> calc each component fontsize for dialog
[0.1.2] Fix do not close albumgain.rb when amarok close.
Where does AlbumGain store its information? I use ReplayGain extensively, but this sounds interesting for streams, as well as for local files that don't support ReplayGain (FLAC, for instance). Will this work together with the ReplayGain script?
Even if they can't run at the same time, does AlbumGain save its data somewhere "safe" so AlbumGain and ReplayGain don't mess which each other's stuff?
Perhaps this script could check to see if it's needed, and invoke itself accordingly? Something like "if this is a stream, or if the file doesn't have ReplayGain tags, then activate"...
Thank you for comment.
>Where does AlbumGain store its information?
This script save data two step.
1. Save data to Hash(Ruby Hash Object)
2. Save Hash Object to file
(file name is albumvol)
>as for local files that don't support >ReplayGain (FLAC, for instance). Will >this work together with the ReplayGain >script?
I want to do so, but I can't do it...
I think that when run both ReplayGain and AlbumGain, there are two type cases in local file playing.
1)
Amarok send event trackChange ==>
first AlbumGain, after ReplayGain.
In this case,
AlbumGain set volume to amarok.
ReplayGain set volume to amarok.
So, ReplayGain decide volume value.
2)
Amarok send event trackChange ==>
first ReplayGain, after AlbumGain.
In this case,
ReplayGain set volume to amarok.
AlbumGain set volume to amarok.
So, AlbumGain decide volume value.
in streaming playing.
1)
Amarok send event trackChange ==>
first AlbumGain, after ReplayGain.
In this case,
AlbumGain set volume to amarok.
ReplayGain do nothing.
So, AlbumGain decide volume value.
2)
Amarok send event trackChange ==>
first ReplayGain, after AlbumGain.
In this case,
ReplayGain do nothing
AlbumGain set volume to amarok.
So, AlbumGain decide volume value.
I don't know how amarok send trackChange event to scripts, so I can say nothing.
If you play only local file,
you had better that set tag to all files from ReplayGain and use it.
That is very efficient.
For set volume data in AlbumGain,
you have to change amarok volume each
album.
I made this script for only stream play.
I think best way is that
amarok(TagLib) read replaygain tag and,
tell that value to script.
In amarok2.0, I hope so !!
Do I understand this correctly? This script sets a different volume for different albums in your collection? Perhaps you should explain the application of this script in a better way...
Thank you for reply.
This script set data by artist and album.
Key: <artist>alubm
Data: volume
to Hash.
(Hash not allow dupulicate key)
For example,
Artist:John Coltrane
Album: Blue Train
1 Blue Train
2 Moment's Notice
3 Locomotion
4 I'm Old Fashioned
5 Lazy Bird
When play "Moment's Notice", you change volume on amarok 100 to 75,
this script save data
Key: <John Coltrane>Blue Train
Data: 75
to Hash.
Sorry I'm not good at english.
If you interest this script,
please install this and use debug mode.
This script log out to albumgain.log.
Ratings & Comments
4 Comments
Where does AlbumGain store its information? I use ReplayGain extensively, but this sounds interesting for streams, as well as for local files that don't support ReplayGain (FLAC, for instance). Will this work together with the ReplayGain script? Even if they can't run at the same time, does AlbumGain save its data somewhere "safe" so AlbumGain and ReplayGain don't mess which each other's stuff? Perhaps this script could check to see if it's needed, and invoke itself accordingly? Something like "if this is a stream, or if the file doesn't have ReplayGain tags, then activate"...
Thank you for comment. >Where does AlbumGain store its information? This script save data two step. 1. Save data to Hash(Ruby Hash Object) 2. Save Hash Object to file (file name is albumvol) >as for local files that don't support >ReplayGain (FLAC, for instance). Will >this work together with the ReplayGain >script? I want to do so, but I can't do it... I think that when run both ReplayGain and AlbumGain, there are two type cases in local file playing. 1) Amarok send event trackChange ==> first AlbumGain, after ReplayGain. In this case, AlbumGain set volume to amarok. ReplayGain set volume to amarok. So, ReplayGain decide volume value. 2) Amarok send event trackChange ==> first ReplayGain, after AlbumGain. In this case, ReplayGain set volume to amarok. AlbumGain set volume to amarok. So, AlbumGain decide volume value. in streaming playing. 1) Amarok send event trackChange ==> first AlbumGain, after ReplayGain. In this case, AlbumGain set volume to amarok. ReplayGain do nothing. So, AlbumGain decide volume value. 2) Amarok send event trackChange ==> first ReplayGain, after AlbumGain. In this case, ReplayGain do nothing AlbumGain set volume to amarok. So, AlbumGain decide volume value. I don't know how amarok send trackChange event to scripts, so I can say nothing. If you play only local file, you had better that set tag to all files from ReplayGain and use it. That is very efficient. For set volume data in AlbumGain, you have to change amarok volume each album. I made this script for only stream play. I think best way is that amarok(TagLib) read replaygain tag and, tell that value to script. In amarok2.0, I hope so !!
Do I understand this correctly? This script sets a different volume for different albums in your collection? Perhaps you should explain the application of this script in a better way...
Thank you for reply. This script set data by artist and album. Key: <artist>alubm Data: volume to Hash. (Hash not allow dupulicate key) For example, Artist:John Coltrane Album: Blue Train 1 Blue Train 2 Moment's Notice 3 Locomotion 4 I'm Old Fashioned 5 Lazy Bird When play "Moment's Notice", you change volume on amarok 100 to 75, this script save data Key: <John Coltrane>Blue Train Data: 75 to Hash. Sorry I'm not good at english. If you interest this script, please install this and use debug mode. This script log out to albumgain.log.