Creates an arbitrary audio wave reference example note and populates an AudioClip with it.
These are used with the SoundMaker class to provide a means to do crude FM wave sounds.
Each of the "FM wave generators" in the kOS computer's "audio chip" is a derived class of this.
To make a new FM wave type, just inherit from this class and override SampleFunction with your own mathematical function that describes the sound wave in the time domain. The base class should populate the audio clip for you from that.
Inheritance: IProceduralSoundWave
コード例 #1
0
 /// <summary>
 /// Load a sound wave sample that was built procedurally in memory.
 /// These kinds of samples can be stretched later to play at different
 /// notes.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="waveGen"></param>
 public void LoadProceduralSound(string name, ProceduralSoundWave waveGen)
 {
     waveGenerators[name] = waveGen;
 }
コード例 #2
0
ファイル: SoundMaker.cs プロジェクト: KSP-KOS/KOS
 /// <summary>
 /// Load a sound wave sample that was built procedurally in memory.
 /// These kinds of samples can be stretched later to play at different
 /// notes.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="waveGen"></param>
 public void LoadProceduralSound(string name, ProceduralSoundWave waveGen)
 {
     waveGenerators[name] = waveGen;
 }