How to create a tempo map to match an existing midifile

I have recorded many midi tracks in free time without playing to a metronome. I would like to import some of these tracks into cubase 12 and create the tempo track to match the existing recording. Is there a tutorial that explains this process? What is the terminology I should use to frame the question in order to find the info. Thanks for any help you can offer.

As far as I know this has to be a manual process, ie. Cubase has not automatic MIDI tempo detection.

The manual process: OPen the MIDI part in the Key Editor and choose theWarp tool, option Warp Grid.

Adjust the Quantization value to what you need to see of the grid. In below example a full bar.

Afterwards you can move the grid (in my example full bars) to the notes with the mouse.

Put a synth on it and render it to an audio file and get the tempo from that. Read up on Tempo Detection. It’s in the Project menu.

Thanks for your quick response. I have been learning to adjust the tempo track using the time warp tool. I appreciate your help.

Thanks for the tip. I will investigate the tempo detection angle.