Logical Preset Issue: Stop randomize of ticks +/- on first notes in selection

I’ve created a macro that is a humanize feature, by using logical presets that:

  1. Shift notes randomly by +/- 10 ticks
  2. Randomize relative length between +/- 10 ticks
  3. Randomize velocity between two values
  4. Finishing with a delete overlap to tidy things up

However, if the +/- shift of notes pushes the first notes of the selection backwards (in other words, negative ticks are applied), those notes are now outside of the first bar of the selection.

Is there a way to create a bespoke logical preset that either fixes this issue afterwards or prevents it from happening in the first place (perhaps by adding a line to the logical preset for the shift +/- ticks)?

All help gratefully received! :slight_smile: