one simple way is – fix one end of the spline using Fix in the Spline Dynamics tag, attach the cube that swings to the spline with a Align to Spline tag (0 or 100% depending on the splines direction), move the spline with Wind and/or Turbulence Objects – you have to add the Wind/Turbulence objects to the Spline Dynamics tags Forces tab in the Include box.