Beispiel #1
0
 protected Generator(GeneratorDescriptor description)
 {
     LoopMode = description.LoopMethod;
     LoopStartPhase = description.LoopStartPhase;
     LoopEndPhase = description.LoopEndPhase;
     StartPhase = description.StartPhase;
     EndPhase = description.EndPhase;
     Offset = description.Offset;
     Period = description.Period;
     Frequency = 0;
     RootKey = description.RootKey;
     KeyTrack = description.KeyTrack;
     VelocityTrack = description.VelTrack;
     Tune = description.Tune;
 }
Beispiel #2
0
 public TriangleGenerator(GeneratorDescriptor description)
     : base(description)
 {
     if (EndPhase < 0)
         EndPhase = 1.25;
     if (StartPhase < 0)
         StartPhase = 0.25;
     if (LoopEndPhase < 0)
         LoopEndPhase = EndPhase;
     if (LoopStartPhase < 0)
         LoopStartPhase = StartPhase;
     if (Period < 0)
         Period = 1;
     if (RootKey < 0)
         RootKey = 69;
     Frequency = 440;
 }
Beispiel #3
0
 public SquareGenerator(GeneratorDescriptor description)
     : base(description)
 {
     if (EndPhase < 0)
         EndPhase = SynthConstants.TwoPi;
     if (StartPhase < 0)
         StartPhase = 0;
     if (LoopEndPhase < 0)
         LoopEndPhase = EndPhase;
     if (LoopStartPhase < 0)
         LoopStartPhase = StartPhase;
     if (Period < 0)
         Period = SynthConstants.TwoPi;
     if (RootKey < 0)
         RootKey = 69;
     Frequency = 440;
 }