I need help writing this logical preset in Cubase for my E-Hi Hat?

-> Note number = 50
-> If CC 4 is between 1 and 31, transpose note number + 4 (from 50 to 54).
-> If CC 4 is between 32 and 63, transpose note number + 5 (from 50 to 55).
-> If CC 4 is...