예제 #1
0
 public override void RevertChanges()
 {
     Filter.RevertChanges();
     Phaser.RevertChanges();
     Flanger.RevertChanges();
     Synth.RevertChanges();
     LoFi.RevertChanges();
     RingModulator.RevertChanges();
     GuitarToBass.RevertChanges();
     SlowGear.RevertChanges();
     Transpose.RevertChanges();
     PitchBend.RevertChanges();
     Robot.RevertChanges();
     VocalDist.RevertChanges();
     Dynamics.RevertChanges();
     Eq.RevertChanges();
     Isolator.RevertChanges();
     Octave.RevertChanges();
     Pan.RevertChanges();
     Tremolo.RevertChanges();
     Slicer.RevertChanges();
     Delay.RevertChanges();
     PanningDelay.RevertChanges();
     TapeEcho.RevertChanges();
     GranularDelay.RevertChanges();
     Roll.RevertChanges();
     Chorus.RevertChanges();
     Reverb.RevertChanges();
 }
예제 #2
0
        private void BuildAudioInChain(WaveFormat monoFormat)
        {
            filter = new ComplexFilter(
                monoFormat,
                new BlackmanHarrisWindowFunction(),
                new FirFilter());

            filter.Filters.Add(new DigitalFilter
            {
                FilterFunction       = new LowPassFilterFunction(),
                LowerCutOffFrequency = 10000f
            });

            filterNode = new MonoSignalNode(monoFormat, filter.FilterImplementation);

            fourier = new FourierTransform(
                new FastFourierTransformProvider(),
                new BlackmanHarrisWindowFunction(),
                2048);
            fourierNode        = new MonoSignalNode(monoFormat, fourier);
            fourier.DataReady += fourierControl.fourier_DataReady;

            flanger     = new Flanger(new SineWave());
            flangerNode = new MonoSignalNode(monoFormat, flanger);

            flangerNode.CentreIn.Source = asioInput.Sources.First();
            //flangerNode.CentreIn.Source = waveCard.Inputs.First();
            filterNode.CentreIn.Source           = flangerNode.CentreOut;
            fourierNode.CentreIn.Source          = filterNode.CentreOut;
            asioOutput.Sinks.ElementAt(0).Source = filterNode.CentreOut;
            asioOutput.Sinks.ElementAt(1).Source = filterNode.CentreOut;
            //waveCard.Outputs.ElementAt(0).Source = filterNode.CentreOut;
            //waveCard.Outputs.ElementAt(1).Source = filterNode.CentreOut;
        }
예제 #3
0
        public void Initialise()
        {
            lfo = Substitute.For <IOscillator>();
            //lfo.Generate(Arg.Any<int>()).Returns(0f);

            target = new Flanger(lfo);
        }
예제 #4
0
 private void AddFlanger_Click(object sender, RoutedEventArgs e)
 {
     if (selectedLine?.Line != null)
     {
         var effect = new Flanger();
         selectedLine.Line.AddEffect(effect);
     }
 }
예제 #5
0
        public void Flanger_200000_iterations_1000_length_buffer()
        {
            var target = new Flanger(new SineWave());

            target.Format = new WaveFormat(44100, 1);

            var time = Helpers.Time(() =>
            {
                var buffer = new float[1000];
                for (int i = 0; i < 200000; i++)
                {
                    target.Process(new float[][] { buffer }, 1000);
                }
            });

            Debug.WriteLine(string.Format("FirFilter performance test: {0}", time));
        }
예제 #6
0
 public override void ApplyChanges <T>(T model)
 {
     if (model is SettingsMemoryFxModel memoryFx)
     {
         Filter.ApplyChanges(memoryFx);
         Phaser.ApplyChanges(memoryFx);
         Flanger.ApplyChanges(memoryFx);
         Synth.ApplyChanges(memoryFx);
         LoFi.ApplyChanges(memoryFx);
         RingModulator.ApplyChanges(memoryFx);
         GuitarToBass.ApplyChanges(memoryFx);
         SlowGear.ApplyChanges(memoryFx);
         Transpose.ApplyChanges(memoryFx);
         PitchBend.ApplyChanges(memoryFx);
         Robot.ApplyChanges(memoryFx);
         VocalDist.ApplyChanges(memoryFx);
         Dynamics.ApplyChanges(memoryFx);
         Eq.ApplyChanges(memoryFx);
         Isolator.ApplyChanges(memoryFx);
         Octave.ApplyChanges(memoryFx);
         Pan.ApplyChanges(memoryFx);
         Tremolo.ApplyChanges(memoryFx);
         Slicer.ApplyChanges(memoryFx);
         Delay.ApplyChanges(memoryFx);
         PanningDelay.ApplyChanges(memoryFx);
         TapeEcho.ApplyChanges(memoryFx);
         GranularDelay.ApplyChanges(memoryFx);
         Roll.ApplyChanges(memoryFx);
         Chorus.ApplyChanges(memoryFx);
         Reverb.ApplyChanges(memoryFx);
     }
     else
     {
         throw new ArgumentException("Model must be of type SettingsMemoryFxModel.");
     }
 }
예제 #7
0
 public FlangerUI(Flanger effect)
 {
     Effect = effect;
     InitializeComponent();
     Init();
 }
예제 #8
0
 public void Should_throw_if_no_lfo_provider_to_constructor()
 {
     target = new Flanger(null);
 }