Check this out:
https://www.youtube.com/watch?v=Kv63Zv_Y8sk&t=3s
So the idea:
a) You have layed down just a few notes, making up a "global" melody.
b) Then you apply the showed Custom Action to these Notes.
Outcome: it creates a random "melodic groove" from the selected Notes.
Hope you like it !
Special thanks to cubic13, kawa and me2beats for making this possible.
Warm Regards.