We use the GKZ description of periods and certain classes of relative periods on families of Barth-Nieto Calabi-Yau $(l-1)$-folds in order to solve the $l$-loop banana amplitudes with their general mass dependence. As examples we compute the mass dependencies of the banana amplitudes up to the three-loop case and check the results against the known results for special mass values.