コード例 #1
0
 public void Generate(float[] signal)
 {
     float[] fmod = new float[signal.Length];
     float[] amod = new float[signal.Length];
     if (freqMod != null)
     {
         freqMod.Generate(fmod);
     }
     if (ampMod != null)
     {
         ampMod.Generate(amod);
     }
     for (int i = 0; i < signal.Length; i++)
     {
         // do the portamento stuff / freq updating
         UpdateFreq();
         if (ampMod != null)
         {
             signal[i] = Generate(fmod[i], amod[i]);
         }
         else
         {
             signal[i] = Generate(fmod[i], 1);
         }
         MonoStep();
     }
     // broadcast to listener
     if (listener != null)
     {
         listener.Samples(signal);
     }
 }