Measuring spectrally-resolved information transfer