Assembly: Bass.Net (in Bass.Net.dll) Version: 220.127.116.11
[DllImportAttribute("bassmidi.dll", CharSet = CharSet.Unicode)] public static int BASS_MIDI_StreamGetChannel( int handle, int channel )
<DllImportAttribute("bassmidi.dll", CharSet := CharSet.Unicode>] Public Shared Function BASS_MIDI_StreamGetChannel ( handle As Integer, channel As Integer ) As Integer
public: [DllImportAttribute(L"bassmidi.dll", CharSet = CharSet::Unicode)] static int BASS_MIDI_StreamGetChannel( int handle, int channel )
[<DllImportAttribute("bassmidi.dll", CharSet = CharSet.Unicode)>] static member BASS_MIDI_StreamGetChannel : handle : int * channel : int -> int
- Type: SystemInt32
The midi stream to get a channel from.
- Type: SystemInt32
The MIDI channel... 0 = channel 1. Or one of the following special channels:
BASS_MIDI_CHAN_CHORUS = -1 : Chorus mix channel. The default chorus processing is replaced by the stream's processing.
BASS_MIDI_CHAN_REVERB = -2 : Reverb mix channel. The default reverb processing is replaced by the stream's processing.
BASS_MIDI_CHAN_USERFX = -3 : User effect mix channel.
Return ValueType: Int32
If successful, the channel handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
By default, MIDI channels do not have streams assigned to them; a MIDI channel only gets a stream when this function is called, which it then keeps until the MIDI stream is freed. MIDI channel streams can also be freed before then via BASS_StreamFree(Int32). Each MIDI channel stream increases the CPU usage slightly, even if there are no DSP/FX set on them, so for optimal performance they should not be activated when unnecessary
The MIDI channel streams have a different path to the final mix than the BASSMIDI reverb/chorus processing, which means that the reverb/chorus will not be present in the data received by any DSP/FX set on the streams and nor will the reverb/chorus be applied to the DSP/FX output; the reverb/chorus processing will use the channel's original data.
The MIDI channel streams can only be used to set DSP/FX on the channels. They cannot be used with BASS_ChannelGetData(Int32, IntPtr, Int32) or BASS_ChannelGetLevel(Int32) to visualise the channels, for example, but that could be achieved via a DSP function instead.
|BASS_ERROR_HANDLE||handle is not valid.|
|BASS_ERROR_NOTAVAIL||channel is not valid.|
' get a stream for MIDI channel 1 Dim chan1 As Integer = BassMidi.BASS_MIDI_StreamGetChannel(midi, 0) ' set the DX8 distortion effect on it Dim chan1 As Integer = Bass.BASS_ChannelSetFX(chan1, BASSFXType.BASS_FX_DX8_DISTORTION, 0)
// get a stream for MIDI channel 1 int chan1 = BassMidi.BASS_MIDI_StreamGetChannel(midi, 0); // set the DX8 distortion effect on it int fx = Bass.BASS_ChannelSetFX(chan1, BASSFXType.BASS_FX_DX8_DISTORTION, 0);