Exemplo n.º 1
0
        public static WaveFilter SampleWave()
        {
            var freq = 0.01;

            var filter1 = new AmplificationFilter(new WaveGenerator(GeneratorSignalType.Sine, 0, freq), 0.4);
            var filter2 = new AmplificationFilter(new WaveGenerator(GeneratorSignalType.Sine, 90, freq * 3.5), 0.2);
            var filter3 = new AmplificationFilter(new WaveGenerator(GeneratorSignalType.Sine, 180, freq * 1.2), 0.3);
            var filter4 = new CombinationFilter(filter1, filter2, CombinationType.Add);
            var filter  = new CombinationFilter(filter3, filter4, CombinationType.Substract);
            var noised  = new RandomNoiseFilter(filter, 0.02);

            return(noised);
        }
Exemplo n.º 2
0
        public void StartWaveGeneration()
        {
            Wave = new AmplificationFilter(SampleWave(), Amplitude);
            Clk  = new TimedClockSource
            {
                Callback = x =>
                {
                    var y = Wave.F(x);
                    WriteValue(x, y);
                },
                Interval = 500
            };

            Clk.Start();
        }