Delegate MidiFilterProcedure
User defined callback to filter events.
Namespace: System.Dynamic.ExpandoObject
Assembly: ManagedBass.Midi.dll
Syntax
public delegate bool MidiFilterProcedure(int Handle, int Track, MidiEvent Event, bool Seeking, IntPtr User);
Parameters
Int32
Handle
The MIDI stream handle. |
Int32
Track
The track that the event is from... 0 = 1st track. |
MidiEvent
Event
The event structure. |
Boolean
Seeking
true = the event is being processed while seeking, false = the event is being played. |
IntPtr
User
The user instance data given when StreamSetFilter(Int32, Boolean, MidiFilterProcedure, IntPtr) was called. |
Returns
Boolean
true to process the event, and false to drop the event. |
Remarks
The event's type, parameter, and channel can be modified, but not its position. It is also possible to apply additional events at the same time via StreamEvent(Int32, Int32, MidiEventType, Byte, Byte), but not StreamEvents(Int32, MidiEventsMode, Byte[], Int32). Note, NotesOff, and SoundOff events are ignored while seeking so they will not be received by a filtering function then. Tempo events can be changed while seeking but doing so when seeking in bytes (Bytes) will result in reaching a different position. Seeking in ticks (MIDITick) is unaffected by tempo changes. The Speed MIDI_EVENT_SPEED event can be used to modify the tempo without affecting seeking.