Пример #1
0
        private void RebuildLFO(bool force = false, int defcount = 5000)
        {
            int count = defcount;

            if (force == false)
            {
                count = Math.Min(count, pictureBox1.Width);
            }
            TestFrameLoader.ResetStatic();
            for (int i = 0; i < count; i++)
            {
                if (i == 0)
                {
                    TestFrameLoader.LFOTrigger(1, 1);
                }

                if (i == 1)
                {
                    TestFrameLoader.LFOTrigger(0, 1);
                }

                var V  = TestFrameLoader.GetLFO(1, Speed.Value, Shape.Value << 8, Mod.Value << 8, Phase.Value << 4);
                var V2 = TestFrameLoader.GetLFOBasicShape(1);

                values64[i]   = V2;
                values2[i]    = V / 4096.0f;
                linvalues2[i] = TestFrameLoader.GetLFOPhased(1) / 4096.0f;
            }
        }
Пример #2
0
        private void EnvUpdate_Tick(object sender, EventArgs e)
        {
            pos = (pos + 1) % 4000;

            for (int i = 0; i < 10; i++)
            {
                double D = 0;
                values[pos]    = TestFrameLoader.GetLFO(0, Speed.Value, Shape.Value << 8, Mod.Value << 8, Phase.Value << 4) / 4096.0f;
                D              = TestFrameLoader.GetLFOPhased(0) / 4096.0f;
                valuesref[pos] = (TestFrameLoader.GetLFOBasicShape(0) / 65536.0f) / (4096.0f * 4) + 0.50f;
                linvalues[pos] = D;
            }
        }