Sound and soliton wave propagation in homogeneous and heterogeneous mediums with the new two-derivative implicit–explicit Runge–Kutta–Nyström method