Change parameter over Time

Can someone please tell me now to change a parameter overtime in unity C# script. I’ve been trying everything I can think of and can’t figure out how to do it. I can get the parameter to jump to different points, but I can’t get it to be a gradual change. Like fade from 1 type of music to another. I think I need to use the getParameter or something. All help is appreciated.

Here is my code:

using UnityEngine;
using System.Collections;

public class soundManager : MonoBehaviour {
	FMOD_StudioSystem soundSystem;

	public FMODAsset asset;
	FMOD.Studio.EventInstance evt;
        //FMOD.Studio.ParameterInstance pMusic;

	// Use this for initialization

	void Start ()

		evt = FMOD_StudioSystem.instance.GetEvent(;

	// Update is called once per frame
	void Update () 

		if (Input.GetKeyDown ("p"))


		//change an events parameters based on a key input:

		if (Input.GetKeyDown ("o")) 

				evt.setParameterValue ("music", 1.0F)	


		if (Input.GetKeyDown ("i")) {
			evt.setParameterValue ("music", 0.0F);

First thanks both of you for the suggestions.

@ Peter, thanks for the coroutine stuff. You can probably tell I’m new to programming, but slowly getting the hang of it. I was able to figure it out using a coroutine and it works great.

Although I am curious about seek speed. What is it? where do I find it. I googled and looked in the fmod docs, but I didn’t find any thing. Any thoughts of where I can lean about it?

You need to either interpolate the value you’re passing in your code, or increase the “seek speed” in your FMOD Studio Project .

Seek speed is a good option, that offers linear interpolation to smooth out parameter changes. If you want more control you could update the parameter each frame from Update or using a Coroutine