MIDI Message Callbacks in plugin instead of block based processing

I am trying to develop a MIDI plugin where in I need to send OSC messages (to another device) when I receive MIDI messages from the track the plugin sits on. I am looking for something like a callback function when a midi event occurs instead of waiting for the processBlock to be called since it is delayed by the buffer size (if I understand this correctly). I looked at various examples that deal with this kind of a scenario. MidiInput Callback is one such example but I am not sure how to set it up to receive events from the track instead of a physical device.

I want to send OSC messages from the plugin as soon as I receive a midi event from the track.

Any advice on this is greatly appreciated.

Short answer, no. Plugins receive their midi in the process function. “and delayed by buffer size” is also in sync with the audio system… :slight_smile: