RangedFloat Pitch { get; set; }

robot_2Generated
code_blocksInput

Description

The Pitch property of the SoundEvent class represents the base pitch of the sound. It is a RangedFloat type, allowing you to specify a pitch value within a defined range.

Usage

Use the Pitch property to adjust the pitch of a sound event. The pitch can be set to any value between 0 and 2, with a step of 0.01. This allows for fine-tuning of the sound's pitch to achieve the desired audio effect.

Example

// Create a new SoundEvent instance
SoundEvent soundEvent = new SoundEvent();

// Set the pitch of the sound event
soundEvent.Pitch = new RangedFloat(1.0f, 0.0f, 2.0f, 0.01f);

// Access the pitch value
float currentPitch = soundEvent.Pitch.Value;

// Adjust the pitch
soundEvent.Pitch.Value = 1.5f; // Increase the pitch