Calculating amount of alkali additions to get desired pH in (hard) cider

This is linked to my question over on the HomeBrew SE site: <https://homebrew.stackexchange.com/questions/18837/reduce-acidity-of-hard-cider>


I haven't done chemistry since I was 17/18 but I remember doing molar calculations and so on, and the principle of OH ions binding with H ions to reduce acidity. I would prefer a more scientific method than trial and error.


Given an initial pH, desired pH and volume of liquid, how can I calculate the mass of a given salt to add... and is it as simple as that or are there more 'parameters' needed to generate some equations?


The salts I am likely to consider using are:


* sodium bicarbonate (sodium hydrogen carbonate?)
* magnesium carbonate
* calcium carbonate
* potassium carbonate


Is it as simple as working out how many moles of OH each of these contains per gram, and plugging that into a pH equation?


