コード例 #1
0
ファイル: Generator.cs プロジェクト: eriser/alphaSynth
 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;
 }
コード例 #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;
 }
コード例 #3
0
ファイル: SquareGenerator.cs プロジェクト: eriser/alphaSynth
 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;
 }