Exemplo n.º 1
0
 public override void Generate()
 {
     for (int i = 0; i < intervalRatios.Length; i++)
     {
         double cents = IntervalRatio.CentsFromRatio(intervalRatios[i]);
         scaleSteps[i] = new ScaleStep(i, cents, 0);
     }
 }
Exemplo n.º 2
0
        // generate from "perfect 12th" / 7
        public override void Generate()
        {
            // create the generator (P12 = P5 @ octave)
            // get cents for P5 and add an octave (1200)
            var    p5       = new IntervalRatio(3, 2, "P5", "G");
            double genCents = (p5.Cents + 1200) / 7;
            double cents    = 0;

            double[] orwellCents = new double[nbSteps];

            for (int i = 0; i < nbSteps; i++)
            {
                orwellCents[i] = cents;

                cents += genCents;
                if (cents > 1200)
                {
                    cents -= 1200;
                }
            }
            GenerateSteps(orwellCents);
        }