Noise Shaping for Linear Media