public void SetParameter(int index, float value) { Parameters[index].Value = value; if (Name.Equals("Reverb")) { DSPReverbEffect effect = (DSPReverbEffect)Effect; // Apply the value to the parameter if (index == 17) { effect.SetGain(Parameters[index].Value); } else if (index == 18) { effect.SetDecayTime(Parameters[index].Value); } else if (index == 19) { effect.SetDensity(Parameters[index].Value); } else { throw new Exception("DSP parameter unhandled: " + index.ToString()); } } else { throw new Exception("DSP type unknown: " + Name); } }
public DSPPreset( bool global, DSPParameter[] parameters ) { IsGlobal = global; Parameters = parameters; // FIXME: Did XACT ever go past Reverb? -flibit Effect = new DSPReverbEffect(Parameters); }
public DSPPreset( string name, bool global, DSPParameter[] parameters ) { Name = name; IsGlobal = global; Parameters = parameters; if (Name.Equals("Reverb")) { Effect = new DSPReverbEffect(Parameters); } else { throw new Exception("DSP type unknown: " + Name); } }
public void SetParameter(int index, float value) { Parameters[index].Value = value; DSPReverbEffect effect = (DSPReverbEffect)Effect; // Apply the value to the parameter if (index == 0) { effect.SetReflectionsDelay(Parameters[index].Value); } else if (index == 1) { effect.SetReverbDelay(Parameters[index].Value); } else if (index == 2) { effect.SetPositionLeft(Parameters[index].Value); } else if (index == 3) { effect.SetPositionRight(Parameters[index].Value); } else if (index == 4) { effect.SetPositionLeftMatrix(Parameters[index].Value); } else if (index == 5) { effect.SetPositionRightMatrix(Parameters[index].Value); } else if (index == 6) { effect.SetEarlyDiffusion(Parameters[index].Value); } else if (index == 7) { effect.SetLateDiffusion(Parameters[index].Value); } else if (index == 8) { effect.SetLowEQGain(Parameters[index].Value); } else if (index == 9) { effect.SetLowEQCutoff(Parameters[index].Value); } else if (index == 10) { effect.SetHighEQGain(Parameters[index].Value); } else if (index == 11) { effect.SetHighEQCutoff(Parameters[index].Value); } else if (index == 12) { effect.SetRearDelay(Parameters[index].Value); } else if (index == 13) { effect.SetRoomFilterFrequency(Parameters[index].Value); } else if (index == 14) { effect.SetRoomFilterMain(Parameters[index].Value); } else if (index == 15) { effect.SetRoomFilterHighFrequency(Parameters[index].Value); } else if (index == 16) { effect.SetReflectionsGain(Parameters[index].Value); } else if (index == 17) { effect.SetReverbGain(Parameters[index].Value); } else if (index == 18) { effect.SetDecayTime(Parameters[index].Value); } else if (index == 19) { effect.SetDensity(Parameters[index].Value); } else if (index == 20) { effect.SetRoomSize(Parameters[index].Value); } else if (index == 21) { effect.SetWetDryMix(Parameters[index].Value); } else { throw new Exception("DSP parameter unhandled: " + index.ToString()); } }