Exporting Tempo Changes

Hi. Is there a simple way to generate a text file that would indicate where tempo changes occur in a song? I’m using Rewire with Cubase and I’d like to create a Tempo track in Cubase. However, to do this I need to know where all the tempo changes occur - ie. at which pattern sequence number and how many lines are in the patterns etc.

Any ideas or suggestions anyone? I usually sit down and note all the changes as the tune is playing but I’m sure there must be a better way.