  For an arbitrary solution to the KdV hierarchy, the generating series of
logarithmic derivatives of the tau-function of the solution can be expressed by
the basic matrix resolvent via algebraic manipulations. Based on this we
develop in this paper two new formulae for the generating series by introducing
a pair of wave functions of the solution. Applications to the
Witten--Kontsevich tau-function, to the generalized Br\'ezin--Gross--Witten
(BGW) tau-function, as well as to a modular deformation of the generalized BGW
tau-function which we call the Lam\'e tau-function are also given.
