Automatically glue two adjacent notes (time saver)?

does anyone know how to connect two neighbouring (or overlapping) notes?
Two screenshots are in the attachment.

Logical editor or macro maybe?

I want to do it with without going through the whole project manually.

Cubase 2.PNG
cubase 1.PNG

Hi and welcome,

Select all the notes of the same pitch and click to it by using Glue Tool.

You can also hold down Alt modifier while using Glue tool. This will glue all notes of the same pitch. (But there is a risk, if you have other MIDI Notes of the same pitch in the MIDI Part, they will be glued too).

Unfortunately there is no “one-click” way how to do it for the overlapping (or touching) MIDI Notes only.