Changing sample rate in Ardour

Started a session with the wrong sample rate?

Did you start a session with the wrong sample rate (e.g. 48 kHz instead of 44.1), do a load of MIDI work, and then realised that you need to change Jack settings to be able to do the audio? Ardour will let you, but then complain every time you load the session that the audio may be at the wrong speed (and will get it wrong when you master the session).

However, there is no need to panic. The session files are text and all you need to do is change the sample-rate="<some rate>" line at the top of the file using your favourite text editor. Just make sure that Ardour is not running when you make the edit!