BitOrchestra.SineEvaluator.Generate C# (CSharp) Method

Generate() public method

public Generate ( Int32 Start, Int32 Buffer ) : void
Start System.Int32
Buffer System.Int32
return void
        public override void Generate(Value Start, Value[] Buffer)
        {
            this.Source.Generate(Start, Buffer);
            for (int t = 0; t < Buffer.Length; t++)
            {
                double input = Buffer[t] / this.Period;
                double output = Math.Sin(input * 2.0 * Math.PI);
                Buffer[t] = (Value)(output * Scale);
            }
        }