/// <summary> /// A noise sound that randomly varies within a frequency range. /// </summary> /// <param name="duration">The duration in seconds.</param> /// <param name="lowPitch">The lower range of the noise.</param> /// <param name="highPitch">The upper range of the noise.</param> /// <returns>The noise sound.</returns> public static Sound Noise(double duration, Pitch lowPitch, Pitch highPitch) { return(new NoiseSound(duration, lowPitch, highPitch)); }
/// <summary> /// A chirp sound, that is, a sound that shifts its frequency at a constant rate. /// </summary> /// <param name="duration">The duration in seconds.</param> /// <param name="startPitch">The start pitch.</param> /// <param name="endPitch">The end pitch.</param> /// <returns>The chirp sound.</returns> public static Sound Chirp(double duration, Pitch startPitch, Pitch endPitch) { return(new ChirpSound(duration, startPitch, endPitch)); }
/// <summary> /// A simple steady tone. /// </summary> /// <param name="duration">The duration in seconds.</param> /// <param name="pitch">The pitch to play.</param> /// <returns>The sound.</returns> public static Sound Tone(double duration, Pitch pitch) { return(new ToneSound(duration, pitch)); }
public NoiseSound(double duration, Pitch lowPitch, Pitch highPitch) { Duration = duration; _lowPitch = lowPitch; _highPitch = highPitch; }
public ChirpSound(double duration, Pitch startPitch, Pitch endPitch) { Duration = duration; _startPitch = startPitch; _endPitch = endPitch; }
public ToneSound(double duration, Pitch pitch) { Duration = duration; _pitch = pitch; }