public MusicPropertiesForm() { InitializeComponent(); _soundSourcePosition = new Sound3d(); // Sound position TempoParameterValueControl.UpdateParameter(0.1f, 10, "Tempo", 1, 0.1f); SourceXParameterValueControl.UpdateParameter(-5, 5, "Source X", 5, 0.1f); SourceYParameterValueControl.UpdateParameter(-5, 5, "Source Y", 0, 0.1f); SourceZParameterValueControl.UpdateParameter(-5, 5, "Source Z", 5, 0.1f); TempoParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(TempoValueChangedEvent); SourceXParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceXValueChangedEvent); SourceYParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceYValueChangedEvent); SourceZParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceZValueChangedEvent); }
public SpatializationPropertiesControl() { InitializeComponent(); _sound3dProperties = new Sound3d(); // Sound properties DopplerFactorParameterValueControl.UpdateParameter(0, 10, "Doppler Factor", _sound3dProperties.DoplerFactor, 0.1f); RolloffParameterValueControl.UpdateParameter(0, 10, "Rolloff Factor", _sound3dProperties.RolloffFactor, 0.1f); MinDistanceParameterValueControl.UpdateParameter(0, 100, "Min Distance", _sound3dProperties.MinDistance, 0.01f); MaxDistanceParameterValueControl.UpdateParameter(0, 100, "Min Distance", _sound3dProperties.MaxDistance, 0.01f); DopplerFactorParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(DopplerFactorValueChangedEvent); RolloffParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(RolloffValueChangedEvent); MinDistanceParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(MinDistanceValueChangedEvent); MaxDistanceParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(MaxDistanceValueChangedEvent); // Sound position SourceXParameterValueControl.UpdateParameter(-5, 5, "Source X", 5, 0.1f); SourceYParameterValueControl.UpdateParameter(-5, 5, "Source Y", 0, 0.1f); SourceZParameterValueControl.UpdateParameter(-5, 5, "Source Z", 5, 0.1f); SourceXParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceXValueChangedEvent); SourceYParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceYValueChangedEvent); SourceZParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceZValueChangedEvent); }