Optical excitation or measuring of vibrations