Excitation of magnetic normal modes by spin-torque: a Lagrangian approach