Snap END of midi note to grid?

I also inquired about this here: