Increase pitch over time

Hi how can I gradually increase the pitch of the music playing in my game over time? I want it to speed up and slow down depending on what's going on in the game.

So far I've used -

music.pitch = Mathf.Lerp(lowPitch, highPitch,  Time.realtimeSinceStartup);

But that doesn't seem to be working.

Any thoughts?

Thanks.

The third parameter in Lerp is a float between 0 and 1. Using Time.realtimeSinceStartup therefore doesn't really make any sense. See here for more on Lerp.