Help with project logical editor

I’ve just started delving into the PLE and am trying to setup a preset where it will detect whether or not a part is less than a the loop cycle and if not re size it.

I’ve set up a macro so that I can select an audio event and the macro will detect any silence, strip the silence and then send event to a part. The thing I’m having trouble with is getting the part to be exactly the lenth of the cycle (ie; 1 bar, 2 bar, ect…) as the part length will only start at the first segment of audio and finish at the last.

There is a preset that will detect anything less than a bar and then re size it to a bar. The trouble is that it will add the length to the end and not snap to the beginning and the the end of the bar.

I hope that made sense :confused:

Any ideas?