the normalize package (yes, let's not discuss how it's misnamed again) which is pointed to from freshmeat includes a utility to calculate and add them; Basically instead of needing to quantify yourself it can be made to work with e.g. your whole music collection.