We revisit the sympectic aspects of the spectral transform for matrix-valued
rational functions with simple poles. We construct eigenvectors of such
matrices in terms of the Szeg\"o kernel on the spectral curve. Using
variational formulas for the Szeg\"o kernel we construct a new system of
action-angle variables for the canonical symplectic form on the space of such
functions. Comparison with previously known action-angle variables shows that
the vector of Riemann constants is the gradient of some function on the moduli
space of spectral curves; this function is found in the case of matrix
dimension 2, when the spectral curve is hyperelliptic.Comment: 19 page