Receive and output MIDI without playback

Hey :slightly_smiling_face:

sorry if this is in the wrong sub forum (audio plugins). It´s related to midi processing. I was seeing this video: Juce Tutorial 60 - Create your first MIDI Plug-in with Eyal Amir (Xfer Records) - YouTube which explained how MIDI could be processed by a JUCE plugin, and from what I understand you work with a function that is triggered at a frequent rate picking up any events coming from the input source, and then you access a buffer with these events and mutate it if you want to do any transformations.

However, what if you want to create musical patterns that rely on longer sequences of notes that doesn´t have to be computed real time, so that performance can take a hit - are there any options for reading the entire MIDI sequence stored in the DAW at once? I guess this depends on the DAW and what kinds of apis they expose.

It would be great if someone had examples of this for JUCE plugins, where you read the entire contents of the MIDI in the DAW. Ideally I would want to iterate over an array of midi buffers or array of events, do transformations and dump it back into the DAW somehow, so the reading and writing of the MIDI is instant instead of dependent on the playback and BPM of the input source.

Hope this isn´t too incomprehensible. I might not fully understand how this works and haven´t done any development with this yet. Just curious what is possible to do with MIDI.