C# Class Midi.CallbackMessage

Pseudo-MIDI message used to arrange for a callback at a certain time.

This message can be scheduled with Clock.Schedule just like any other message. When its time comes and it gets "sent", it invokes the callback provided in the constructor.

The idea is that you can embed callback points into the music you've scheduled, so that (if the clock gets to that point in the music) your code has an opportunity for some additional processing.

The callback is invoked on the MidiOutputDevice's worker thread.

Inheritance: Message
显示文件 Open project: jstnryan/midi-dot-net

Public Methods

Method Description
CallbackMessage ( CallbackType callback, float time ) : System

Constructs a Callback message.

MakeTimeShiftedCopy ( float delta ) : Message

Returns a copy of this message, shifted in time by the specified amount.

SendNow ( ) : void

Sends this message immediately, ignoring the beatTime.

Method Details

CallbackMessage() public method

Constructs a Callback message.
public CallbackMessage ( CallbackType callback, float time ) : System
callback CallbackType The callback to invoke when this message is "sent".
time float The timestamp for this message.
return System

MakeTimeShiftedCopy() public method

Returns a copy of this message, shifted in time by the specified amount.
public MakeTimeShiftedCopy ( float delta ) : Message
delta float
return Message

SendNow() public method

Sends this message immediately, ignoring the beatTime.
public SendNow ( ) : void
return void