Example #1
0
 public Oscillator(IAudioLink audioLink)
     : base(audioLink)
 {
     _core = new OscillatorCore(audioLink);
     InputValueChanged(null);
     Output = GetSample;
 }
Example #2
0
 public Noise(IAudioLink audioLink)
     : base(audioLink)
 {
     _core = new NoiseCore();
     InputValueChanged(null);
     Output = GetSample;
 }
Example #3
0
 public Echo(IAudioLink audioLink)
     : base(audioLink)
 {
     _core = new EchoCore(audioLink);
     InputValueChanged(null);
     Output = GetSample;
 }
Example #4
0
 public Fader(IAudioLink audioLink)
     : base(audioLink)
 {
     _core = new FaderCore();
     InputValueChanged(null);
     Output = GetSample;
 }
Example #5
0
        private static void HandleInputChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Channel   channel = (d as Channel);
            AudioWire input   = (e.NewValue) as AudioWire;

            // storing the value in a class variable allows it to be accessed from any thread.
            channel._input = input;

            if (input == null)
            {
                channel.ChannelName = "Unassigned";
            }
            else
            {
                Modules.Module source = input.Target as Modules.Module;
                if (source == null)
                {
                    channel.ChannelName = "Unknown";
                }
                else
                {
                    channel.ChannelName = source.Description;
                }
            }
        }
Example #6
0
 public Fuzz(IAudioLink audioLink)
     : base(audioLink)
 {
     _core = new ClipCore();
     InputValueChanged(null);
     Output = GetSample;
 }
Example #7
0
        public Mixer(IAudioLink audioLink)
            : base(audioLink)
        {
            _core = new MixerCore();
            RegisterChildCollection(_core.Channels);

            Output = GetSample;
        }
Example #8
0
        public LowPassFilter(IAudioLink audioLink)
            : base(audioLink)
        {
            SetCurrentValue(DescriptionProperty, "LP Filter");

            _core = new LowPassFilterCore(audioLink);
            InputValueChanged(null);
            Output = GetSample;
        }
Example #9
0
        private void SelectOutputModule()
        {
            IAudioSource outputSource;

            if (string.IsNullOrEmpty(OutputSourceName))
            {
                outputSource = Items.OfType <IAudioSource>().LastOrDefault();
            }
            else
            {
                outputSource = this.FindName(OutputSourceName) as IAudioSource;
            }

            if (outputSource == null)
            {
                _audioSource = null;
            }
            else
            {
                _audioSource = outputSource.GetSample;
            }
        }
Example #10
0
 public void SetAudioSource(AudioWire source)
 {
     // null is ok -- disables the output.
     _audioSource = source;
 }
Example #11
0
 public void SetInput(AudioWire input)
 {
     _input = input;
 }