BASS.NET API for the Un4seen BASS Audio Library

BassVstBASS_VST_ProcessEvent Method

BASS.NET API for the Un4seen BASS Audio Library
Sends a MIDI message/event to the VSTi plugin.

Namespace:  Un4seen.Bass.AddOn.Vst
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

[DllImportAttribute("bass_vst")]
public static bool BASS_VST_ProcessEvent(
	int vstHandle,
	int midiCh,
	BASSMIDIEvent eventtype,
	int param
)

Parameters

vstHandle
Type: SystemInt32
The VSTi channel to send a MIDI message to (as created by BASS_VST_ChannelCreate(Int32, Int32, String, BASSFlag)).
midiCh
Type: SystemInt32
The Midi channel number to use (0 to 15).
eventtype
Type: Un4seen.Bass.AddOn.MidiBASSMIDIEvent
The Midi event/status value to use (see BASSMIDIEvent for details).
param
Type: SystemInt32
The data bytes to send with the message (use MakeWord(Byte, Byte) to compose a data byte 1 and 2).

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Use one of the BASSMIDIEvent commands similar to BASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32).

Set midiCh to 0xFFFF and eventtype to the raw command to send. The raw command must be encoded as 0x00xxyyzz with xx=MIDI command, yy=MIDI databyte #1, zz=MIDI databyte #2.param should be set to 0 in this case.

Send SysEx commands by setting midiCh to 0xEEEE. eventtype will denote the type of event to send (see BASSMIDIEvent about possible values for param in such case).

Examples

using Un4seen.Bass.AddOn.Vst;
using Un4seen.Bass.AddOn.Midi;

int vstHandle = BassVst.BASS_VST_ChannelCreate(44100, 2, "yourVSTi.dll", BASSFlag.BASS_DEFAULT);
Bass.BASS_ChannelPlay(vstHandle);
BassVst.BASS_VST_ProcessEvent(vstHandle, 0, BASSMIDIEvent.MIDI_EVENT_NOTE, Utils.MakeWord(60, 100));
See Also

Reference