This overload implements the Unicode overload for the dllFile name, so the BASS_UNICODE flag will automatically be added if not already set.
Assembly: Bass.Net (in Bass.Net.dll) Version: 22.214.171.124
public static int BASS_VST_ChannelSetDSP( int chan, string dllFile, BASSVSTDsp flags, int priority )
Public Shared Function BASS_VST_ChannelSetDSP ( chan As Integer, dllFile As String, flags As BASSVSTDsp, priority As Integer ) As Integer
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. Or 0, if you want to test, if the dll is a valid VST plugin.
- Type: SystemString
The fully qualified path and file name to the VST effect plugin (a DLL file name).
- Type: Un4seen.Bass.AddOn.VstBASSVSTDsp
A combination of these flags (see BASSVSTDsp):
BASS_VST_KEEP_CHANS By default, mono effects assigned to stereo channels are mixed down before processing and converted back to stereo afterwards. Set this flag to avoid this behaviour in which case only the first channel is affected by processing. BASS_UNICODE dllFile is Unicode (16-bit characters) (not needed here, since the overloads already take care of it).
- Type: SystemInt32
Same meaning as for BASS_ChannelSetDSP(Int32, DSPPROC, IntPtr, Int32) - DSPs with higher priority are called before those with lower.
Return ValueType: Int32
On success, the method returns the new vstHandle that must be given to all the other functions, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
For testing if a DLL is a valid VST effect, you can set chan to 0 - however, do not forget to call BASS_VST_ChannelRemoveDSP(Int32, Int32) even in this case.
You may safely assign the same DLL to different channels at the same time - the library makes sure, every channel is processed indepeningly. But take care to use the correct vstHandles in this case.
Finally, you can use any number of VST effects on a channel. They are processed alongside with all other BASS DSPs in the order of it's priority.
To set or get the parameters of a VST effect you might use BASS_VST_GetParamCount(Int32) alongside with BASS_VST_GetParam(Int32, Int32) and BASS_VST_SetParam(Int32, Int32, Single) to enumerate over the total number of effect parameters. To retrieve details about an individual parameter you might use BASS_VST_GetParamInfo(Int32, Int32, BASS_VST_PARAM_INFO). If the VST effect supports an embedded editor you might also invoke this one with BASS_VST_EmbedEditor(Int32, IntPtr). If the embedded editor also supports localization you might set the language in advance with BASS_VST_SetLanguage(String).
Use BASS_VST_GetInfo(Int32, BASS_VST_INFO) to get even more details about a loaded VST plugin.
' create any stream Dim stream As Integer = Bass.BASS_StreamCreateFile(_fileName, 0, 0, BASSFlag.BASS_SAMPLE_FLOAT) ' and assign a VST effect Dim vstHandle As Integer = BassVst.BASS_VST_ChannelSetDSP(stream, "C:\VstPlugins\DelayEditGUI.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1) ' and play the stream Bass.BASS_ChannelPlay(stream, False) ... ' if the VST effect is not needed anymore... BassVst.BASS_VST_ChannelRemoveDSP(stream, vstHandle)
// create any stream int stream = Bass.BASS_StreamCreateFile(_fileName, 0, 0, BASSFlag.BASS_SAMPLE_FLOAT); // and assign a VST effect int vstHandle = BassVst.BASS_VST_ChannelSetDSP(stream, "C:\\VstPlugins\\DelayEditGUI.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1); // and play the stream Bass.BASS_ChannelPlay(stream, false); ... // if the VST effect is not needed anymore... BassVst.BASS_VST_ChannelRemoveDSP(stream, vstHandle);