Audio Velocity

Hi!
How can I increase the audio velocity, when i press a key?
Any help is good! :slight_smile:

Thank you

If you’re talking about Audio pitch. Try this code

public float _audioSpeed = 1.2f;

void Start()
{
  audio.pitch = _audioSpeed;
}

You could change it from inspector also.

or Use a horizontal ScrollBar to change the pitch

public float hSliderValue = 0.0;
	
function OnGUI () 
{

hSliderValue = GUI.HorizontalSlider (Rect (25, 25, 100, 30), hSliderValue, -3.0f, 3.0f);

audio.pitch = hSliderValue ;

}