Set all parameters of any program in a VST effect.
Namespace: Un4seen.Bass.AddOn.Vst
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static bool BASS_VST_SetProgramParam( int vstHandle, int programIndex, float[] param )
Parameters
- vstHandle
- Type: SystemInt32
The VST effect handle as returned by BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32). - programIndex
- Type: SystemInt32
The program number for which to set the parameter values, must be smaller than BASS_VST_GetProgramCount(Int32). - param
- Type: SystemSingle
An array with the parameter values to set. The array needs to have as many elements as defined by BASS_VST_GetParamCount(Int32) or as returned be BASS_VST_GetProgramParam(Int32, Int32).
Return Value
Type: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
If you use BASS_VST_SetCallback(Int32, VSTPROC, IntPtr), the BASS_VST_PARAM_CHANGED event is only posted if you select a program with parameters different from the prior.
Examples
// get the current program number int vstCurrProg = BassVst.BASS_VST_GetProgram(vstHandle); // query all parameter values of the current program float[] prog0Params = BassVst.BASS_VST_GetProgramParam(vstHandle, vstCurrProg); // query all parameter values of the program #3 float[] prog1aParams = BassVst.BASS_VST_GetProgramParam(vstHandle, 3); // copy all parameters from the current program to #3 bool ok = BassVst.BASS_VST_SetProgramParam(vstHandle, 3, prog0Params); // and query all parameter values of the program #3 again... float[] prog1bParams = BassVst.BASS_VST_GetProgramParam(vstHandle, 3);
See Also