public Fuzz(IAudioLink audioLink) : base(audioLink) { _core = new ClipCore(); InputValueChanged(null); Output = GetSample; }
public Fader(IAudioLink audioLink) : base(audioLink) { _core = new FaderCore(); InputValueChanged(null); Output = GetSample; }
public Echo(IAudioLink audioLink) : base(audioLink) { _core = new EchoCore(audioLink); InputValueChanged(null); Output = GetSample; }
public Oscillator(IAudioLink audioLink) : base(audioLink) { _core = new OscillatorCore(audioLink); InputValueChanged(null); Output = GetSample; }
public Translate(IAudioLink audioLink) : base(audioLink) { _core = new TranslateCore(); _core.OutputChanged += HandleCoreOutputChanged; InputValueChanged(null); }
public Noise(IAudioLink audioLink) : base(audioLink) { _core = new NoiseCore(); InputValueChanged(null); Output = GetSample; }
public Glide(IAudioLink audioLink) : base(audioLink) { _core = new GlideCore(audioLink); _core.OutputChanged += HandleCoreOutputChanged; InputValueChanged(null); Unloaded += (s, e) => _core.Dispose(); }
public Mixer(IAudioLink audioLink) : base(audioLink) { _core = new MixerCore(); RegisterChildCollection(_core.Channels); Output = GetSample; }
public void Dispose() { if (_audioLink != null) { _audioLink.DetachClockListener(this); } _audioLink = null; }
public LowPassFilter(IAudioLink audioLink) : base(audioLink) { SetCurrentValue(DescriptionProperty, "LP Filter"); _core = new LowPassFilterCore(audioLink); InputValueChanged(null); Output = GetSample; }
public LFO(IAudioLink audioLink) : base(audioLink) { // TODO: supress tick handling until loading is complete? _core = new LfoCore(audioLink); _core.OutputChanged += HandleCoreOutputChanged; InputValueChanged(null); Unloaded += (s, e) => _core.Dispose(); }
protected Module(IAudioLink audioLink) { if (audioLink == null && !this.IsInDesignMode()) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; Loaded += HandleLoaded; Unloaded += HandleUnloaded; }
public EchoCore(IAudioLink audioLink, float initialSeconds = 0.4f) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; InitializeInputs(initialSeconds); HandleQualityChanged(null, null); _audioLink.SampleRateChanged += HandleQualityChanged; }
public OscillatorCore(IAudioLink audioLink, float initialPitch = DEFAULT_PITCH) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; InitializeInputs(initialPitch); HandleQualityChanged(null, null); _audioLink.SampleRateChanged += HandleQualityChanged; }
public LowPassFilterCore(IAudioLink audioLink, float initialCutoffPitch = 0.5f, float initialResonance = 0.2f) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; CutoffPitch = new FloatInput("Cutoff Pitch", initialCutoffPitch, 0, 0.85f, ValueOutOfRangeStrategy.ForceIntoRange, (name, v0, v1) => SetFilterCoefficients()); Resonance = new FloatInput("Resonance", initialResonance, 0, 0.85f, ValueOutOfRangeStrategy.ForceIntoRange, (name, v0, v1) => SetFilterCoefficients()); SetFilterCoefficients(); _audioLink.SampleRateChanged += HandleQualityChanged; }
public AudioMeter(IAudioLink audioLink) : base(audioLink) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; IsEnabledChanged += HandleIsEnabledChanged; Loaded += HandleLoaded; Unloaded += HandleUnloaded; }
public LfoCore(IAudioLink audioLink, float initialFrequency = 5, float initialAmount = 0) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; InitializeInputs(initialFrequency, initialAmount); _clockSource = new AudioClockDivider(_audioLink, 100, id => HandleControlClockTick()); HandleQualityChanged(null, null); _audioLink.SampleRateChanged += HandleQualityChanged; }
public GlideCore(IAudioLink audioLink) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; SourceValue = new FloatInput("Source Value", 0, float.MinValue, float.MaxValue, ValueOutOfRangeStrategy.Accept, (name, v0, v1) => HandleSourceValueChanged(v1)); Rate = new FloatInput("Rate", 1, 0, 1, ValueOutOfRangeStrategy.ForceIntoRange, (name, v0, v1) => HandleRateChanged()); HandleQualityChanged(null, null); _audioLink.SampleRateChanged += HandleQualityChanged; _clockSource = new AudioClockDivider(_audioLink, 100, id => HandleControlClockTick()); }
public Envelope(IAudioLink audioLink) : base(audioLink) { _core = new EnvelopeCore(audioLink); RegisterChildCollection(_core.Attack); RegisterChildCollection(_core.Loop); RegisterChildCollection(_core.Release); _core.StepsChanged += HandleCoreStepsChanged; _core.PhaseChanged += HandleCorePhaseChanged; _core.OutputChanged += HandleCoreOutputChanged; InputValueChanged(TimeScaleProperty.Name); Unloaded += (s, e) => _core.Dispose(); }
public EnvelopeCore(IAudioLink audioLink) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; SetOutput(0); InitializeInputs(); InitializeStepCollections(); _steps = new[] { Attack, Loop, Release }; _audioLink.SampleRateChanged += HandleQualityChanged; _clockSource = new AudioClockDivider(_audioLink, 50, id => HandleControlClockTick()); HandleQualityChanged(null, null); }
public SynthWindow(IAudioLink audioLink, IMidiLink midiLink) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; if (midiLink == null) { throw new ArgumentNullException("midiLink"); } _midiLink = midiLink; Loaded += HandleLoaded; //SetAlternateColors(); InitializeComponent(); }
public AudioClockDivider(IAudioLink audioLink, int targetClockRate, Action <ulong> tickHandler, bool rateMustBeExact = false) { if (audioLink == null) { throw new ArgumentNullException("audioLink"); } _audioLink = audioLink; if (tickHandler == null) { throw new ArgumentNullException("tickHandler"); } _tickHandler = tickHandler; _rateMustBeExact = rateMustBeExact; _targetRate = targetClockRate; ApplyTargetRate(); _audioLink.SampleRateChanged += HandleAudioQualityChanged; _audioLink.AttachClockListener(this); }
public Vibrato(IAudioLink audioLink) : base(audioLink) { InitializeComponent(); }
public HostModule(IAudioLink audioLink) : base(audioLink) { DataContext = this; }