The modelling obviously took a while, I don't recall how long, but the scripting was actually quite quick, maybe a couple of hours. There are only four basic scripts used:
1) Rotation. This affects the propeller, crankshaft, and planetary gearbox elements.
2) Rotational oscillation. This is a modified rotation script that rotates an object less than 360 degrees in one axis, then the same amount in the other direction around the same axis. An example might be a pendulum on a clock. In this model, the valve rockers are animated with this script.
3) Positional oscillation. This script is similar to the rotational oscillation but is applied to an object's position rather than orientation, so lateral motion is achieved. This is applied to the valve pushrods.
4) Morph oscillation. Similar to the rotational and positional oscillation, this script oscillates a morphing object, in this case the valve spring compression (I imagine this is what you used in your video, assuming the motion is achieved by morphs).
The scripts are then applied to each element, with adjustments made to the 'phase' of the sine/cosine operations behind the movement to ensure each element is correctly synchonised. Some elements use multiple scripts, for example the piston connecting rods move with both lateral and rotational oscillations (astute readers will notice that conrod motion is not strictly sinusoidal due to the shifting angle of the conrod... I have cheated a bit and stuck to pure sine to keep it simple, since the fault is not visible in the animation).
I am happy to post the scripts themselves (in a new thread so as not to hijack yours) with some explanation of how they work, if anybody is interested.
EDIT: Love your ideas of morphing organic structures to music, that just sounds awesome!