Exemple #1
0
 /// <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));
 }
Exemple #2
0
 /// <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));
 }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
 public NoiseSound(double duration, Pitch lowPitch, Pitch highPitch)
 {
     Duration   = duration;
     _lowPitch  = lowPitch;
     _highPitch = highPitch;
 }
Exemple #5
0
 public ChirpSound(double duration, Pitch startPitch, Pitch endPitch)
 {
     Duration    = duration;
     _startPitch = startPitch;
     _endPitch   = endPitch;
 }
Exemple #6
0
 public ToneSound(double duration, Pitch pitch)
 {
     Duration = duration;
     _pitch   = pitch;
 }