Magnetic fields are believed to play an important role in the star formation process. Correlations in the velocity field in molecular filaments are indicative of dynamical interactions between clouds and parts within a cloud. The magnetic field is a likely candidate as the vector of such interactions. Perturbations of the field at large scales can feed the velocity dispersion within condensations at small scale. This mechanism is discussed in the framework of two simple analytical approximations describing transverse waves fed into plane parallel slabs.