liveview: Factor out spectrum calculation