float Pitch { get; set; }

robot_2Generated
code_blocksInput

Description

The Pitch property of the SoundHandle class represents the pitch of the sound. It is a float value that can be adjusted to change the frequency of the sound being played. A higher pitch value will make the sound play faster and at a higher frequency, while a lower pitch value will slow it down and lower the frequency.

Usage

To modify the pitch of a sound, you can set the Pitch property on an instance of SoundHandle. This allows you to dynamically adjust the sound's pitch during runtime.

Example

// Example of adjusting the pitch of a sound
SoundHandle sound = new SoundHandle();
sound.Pitch = 1.5f; // Increase the pitch by 50%

// To reset the pitch to normal
sound.Pitch = 1.0f;