using System; namespace SFXR; public class SFXRFrequency { /// /// Base tone of the sound, before sliding /// (Default: 400, Range: 0 - 3000) /// public SFXRFloat Start { get; set; } = 400; /// /// Amount by which the frequency is increased or decreased over time /// (Default: 0, Range: -3000 - 3000) /// public SFXRFloat Slide { get; set; } = 0; /// /// Amount by which the slide is increased or decreased over time /// (Default: 0, Range: -3000 - 3000) /// public SFXRFloat DeltaSlide { get; set; } = 0; /// /// Gets the frequency at a given time /// /// /// The frequency in Hz public float GetFrequency( float time ) { // Calculate the frequency float frequency = Start + Slide * time + DeltaSlide * time * time; return frequency; } }