public SoundFxPropertiesControl() { InitializeComponent(); try { _chorus = new ChorusSoundFx();; _compressor = new CompressorSoundFx(); _distortion = new DistortionSoundFx(); _echo = new EchoSoundFx(); _flanger = new FlangerSoundFx(); _gargle = new GargleSoundFx(); _paramEq = new ParamEqSoundFx(); _reverb = new ReverbSoundFx(); FxPropertiesControl.EffectChanged += new Delegates.SoundFxEventHandler(FxPropertiesControlEffectChanged); FrequencyParameterValueControl.UpdateParameter(100, 100000, "Frequency", 50000, 1); FrequencyParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(OnFrequencyValueChangedEvent); } catch (System.Exception e) { MessageBox.Show(e.Message); } }
private void SetParamEqFxToUi() { if (_soundFx.Type != SoundFxType.ParamEq) { throw new Exception("Cannot set ParamEq effect details, effect is of different type"); } ParamEqSoundFx effect = (ParamEqSoundFx)_soundFx; SetParamDetails(1, effect.CenterFreq); SetParamDetails(2, effect.Bandwidth); SetParamDetails(3, effect.Gain); SetParamDetails(4, null); SetParamDetails(5, null); SetParamDetails(6, null); WaveformPropertiesControl.Enabled = false; PhasePropertiesControl.Enabled = false; }