Lock and reroll
Lock and reroll protects the notes you want to keep and regenerates everything else. It works in the piano roll and in every melodic editor.
Locking notes
Alt+click a note to toggle its lock. Locked notes show a blue tint and a padlock. Ctrl+Shift+L locks every note in the pattern, Ctrl+Shift+U unlocks them again. See the keyboard shortcuts for the full list.
A lock belongs to the note, so it survives undo and redo and is saved with the project.
Rerolling
Ctrl+R regenerates every unlocked note. The locked ones stay exactly where they are and the rest is replaced.
What comes back is shaped by the current key and scale, the section's chord progression if it has one, and the active genre profile. The reroll is undoable, so Ctrl+Z brings the previous notes back if the new ones are worse.
The usual way to work
Generate a pattern, play it, and find the moments that work. Lock those, reroll, and listen again. Lock whatever new material earns it, and repeat until the whole pattern holds up.
Start broad and narrow down: a full pattern first, then lock the highlights and let the rerolls tighten the transitions between them.
Pair it with phrase contour by drawing a shape, generating, locking the peaks and valleys, then rerolling to fix the joins.
Changing the genre profile between rerolls is worth trying. Lock a verse melody, switch profile, and reroll to hear the unlocked parts in a different style against material you have already committed to.
If you composed something by hand and want generated material around it, press Ctrl+Shift+L first. It protects the whole pattern, and you can then unlock only the bars you want the generator to fill.