Production of magnetoelastic sensor to measure displacements, vibrations and gas flows